diff --git a/hwe/func.php b/hwe/func.php
index 7421d05d..74a29aea 100644
--- a/hwe/func.php
+++ b/hwe/func.php
@@ -1937,8 +1937,8 @@ function tryUniqueItemLottery(General $general, string $acquireType = '아이템
$prob = Util::valueFit($prob, null, 1 / 4); //최대치 감소
$result = false;
- $prob /= sqrt(2);
- $moreProb = pow(2, 1 / 4);
+ $prob /= sqrt(7);
+ $moreProb = pow(10, 1 / 4);
if ($general->getAuxVar('inheritRandomUnique') && $availableBuyUnique) {
//포인트로 랜덤 유니크 획득
@@ -2415,7 +2415,9 @@ function SabotageInjury(array $cityGeneralList, string $reason): int
foreach ($cityGeneralList as $general) {
/** @var General $general */
- if (!Util::randBool(0.3)) {
+ $injuryProb = 0.3;
+ $injuryProb = $general->onCalcStat($general, 'injuryProb', $injuryProb);
+ if (!Util::randBool($injuryProb)) {
continue;
}
$general->getLogger()->pushGeneralActionLog($text);
diff --git a/hwe/func_gamerule.php b/hwe/func_gamerule.php
index b97d230c..af09524d 100644
--- a/hwe/func_gamerule.php
+++ b/hwe/func_gamerule.php
@@ -673,17 +673,17 @@ function updateNationState()
continue;
}
- $score = $nationGen->getVar('belong') + 5;
+ $score = $nationGen->getVar('belong') + 10;
if ($nationGen->getVar('officer_level') == 12) {
- $score += 100; //NOTE: 꼬우면 군주하세요.
+ $score += 60;
} else if ($nationGen->getVar('officer_level') == 11) {
- $score += 50;
+ $score += 30;
} else if ($nationGen->getVar('officer_level') > 4) {
- $score += 35;
+ $score += 15;
}
- $score *= $trialCnt;
+ $score *= 2**$trialCnt;
$uniqueLotteryWeightList[$nationGen->getID()] = [$nationGen, $score];
}
diff --git a/hwe/sammo/ActionItem/None.php b/hwe/sammo/ActionItem/None.php
index bcb2578f..177fc1d4 100644
--- a/hwe/sammo/ActionItem/None.php
+++ b/hwe/sammo/ActionItem/None.php
@@ -5,7 +5,6 @@ use \sammo\General;
class None extends \sammo\BaseItem{
- protected $id = 0;
protected $name = '-';
protected $info = null;
protected $cost = 0;
diff --git a/hwe/sammo/ActionItem/che_간파_노군입산부.php b/hwe/sammo/ActionItem/che_간파_노군입산부.php
new file mode 100644
index 00000000..fdc68688
--- /dev/null
+++ b/hwe/sammo/ActionItem/che_간파_노군입산부.php
@@ -0,0 +1,23 @@
+[전투] 계략 시도 확률 +10%p, 계략 성공 확률 +10%p';
@@ -16,7 +15,7 @@ class che_계략_삼략 extends \sammo\BaseItem{
if($turnType == '계략'){
if($varType == 'success') return $value + 0.2;
}
-
+
return $value;
}
diff --git a/hwe/sammo/ActionItem/che_계략_육도.php b/hwe/sammo/ActionItem/che_계략_육도.php
index f4f2726a..7915052d 100644
--- a/hwe/sammo/ActionItem/che_계략_육도.php
+++ b/hwe/sammo/ActionItem/che_계략_육도.php
@@ -5,7 +5,6 @@ use \sammo\General;
class che_계략_육도 extends \sammo\BaseItem{
- protected $id = 21;
protected $rawName = '육도';
protected $name = '육도(계략)';
protected $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p
[전투] 계략 시도 확률 +10%p, 계략 성공 확률 +10%p';
@@ -16,7 +15,7 @@ class che_계략_육도 extends \sammo\BaseItem{
if($turnType == '계략'){
if($varType == 'success') return $value + 0.2;
}
-
+
return $value;
}
diff --git a/hwe/sammo/ActionItem/che_계략_이추.php b/hwe/sammo/ActionItem/che_계략_이추.php
index 68380391..f999e5a5 100644
--- a/hwe/sammo/ActionItem/che_계략_이추.php
+++ b/hwe/sammo/ActionItem/che_계략_이추.php
@@ -5,7 +5,6 @@ use \sammo\General;
class che_계략_이추 extends \sammo\BaseItem{
- protected $id = 5;
protected $rawName = '이추';
protected $name = '이추(계략)';
protected $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p';
@@ -18,7 +17,7 @@ class che_계략_이추 extends \sammo\BaseItem{
if($turnType == '계략'){
if($varType == 'success') return $value + 0.2;
}
-
+
return $value;
}
diff --git a/hwe/sammo/ActionItem/che_계략_향낭.php b/hwe/sammo/ActionItem/che_계략_향낭.php
index 1a382bb5..6035226e 100644
--- a/hwe/sammo/ActionItem/che_계략_향낭.php
+++ b/hwe/sammo/ActionItem/che_계략_향낭.php
@@ -5,7 +5,6 @@ use \sammo\General;
class che_계략_향낭 extends \sammo\BaseItem{
- protected $id = 5;
protected $rawName = '항냥';
protected $name = '항냥(계략)';
protected $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +50%p';
@@ -18,7 +17,7 @@ class che_계략_향낭 extends \sammo\BaseItem{
if($turnType == '계략'){
if($varType == 'success') return $value + 0.5;
}
-
+
return $value;
}
diff --git a/hwe/sammo/ActionItem/che_공성_묵자.php b/hwe/sammo/ActionItem/che_공성_묵자.php
new file mode 100644
index 00000000..839b9275
--- /dev/null
+++ b/hwe/sammo/ActionItem/che_공성_묵자.php
@@ -0,0 +1,24 @@
+getOppose() instanceof WarUnitCity){
+ return [1.5, 1];
+ }
+ return [1, 1];
+ }
+}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_내정_납금박산로.php b/hwe/sammo/ActionItem/che_내정_납금박산로.php
new file mode 100644
index 00000000..1b0d9cf7
--- /dev/null
+++ b/hwe/sammo/ActionItem/che_내정_납금박산로.php
@@ -0,0 +1,21 @@
+[전투] 상대 계략 시도 확률 -10%p, 상대 계략 성공 확률 -10%p';
+ protected $cost = 200;
+ protected $consumable = false;
+
+ public function onCalcStat(General $general, string $statName, $value, $aux=null){
+ if($statName === 'sabotageDefence'){
+ return $value + 0.3;
+ }
+ return $value;
+ }
+
+ public function onCalcOpposeStat(General $general, string $statName, $value, $aux = null)
+ {
+ if($statName === 'warMagicTrialProb'){
+ return $value - 0.1;
+ }
+ if($statName === 'warMagicSuccessProb'){
+ return $value - 0.1;
+ }
+ return $value;
+ }
+}
diff --git a/hwe/sammo/ActionItem/che_농성_주서음부.php b/hwe/sammo/ActionItem/che_농성_주서음부.php
new file mode 100644
index 00000000..7723618e
--- /dev/null
+++ b/hwe/sammo/ActionItem/che_농성_주서음부.php
@@ -0,0 +1,32 @@
+[전투] 상대 계략 시도 확률 -10%p, 상대 계략 성공 확률 -10%p';
+ protected $cost = 200;
+ protected $consumable = false;
+
+ public function onCalcStat(General $general, string $statName, $value, $aux=null){
+ if($statName === 'sabotageDefence'){
+ return $value + 0.3;
+ }
+ return $value;
+ }
+
+ public function onCalcOpposeStat(General $general, string $statName, $value, $aux = null)
+ {
+ if($statName === 'warMagicTrialProb'){
+ return $value - 0.1;
+ }
+ if($statName === 'warMagicSuccessProb'){
+ return $value - 0.1;
+ }
+ return $value;
+ }
+}
diff --git a/hwe/sammo/ActionItem/che_능력치_무력_두강주.php b/hwe/sammo/ActionItem/che_능력치_무력_두강주.php
new file mode 100644
index 00000000..b251f9b2
--- /dev/null
+++ b/hwe/sammo/ActionItem/che_능력치_무력_두강주.php
@@ -0,0 +1,28 @@
+getValuesAsArray(['year', 'startyear']);
+ $relYear = $year - $startYear;
+ return $value + 5 + Util::valueFit(intdiv($relYear, 5), 0, GameConst::$maxTechLevel);
+ }
+ return $value;
+ }
+}
diff --git a/hwe/sammo/ActionItem/che_능력치_지력_이강주.php b/hwe/sammo/ActionItem/che_능력치_지력_이강주.php
new file mode 100644
index 00000000..9c74ffb4
--- /dev/null
+++ b/hwe/sammo/ActionItem/che_능력치_지력_이강주.php
@@ -0,0 +1,28 @@
+getValuesAsArray(['year', 'startyear']);
+ $relYear = $year - $startYear;
+ return $value + 5 + Util::valueFit(intdiv($relYear, 5), 0, GameConst::$maxTechLevel);
+ }
+ return $value;
+ }
+}
diff --git a/hwe/sammo/ActionItem/che_능력치_통솔_보령압주.php b/hwe/sammo/ActionItem/che_능력치_통솔_보령압주.php
new file mode 100644
index 00000000..7ebb29ed
--- /dev/null
+++ b/hwe/sammo/ActionItem/che_능력치_통솔_보령압주.php
@@ -0,0 +1,28 @@
+getValuesAsArray(['year', 'startyear']);
+ $relYear = $year - $startYear;
+ return $value + 5 + Util::valueFit(intdiv($relYear, 5), 0, GameConst::$maxTechLevel);
+ }
+ return $value;
+ }
+}
diff --git a/hwe/sammo/ActionItem/che_명마_12_옥란백용구.php b/hwe/sammo/ActionItem/che_명마_12_옥란백용구.php
index 02a76fd9..4aa866b3 100644
--- a/hwe/sammo/ActionItem/che_명마_12_옥란백용구.php
+++ b/hwe/sammo/ActionItem/che_명마_12_옥란백용구.php
@@ -10,7 +10,7 @@ class che_명마_12_옥란백용구 extends \sammo\BaseStatItem{
public function __construct()
{
parent::__construct();
- $this->info .= "
[전투] 남은 병력에 따라 회피 확률 증가. 최대 +30%p";
+ $this->info .= "
[전투] 남은 병력이 적을수록 회피 확률 증가. 최대 +30%p";
}
public function onCalcStat(General $general, string $statName, $value, $aux = null)
diff --git a/hwe/sammo/ActionItem/che_명성_구석.php b/hwe/sammo/ActionItem/che_명성_구석.php
new file mode 100644
index 00000000..36680c26
--- /dev/null
+++ b/hwe/sammo/ActionItem/che_명성_구석.php
@@ -0,0 +1,20 @@
+getValuesAsArray(['year', 'startyear']);
+ $relYear = $year - $startYear;
+
+ $score = 10000 * (1 + Util::valueFit(intdiv($relYear, 5), 0));
+
+ [$resName, $resKey] = Util::choiceRandom([
+ ['금', 'gold'],
+ ['쌀', 'rice']
+ ]);
+
+ $db->update('nation', [
+ $resKey => $db->sqleval('%b + %i', $resKey, $score)
+ ]);
+
+ $score = Util::round($score);
+ $scoreText = number_format($score, 0);
+
+ $logger = $general->getLogger();
+ $logger->pushGeneralActionLog("국고에 {$resName} {$scoreText}>을 보충합니다.");
+ return $aux;
+ }
+}
diff --git a/hwe/sammo/ActionItem/che_부적_태현청생부.php b/hwe/sammo/ActionItem/che_부적_태현청생부.php
index 1094880a..004380b8 100644
--- a/hwe/sammo/ActionItem/che_부적_태현청생부.php
+++ b/hwe/sammo/ActionItem/che_부적_태현청생부.php
@@ -15,13 +15,20 @@ use sammo\WarUnitTrigger\WarActivateSkills;
class che_부적_태현청생부 extends \sammo\BaseItem
{
- protected $id = 9;
protected $rawName = '태현청생부';
protected $name = '태현청생부(부적)';
protected $info = '[전투] 저격 불가, 부상 없음';
protected $cost = 200;
protected $consumable = false;
+ public function onCalcStat(General $general, string $statName, $value, $aux = null)
+ {
+ if($statName === 'injuryProb'){
+ return $value -= 1;
+ }
+ return $value;
+ }
+
public function getBattleInitSkillTriggerList(WarUnit $unit): ?WarUnitTriggerCaller
{
return new WarUnitTriggerCaller(
diff --git a/hwe/sammo/ActionItem/che_불굴_상편.php b/hwe/sammo/ActionItem/che_불굴_상편.php
new file mode 100644
index 00000000..854553b8
--- /dev/null
+++ b/hwe/sammo/ActionItem/che_불굴_상편.php
@@ -0,0 +1,31 @@
+getGeneral()->getLeadership();
+ $crew = $unit->getGeneral()->getVar('crew');
+
+ $crewRatio = Util::valueFit($crew / ($leadership * 100), 0, 1);
+ return new WarUnitTriggerCaller(
+ new 전투력보정($unit, 1 + 0.5 * (1 - $crewRatio))
+ );
+ }
+}
diff --git a/hwe/sammo/ActionItem/che_사기_두강주.php b/hwe/sammo/ActionItem/che_사기_두강주.php
index 5038cda1..152617b0 100644
--- a/hwe/sammo/ActionItem/che_사기_두강주.php
+++ b/hwe/sammo/ActionItem/che_사기_두강주.php
@@ -5,7 +5,6 @@ use \sammo\General;
class che_사기_두강주 extends \sammo\BaseItem{
- protected $id = 15;
protected $rawName = '두강주';
protected $name = '두강주(사기)';
protected $info = '[전투] 사기 보정 +10';
@@ -18,4 +17,6 @@ class che_사기_두강주 extends \sammo\BaseItem{
}
return $value;
}
-}
\ No newline at end of file
+}
+
+//NOTE: 구버전
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_사기_보령압주.php b/hwe/sammo/ActionItem/che_사기_보령압주.php
index 7179a02f..cb5bc735 100644
--- a/hwe/sammo/ActionItem/che_사기_보령압주.php
+++ b/hwe/sammo/ActionItem/che_사기_보령압주.php
@@ -5,7 +5,6 @@ use \sammo\General;
class che_사기_보령압주 extends \sammo\BaseItem{
- protected $id = 16;
protected $rawName = '보령압주';
protected $name = '보령압주(사기)';
protected $info = '[전투] 사기 보정 +10';
@@ -18,4 +17,6 @@ class che_사기_보령압주 extends \sammo\BaseItem{
}
return $value;
}
-}
\ No newline at end of file
+}
+
+//NOTE: 구버전
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_사기_의적주.php b/hwe/sammo/ActionItem/che_사기_의적주.php
index 43896cc9..86f2a9db 100644
--- a/hwe/sammo/ActionItem/che_사기_의적주.php
+++ b/hwe/sammo/ActionItem/che_사기_의적주.php
@@ -5,7 +5,6 @@ use \sammo\General;
class che_사기_의적주 extends \sammo\BaseItem{
- protected $id = 14;
protected $rawName = '의적주';
protected $name = '의적주(사기)';
protected $info = '[전투] 사기 보정 +10';
diff --git a/hwe/sammo/ActionItem/che_사기_초선화.php b/hwe/sammo/ActionItem/che_사기_초선화.php
index 6cbc604a..f18736d4 100644
--- a/hwe/sammo/ActionItem/che_사기_초선화.php
+++ b/hwe/sammo/ActionItem/che_사기_초선화.php
@@ -5,16 +5,15 @@ use \sammo\General;
class che_사기_초선화 extends \sammo\BaseItem{
- protected $id = 20;
protected $rawName = '초선화';
protected $name = '초선화(사기)';
- protected $info = '[전투] 사기 보정 +14';
+ protected $info = '[전투] 사기 보정 +15';
protected $cost = 200;
protected $consumable = false;
public function onCalcStat(General $general, string $statName, $value, $aux=null){
if($statName === 'bonusAtmos'){
- return $value + 14;
+ return $value + 15;
}
return $value;
}
diff --git a/hwe/sammo/ActionItem/che_사기_춘화첩.php b/hwe/sammo/ActionItem/che_사기_춘화첩.php
index 96357223..e01421a5 100644
--- a/hwe/sammo/ActionItem/che_사기_춘화첩.php
+++ b/hwe/sammo/ActionItem/che_사기_춘화첩.php
@@ -5,16 +5,15 @@ use \sammo\General;
class che_사기_춘화첩 extends \sammo\BaseItem{
- protected $id = 19;
protected $rawName = '춘화첩';
protected $name = '춘화첩(사기)';
- protected $info = '[전투] 사기 보정 +14';
+ protected $info = '[전투] 사기 보정 +15';
protected $cost = 200;
protected $consumable = false;
public function onCalcStat(General $general, string $statName, $value, $aux=null){
if($statName === 'bonusAtmos'){
- return $value + 14;
+ return $value + 15;
}
return $value;
}
diff --git a/hwe/sammo/ActionItem/che_사기_탁주.php b/hwe/sammo/ActionItem/che_사기_탁주.php
index a15c1c3a..d10e4959 100644
--- a/hwe/sammo/ActionItem/che_사기_탁주.php
+++ b/hwe/sammo/ActionItem/che_사기_탁주.php
@@ -9,7 +9,6 @@ use \sammo\WarUnitTrigger\능력치변경;
class che_사기_탁주 extends \sammo\BaseItem{
- protected $id = 3;
protected $rawName = '탁주';
protected $name = '탁주(사기)';
protected $info = '[전투] 사기 +6. 1회용';
diff --git a/hwe/sammo/ActionItem/che_상성보정_과실주.php b/hwe/sammo/ActionItem/che_상성보정_과실주.php
new file mode 100644
index 00000000..9ac09829
--- /dev/null
+++ b/hwe/sammo/ActionItem/che_상성보정_과실주.php
@@ -0,0 +1,28 @@
+getOppose();
+ $attackCoef = $unit->getCrewType()->getAttackCoef($oppose->getCrewType());
+ if($attackCoef <= 1){
+ return null;
+ }
+ return new WarUnitTriggerCaller(
+ new 전투력보정($unit, 1.1, 0.9)
+ );
+ }
+}
diff --git a/hwe/sammo/ActionItem/che_숙련_동작.php b/hwe/sammo/ActionItem/che_숙련_동작.php
new file mode 100644
index 00000000..60e6084d
--- /dev/null
+++ b/hwe/sammo/ActionItem/che_숙련_동작.php
@@ -0,0 +1,20 @@
+[전투] 페이즈마다 40% 확률로 치료 발동(아군 피해 1/3 감소, 부상 회복)';
@@ -29,7 +28,7 @@ class che_의술_상한잡병론 extends \sammo\BaseItem{
return new WarUnitTriggerCaller(
new che_전투치료시도($unit, BaseWarUnitTrigger::TYPE_ITEM+BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*301),
new che_전투치료발동($unit, BaseWarUnitTrigger::TYPE_ITEM)
-
+
);
}
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_의술_정력견혈산.php b/hwe/sammo/ActionItem/che_의술_정력견혈산.php
new file mode 100644
index 00000000..145d18c0
--- /dev/null
+++ b/hwe/sammo/ActionItem/che_의술_정력견혈산.php
@@ -0,0 +1,34 @@
+[전투] 페이즈마다 40% 확률로 치료 발동(아군 피해 1/3 감소, 부상 회복)';
+ protected $cost = 200;
+ protected $consumable = false;
+
+ public function getPreTurnExecuteTriggerList(General $general):?GeneralTriggerCaller{
+ return new GeneralTriggerCaller(
+ new GeneralTrigger\che_도시치료($general)
+ );
+ }
+
+ public function getBattlePhaseSkillTriggerList(\sammo\WarUnit $unit): ?WarUnitTriggerCaller
+ {
+ return new WarUnitTriggerCaller(
+ new che_전투치료시도($unit, BaseWarUnitTrigger::TYPE_ITEM+BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*302),
+ new che_전투치료발동($unit, BaseWarUnitTrigger::TYPE_ITEM)
+
+ );
+ }
+}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_의술_청낭서.php b/hwe/sammo/ActionItem/che_의술_청낭서.php
index 40dab3fd..6034ee56 100644
--- a/hwe/sammo/ActionItem/che_의술_청낭서.php
+++ b/hwe/sammo/ActionItem/che_의술_청낭서.php
@@ -11,7 +11,6 @@ use sammo\WarUnitTriggerCaller;
class che_의술_청낭서 extends \sammo\BaseItem{
- protected $id = 23;
protected $rawName = '청낭서';
protected $name = '청낭서(의술)';
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복
[전투] 페이즈마다 40% 확률로 치료 발동(아군 피해 1/3 감소, 부상 회복)';
@@ -29,7 +28,7 @@ class che_의술_청낭서 extends \sammo\BaseItem{
return new WarUnitTriggerCaller(
new che_전투치료시도($unit, BaseWarUnitTrigger::TYPE_ITEM+BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*302),
new che_전투치료발동($unit, BaseWarUnitTrigger::TYPE_ITEM)
-
+
);
}
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_의술_태평청령.php b/hwe/sammo/ActionItem/che_의술_태평청령.php
index 875d536f..55abef16 100644
--- a/hwe/sammo/ActionItem/che_의술_태평청령.php
+++ b/hwe/sammo/ActionItem/che_의술_태평청령.php
@@ -11,7 +11,6 @@ use sammo\WarUnitTrigger\che_전투치료시도;
class che_의술_태평청령 extends \sammo\BaseItem{
- protected $id = 24;
protected $rawName = '태평청령';
protected $name = '태평청령(의술)';
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복
[전투] 페이즈마다 40% 확률로 치료 발동(아군 피해 1/3 감소, 부상 회복)';
@@ -29,7 +28,7 @@ class che_의술_태평청령 extends \sammo\BaseItem{
return new WarUnitTriggerCaller(
new che_전투치료시도($unit, BaseWarUnitTrigger::TYPE_ITEM+BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*303),
new che_전투치료발동($unit, BaseWarUnitTrigger::TYPE_ITEM)
-
+
);
}
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_저격_매화수전.php b/hwe/sammo/ActionItem/che_저격_매화수전.php
index a72e9c55..b0671002 100644
--- a/hwe/sammo/ActionItem/che_저격_매화수전.php
+++ b/hwe/sammo/ActionItem/che_저격_매화수전.php
@@ -12,7 +12,6 @@ use \sammo\WarUnitTrigger\che_저격발동;
class che_저격_매화수전 extends \sammo\BaseItem{
- protected $id = 70;
protected $rawName = '매화수전';
protected $name = '매화수전(저격)';
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+20';
diff --git a/hwe/sammo/ActionItem/che_저격_비도.php b/hwe/sammo/ActionItem/che_저격_비도.php
index 5ab2c493..d9bf9509 100644
--- a/hwe/sammo/ActionItem/che_저격_비도.php
+++ b/hwe/sammo/ActionItem/che_저격_비도.php
@@ -12,7 +12,6 @@ use \sammo\WarUnitTrigger\che_저격발동;
class che_저격_비도 extends \sammo\BaseItem{
- protected $id = 70;
protected $rawName = '비도';
protected $name = '비도(저격)';
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+20';
diff --git a/hwe/sammo/ActionItem/che_저격_수극.php b/hwe/sammo/ActionItem/che_저격_수극.php
index 9a31fc5a..7fe46fc9 100644
--- a/hwe/sammo/ActionItem/che_저격_수극.php
+++ b/hwe/sammo/ActionItem/che_저격_수극.php
@@ -10,7 +10,6 @@ use \sammo\BaseWarUnitTrigger;
class che_저격_수극 extends \sammo\BaseItem{
- protected $id = 2;
protected $rawName = '수극';
protected $name = '수극(저격)';
protected $info = '[전투] 전투 개시 전 50% 확률로 저격 시도. 1회용';
diff --git a/hwe/sammo/ActionItem/che_저지_삼황내문.php b/hwe/sammo/ActionItem/che_저지_삼황내문.php
new file mode 100644
index 00000000..19576c22
--- /dev/null
+++ b/hwe/sammo/ActionItem/che_저지_삼황내문.php
@@ -0,0 +1,34 @@
+isAttacker()){
+ return null;
+ }
+ if($unit->getPhase() >= 2){
+ return null;
+ }
+ if($unit->getPhase() == 1 && Util::randBool(0.5)){
+ return null;
+ }
+
+ return new WarUnitTriggerCaller(
+ new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, true, '특수', '저지'),
+ new che_저지발동($unit)
+ );
+ }
+}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_전략_평만지장도.php b/hwe/sammo/ActionItem/che_전략_평만지장도.php
new file mode 100644
index 00000000..7d0635f7
--- /dev/null
+++ b/hwe/sammo/ActionItem/che_전략_평만지장도.php
@@ -0,0 +1,21 @@
+getVar('leadership') * 0.15;
+ }
+ return $value;
+ }
+}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_척사_오악진형도.php b/hwe/sammo/ActionItem/che_척사_오악진형도.php
new file mode 100644
index 00000000..cc814aeb
--- /dev/null
+++ b/hwe/sammo/ActionItem/che_척사_오악진형도.php
@@ -0,0 +1,23 @@
+getOppose()->getCrewType();
+ if($opposeCrewType->reqCities || $opposeCrewType->reqRegions){
+ return [1.15, 0.85];
+ }
+ return [1, 1];
+ }
+}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_치료_도소연명.php b/hwe/sammo/ActionItem/che_치료_도소연명.php
index dc9138e4..eec9e54e 100644
--- a/hwe/sammo/ActionItem/che_치료_도소연명.php
+++ b/hwe/sammo/ActionItem/che_치료_도소연명.php
@@ -7,7 +7,6 @@ use \sammo\GeneralTriggerCaller;
class che_치료_도소연명 extends \sammo\BaseItem{
- protected $id = 9;
protected $rawName = '도소연명';
protected $name = '도소연명(치료)';
protected $info = '[군사] 턴 실행 전 부상 회복.';
diff --git a/hwe/sammo/ActionItem/che_치료_무후행군.php b/hwe/sammo/ActionItem/che_치료_무후행군.php
index e5c2f922..8dc781e9 100644
--- a/hwe/sammo/ActionItem/che_치료_무후행군.php
+++ b/hwe/sammo/ActionItem/che_치료_무후행군.php
@@ -7,7 +7,6 @@ use \sammo\GeneralTriggerCaller;
class che_치료_무후행군 extends \sammo\BaseItem{
- protected $id = 8;
protected $rawName = '무후행군';
protected $name = '무후행군(치료)';
protected $info = '[군사] 턴 실행 전 부상 회복.';
diff --git a/hwe/sammo/ActionItem/che_치료_오석산.php b/hwe/sammo/ActionItem/che_치료_오석산.php
index 561c941b..df8fa889 100644
--- a/hwe/sammo/ActionItem/che_치료_오석산.php
+++ b/hwe/sammo/ActionItem/che_치료_오석산.php
@@ -7,7 +7,6 @@ use \sammo\GeneralTriggerCaller;
class che_치료_오석산 extends \sammo\BaseItem{
- protected $id = 7;
protected $rawName = '오석산';
protected $name = '오석산(치료)';
protected $info = '[군사] 턴 실행 전 부상 회복.';
diff --git a/hwe/sammo/ActionItem/che_치료_정력견혈.php b/hwe/sammo/ActionItem/che_치료_정력견혈.php
index cb66fe7b..79eaa7a3 100644
--- a/hwe/sammo/ActionItem/che_치료_정력견혈.php
+++ b/hwe/sammo/ActionItem/che_치료_정력견혈.php
@@ -7,7 +7,6 @@ use \sammo\GeneralTriggerCaller;
class che_치료_정력견혈 extends \sammo\BaseItem{
- protected $id = 11;
protected $rawName = '정력견혈';
protected $name = '정력견혈(치료)';
protected $info = '[군사] 턴 실행 전 부상 회복.';
diff --git a/hwe/sammo/ActionItem/che_치료_칠엽청점.php b/hwe/sammo/ActionItem/che_치료_칠엽청점.php
index 23225735..99d6f20f 100644
--- a/hwe/sammo/ActionItem/che_치료_칠엽청점.php
+++ b/hwe/sammo/ActionItem/che_치료_칠엽청점.php
@@ -7,7 +7,6 @@ use \sammo\GeneralTriggerCaller;
class che_치료_칠엽청점 extends \sammo\BaseItem{
- protected $id = 10;
protected $rawName = '칠엽청점';
protected $name = '칠엽청점(치료)';
protected $info = '[군사] 턴 실행 전 부상 회복.';
diff --git a/hwe/sammo/ActionItem/che_치료_환약.php b/hwe/sammo/ActionItem/che_치료_환약.php
index 30bd692e..39f5d5e5 100644
--- a/hwe/sammo/ActionItem/che_치료_환약.php
+++ b/hwe/sammo/ActionItem/che_치료_환약.php
@@ -7,7 +7,6 @@ use \sammo\GeneralTriggerCaller;
class che_치료_환약 extends \sammo\BaseItem{
- protected $id = 1;
protected $rawName = '환약';
protected $name = '환약(치료)';
protected $info = '[군사] 턴 실행 전 부상 회복. 1회용';
diff --git a/hwe/sammo/ActionItem/che_필살_둔갑천서.php b/hwe/sammo/ActionItem/che_필살_둔갑천서.php
new file mode 100644
index 00000000..98b4b404
--- /dev/null
+++ b/hwe/sammo/ActionItem/che_필살_둔갑천서.php
@@ -0,0 +1,20 @@
+통솔 +1, 무력 +1, 지력 +1';
diff --git a/hwe/sammo/ActionItem/event_전투특기_격노.php b/hwe/sammo/ActionItem/event_전투특기_격노.php
index 26fd8d14..ebc7fa79 100644
--- a/hwe/sammo/ActionItem/event_전투특기_격노.php
+++ b/hwe/sammo/ActionItem/event_전투특기_격노.php
@@ -10,10 +10,9 @@ use sammo\WarUnitTrigger\che_격노발동;
class event_전투특기_격노 extends \sammo\BaseItem{
- protected $id = 74;
protected $rawName = '비급';
protected $name = '비급(격노)';
- protected $info = '[전투] 상대방 필살 시 격노(필살) 발동, 회피 시도시 25% 확률로 격노 발동, 공격 시 일정 확률로 진노(1페이즈 추가)';
+ protected $info = '[전투] 상대방 필살 시 격노(필살) 발동, 회피 시도시 25% 확률로 격노 발동, 공격 시 일정 확률로 진노(1페이즈 추가), 격노마다 대미지 20% 추가 중첩';
protected $cost = 100;
protected $buyable = true;
protected $consumable = false;
diff --git a/hwe/sammo/ActionItem/event_전투특기_견고.php b/hwe/sammo/ActionItem/event_전투특기_견고.php
index 71e0a009..143cb5e0 100644
--- a/hwe/sammo/ActionItem/event_전투특기_견고.php
+++ b/hwe/sammo/ActionItem/event_전투특기_견고.php
@@ -9,7 +9,6 @@ use sammo\WarUnitTriggerCaller;
class event_전투특기_견고 extends \sammo\BaseItem{
- protected $id = 74;
protected $rawName = '비급';
protected $name = '비급(견고)';
protected $info = '[전투] 상대 필살 확률 -20%p, 상대 계략 시도시 성공 확률 -10%p, 부상 없음, 아군 피해 -10%';
diff --git a/hwe/sammo/ActionItem/event_전투특기_공성.php b/hwe/sammo/ActionItem/event_전투특기_공성.php
index fc30fcb0..a26a47e2 100644
--- a/hwe/sammo/ActionItem/event_전투특기_공성.php
+++ b/hwe/sammo/ActionItem/event_전투특기_공성.php
@@ -9,7 +9,6 @@ use \sammo\WarUnitCity;
class event_전투특기_공성 extends \sammo\BaseItem{
- protected $id = 53;
protected $rawName = '비급';
protected $name = '비급(공성)';
protected $info = '[군사] 차병 계통 징·모병비 -10%
[전투] 성벽 공격 시 대미지 +100%,
공격시 상대 병종에/수비시 자신 병종 숙련에 차병 숙련을 가산';
@@ -22,7 +21,7 @@ class event_전투특기_공성 extends \sammo\BaseItem{
if(in_array($turnType, ['징병', '모병'])){
if($varType == 'cost' && $aux['armType'] == GameUnitConst::T_SIEGE) return $value * 0.9;
}
-
+
return $value;
}
diff --git a/hwe/sammo/ActionItem/event_전투특기_궁병.php b/hwe/sammo/ActionItem/event_전투특기_궁병.php
index 182c5212..81381a69 100644
--- a/hwe/sammo/ActionItem/event_전투특기_궁병.php
+++ b/hwe/sammo/ActionItem/event_전투특기_궁병.php
@@ -8,7 +8,6 @@ use \sammo\GameUnitConst;
class event_전투특기_궁병 extends \sammo\BaseItem{
- protected $id = 51;
protected $rawName = '비급';
protected $name = '비급(궁병)';
protected $info = '[군사] 궁병 계통 징·모병비 -10%
[전투] 회피 확률 +20%p,
공격시 상대 병종에/수비시 자신 병종 숙련에 궁병 숙련을 가산';
@@ -21,7 +20,7 @@ class event_전투특기_궁병 extends \sammo\BaseItem{
if(in_array($turnType, ['징병', '모병'])){
if($varType == 'cost' && $aux['armType'] == GameUnitConst::T_ARCHER) return $value * 0.9;
}
-
+
return $value;
}
diff --git a/hwe/sammo/ActionItem/event_전투특기_귀병.php b/hwe/sammo/ActionItem/event_전투특기_귀병.php
index 3bcc2201..e11ea251 100644
--- a/hwe/sammo/ActionItem/event_전투특기_귀병.php
+++ b/hwe/sammo/ActionItem/event_전투특기_귀병.php
@@ -8,7 +8,6 @@ use \sammo\WarUnit;
class event_전투특기_귀병 extends \sammo\BaseItem{
- protected $id = 40;
protected $rawName = '비급';
protected $name = '비급(귀병)';
protected $info = '[군사] 귀병 계통 징·모병비 -10%
[전투] 계략 성공 확률 +20%p,
공격시 상대 병종에/수비시 자신 병종 숙련에 귀병 숙련을 가산';
@@ -21,7 +20,7 @@ class event_전투특기_귀병 extends \sammo\BaseItem{
if(in_array($turnType, ['징병', '모병'])){
if($varType == 'cost' && $aux['armType'] == GameUnitConst::T_WIZARD) return $value * 0.9;
}
-
+
return $value;
}
diff --git a/hwe/sammo/ActionItem/event_전투특기_기병.php b/hwe/sammo/ActionItem/event_전투특기_기병.php
index 36a163b4..e19ad59b 100644
--- a/hwe/sammo/ActionItem/event_전투특기_기병.php
+++ b/hwe/sammo/ActionItem/event_전투특기_기병.php
@@ -8,7 +8,6 @@ use \sammo\WarUnit;
class event_전투특기_기병 extends \sammo\BaseItem{
- protected $id = 52;
protected $rawName = '비급';
protected $name = '비급(기병)';
protected $info = '[군사] 기병 계통 징·모병비 -10%
[전투] 수비 시 대미지 +10%, 공격 시 대미지 +20%,
공격시 상대 병종에/수비시 자신 병종 숙련에 기병 숙련을 가산';
@@ -21,7 +20,7 @@ class event_전투특기_기병 extends \sammo\BaseItem{
if(in_array($turnType, ['징병', '모병'])){
if($varType == 'cost' && $aux['armType'] == GameUnitConst::T_CAVALRY) return $value * 0.9;
}
-
+
return $value;
}
diff --git a/hwe/sammo/ActionItem/event_전투특기_돌격.php b/hwe/sammo/ActionItem/event_전투특기_돌격.php
index 6a1b8401..dd858663 100644
--- a/hwe/sammo/ActionItem/event_전투특기_돌격.php
+++ b/hwe/sammo/ActionItem/event_전투특기_돌격.php
@@ -11,7 +11,6 @@ use \sammo\WarUnitTrigger\che_돌격지속;
class event_전투특기_돌격 extends \sammo\BaseItem{
- protected $id = 60;
protected $rawName = '비급';
protected $name = '비급(돌격)';
protected $info = '[전투] 공격 시 대등/유리한 병종에게는 퇴각 전까지 전투, 공격 시 페이즈 + 2, 공격 시 대미지 +5%';
diff --git a/hwe/sammo/ActionItem/event_전투특기_무쌍.php b/hwe/sammo/ActionItem/event_전투특기_무쌍.php
index 6d53e9f9..02524aa3 100644
--- a/hwe/sammo/ActionItem/event_전투특기_무쌍.php
+++ b/hwe/sammo/ActionItem/event_전투특기_무쌍.php
@@ -8,7 +8,6 @@ use \sammo\Util;
class event_전투특기_무쌍 extends \sammo\BaseItem{
- protected $id = 61;
protected $rawName = '비급';
protected $name = '비급(무쌍)';
protected $info = '[전투] 대미지 +5%, 피해 -2%, 공격 시 필살 확률 +10%p,
승리 수의 로그 비례로 대미지 상승(10회 ⇒ +5%, 40회 ⇒ +15%)
승리 수의 로그 비례로 피해 감소(10회 ⇒ -2%, 40회 ⇒ -6%)';
diff --git a/hwe/sammo/ActionItem/event_전투특기_반계.php b/hwe/sammo/ActionItem/event_전투특기_반계.php
index 23fb5faf..30e2bd4f 100644
--- a/hwe/sammo/ActionItem/event_전투특기_반계.php
+++ b/hwe/sammo/ActionItem/event_전투특기_반계.php
@@ -12,7 +12,6 @@ use \sammo\WarUnitTrigger\che_반계발동;
class event_전투특기_반계 extends \sammo\BaseItem{
- protected $id = 45;
protected $rawName = '비급';
protected $name = '비급(반계)';
protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 40% 확률로 되돌림, 반목 성공시 대미지 추가(+60% → +150%)';
diff --git a/hwe/sammo/ActionItem/event_전투특기_보병.php b/hwe/sammo/ActionItem/event_전투특기_보병.php
index d38e7e51..36af41ad 100644
--- a/hwe/sammo/ActionItem/event_전투특기_보병.php
+++ b/hwe/sammo/ActionItem/event_전투특기_보병.php
@@ -8,7 +8,6 @@ use \sammo\WarUnit;
class event_전투특기_보병 extends \sammo\BaseItem{
- protected $id = 50;
protected $rawName = '비급';
protected $name = '비급(보병)';
protected $info = '[군사] 보병 계통 징·모병비 -10%
[전투] 공격 시 아군 피해 -10%, 수비 시 아군 피해 -20%,
공격시 상대 병종에/수비시 자신 병종 숙련에 보병 숙련을 가산';
@@ -22,7 +21,7 @@ class event_전투특기_보병 extends \sammo\BaseItem{
if(in_array($turnType, ['징병', '모병'])){
if($varType == 'cost' && $aux['armType'] == GameUnitConst::T_FOOTMAN) return $value * 0.9;
}
-
+
return $value;
}
diff --git a/hwe/sammo/ActionItem/event_전투특기_신산.php b/hwe/sammo/ActionItem/event_전투특기_신산.php
index d0fecdfa..e782e9cc 100644
--- a/hwe/sammo/ActionItem/event_전투특기_신산.php
+++ b/hwe/sammo/ActionItem/event_전투특기_신산.php
@@ -7,7 +7,6 @@ use \sammo\WarUnit;
class event_전투특기_신산 extends \sammo\BaseItem{
- protected $id = 41;
protected $rawName = '비급';
protected $name = '비급(신산)';
protected $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +10%p
[전투] 계략 시도 확률 +20%p, 계략 성공 확률 +20%p';
@@ -20,7 +19,7 @@ class event_전투특기_신산 extends \sammo\BaseItem{
if($turnType == '계략'){
if($varType == 'success') return $value + 0.1;
}
-
+
return $value;
}
diff --git a/hwe/sammo/ActionItem/event_전투특기_신중.php b/hwe/sammo/ActionItem/event_전투특기_신중.php
index 32f35244..2c678932 100644
--- a/hwe/sammo/ActionItem/event_전투특기_신중.php
+++ b/hwe/sammo/ActionItem/event_전투특기_신중.php
@@ -7,7 +7,6 @@ use \sammo\WarUnit;
class event_전투특기_신중 extends \sammo\BaseItem{
- protected $id = 44;
protected $rawName = '비급';
protected $name = '비급(신중)';
protected $info = '[전투] 계략 성공 확률 100%';
diff --git a/hwe/sammo/ActionItem/event_전투특기_위압.php b/hwe/sammo/ActionItem/event_전투특기_위압.php
index 3c17cf42..3c056660 100644
--- a/hwe/sammo/ActionItem/event_전투특기_위압.php
+++ b/hwe/sammo/ActionItem/event_전투특기_위압.php
@@ -10,7 +10,6 @@ use \sammo\WarUnitTrigger\che_위압발동;
class event_전투특기_위압 extends \sammo\BaseItem{
- protected $id = 63;
protected $rawName = '비급';
protected $name = '비급(위압)';
protected $info = '[전투] 첫 페이즈 위압 발동(적 공격, 회피 불가, 사기 5 감소)';
diff --git a/hwe/sammo/ActionItem/event_전투특기_의술.php b/hwe/sammo/ActionItem/event_전투특기_의술.php
index 654c08cd..0b87382e 100644
--- a/hwe/sammo/ActionItem/event_전투특기_의술.php
+++ b/hwe/sammo/ActionItem/event_전투특기_의술.php
@@ -13,7 +13,6 @@ use sammo\WarUnitTriggerCaller;
class event_전투특기_의술 extends \sammo\BaseItem{
- protected $id = 73;
protected $rawName = '비급';
protected $name = '비급(의술)';
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복
[전투] 페이즈마다 40% 확률로 치료 발동(아군 피해 1/3 감소, 부상 회복)';
diff --git a/hwe/sammo/ActionItem/event_전투특기_저격.php b/hwe/sammo/ActionItem/event_전투특기_저격.php
index 223f7a5f..dd02abb8 100644
--- a/hwe/sammo/ActionItem/event_전투특기_저격.php
+++ b/hwe/sammo/ActionItem/event_전투특기_저격.php
@@ -10,7 +10,6 @@ use \sammo\WarUnitTrigger\che_저격발동;
class event_전투특기_저격 extends \sammo\BaseItem{
- protected $id = 70;
protected $rawName = '비급';
protected $name = '비급(저격)';
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+20';
diff --git a/hwe/sammo/ActionItem/event_전투특기_집중.php b/hwe/sammo/ActionItem/event_전투특기_집중.php
index a0a0d344..5b0c9b1a 100644
--- a/hwe/sammo/ActionItem/event_전투특기_집중.php
+++ b/hwe/sammo/ActionItem/event_전투특기_집중.php
@@ -7,7 +7,6 @@ use \sammo\WarUnit;
class event_전투특기_집중 extends \sammo\BaseItem{
- protected $id = 43;
protected $rawName = '비급';
protected $name = '비급(집중)';
protected $info = '[전투] 계략 성공 시 대미지 +50%';
diff --git a/hwe/sammo/ActionItem/event_전투특기_징병.php b/hwe/sammo/ActionItem/event_전투특기_징병.php
index c253a5b0..ceb94e50 100644
--- a/hwe/sammo/ActionItem/event_전투특기_징병.php
+++ b/hwe/sammo/ActionItem/event_전투특기_징병.php
@@ -7,10 +7,9 @@ use \sammo\WarUnit;
class event_전투특기_징병 extends \sammo\BaseItem{
- protected $id = 72;
protected $rawName = '비급';
protected $name = '비급(징병)';
- protected $info = '[군사] 징·모병비 -50%, 통솔 순수 능력치 보정 +15%';
+ protected $info = '[군사] 징·모병비 -50%, 통솔 순수 능력치 보정 +25%';
protected $cost = 100;
protected $buyable = true;
protected $consumable = false;
@@ -20,13 +19,13 @@ class event_전투특기_징병 extends \sammo\BaseItem{
if(in_array($turnType, ['징병', '모병'])){
if($varType == 'cost') return $value * 0.5;
}
-
+
return $value;
}
public function onCalcStat(General $general, string $statName, $value, $aux=null){
if($statName === 'leadership'){
- return $value *= 1.15;
+ return $value + $general->getVar('leadership') * 0.25;
}
return $value;
}
diff --git a/hwe/sammo/ActionItem/event_전투특기_척사.php b/hwe/sammo/ActionItem/event_전투특기_척사.php
index f8bed76e..bdae2626 100644
--- a/hwe/sammo/ActionItem/event_전투특기_척사.php
+++ b/hwe/sammo/ActionItem/event_전투특기_척사.php
@@ -7,7 +7,6 @@ use \sammo\WarUnit;
class event_전투특기_척사 extends \sammo\BaseItem{
- protected $id = 75;
protected $rawName = '비급';
protected $name = '비급(척사)';
protected $info = '[전투] 지역·도시 병종 상대로 대미지 +20%, 아군 피해 -20%';
diff --git a/hwe/sammo/ActionItem/event_전투특기_필살.php b/hwe/sammo/ActionItem/event_전투특기_필살.php
index 5efa89f5..a606819a 100644
--- a/hwe/sammo/ActionItem/event_전투특기_필살.php
+++ b/hwe/sammo/ActionItem/event_전투특기_필살.php
@@ -9,7 +9,6 @@ use sammo\WarUnitTrigger\che_필살강화_회피불가;
class event_전투특기_필살 extends \sammo\BaseItem{
- protected $id = 71;
protected $rawName = '비급';
protected $name = '비급(필살)';
protected $info = '[전투] 필살 확률 +30%p, 필살 발동시 대상 회피 불가';
diff --git a/hwe/sammo/ActionItem/event_전투특기_환술.php b/hwe/sammo/ActionItem/event_전투특기_환술.php
index 4f37fe3c..42b50b56 100644
--- a/hwe/sammo/ActionItem/event_전투특기_환술.php
+++ b/hwe/sammo/ActionItem/event_전투특기_환술.php
@@ -7,7 +7,6 @@ use \sammo\WarUnit;
class event_전투특기_환술 extends \sammo\BaseItem{
- protected $id = 42;
protected $rawName = '비급';
protected $name = '비급(환술)';
protected $info = '[전투] 계략 성공 확률 +10%p, 계략 성공 시 대미지 +30%';
diff --git a/hwe/sammo/BaseItem.php b/hwe/sammo/BaseItem.php
index 1b73d684..a8a9061f 100644
--- a/hwe/sammo/BaseItem.php
+++ b/hwe/sammo/BaseItem.php
@@ -7,7 +7,6 @@ use \sammo\General;
class BaseItem implements iAction{
use \sammo\DefaultAction;
- protected $id = 0;
protected $rawName = '-';
protected $name = '-';
protected $info = '';
@@ -30,7 +29,7 @@ class BaseItem implements iAction{
}
return static::class;
}
-
+
function getCost(){
return $this->cost;
}
diff --git a/hwe/sammo/Command/General/che_물자조달.php b/hwe/sammo/Command/General/che_물자조달.php
index ed63bc7b..6ef41490 100644
--- a/hwe/sammo/Command/General/che_물자조달.php
+++ b/hwe/sammo/Command/General/che_물자조달.php
@@ -79,13 +79,20 @@ class che_물자조달 extends Command\GeneralCommand{
$score *= getDomesticExpLevelBonus($general->getVar('explevel'));
$score *= Util::randRange(0.8, 1.2);
+ $successRatio = 0.1;
+ $failRatio = 0.3;
+
+ $successRatio = $general->onCalcDomestic('조달', 'success', $successRatio);
+ $failRatio = $general->onCalcDomestic('조달', 'fail', $failRatio);
+ $normalRatio = 1 - $failRatio - $successRatio;
+
$pick = Util::choiceRandomUsingWeight([
- 'fail'=>0.3,
- 'success'=>0.1,
- 'normal'=>0.6
+ 'fail'=>$failRatio,
+ 'success'=>$successRatio,
+ 'normal'=>$normalRatio
]);
$score *= CriticalScoreEx($pick);
-
+ $score = $general->onCalcDomestic('조달', 'score', $score);
$score = Util::round($score);
$scoreText = number_format($score, 0);
diff --git a/hwe/sammo/Command/General/che_장비매매.php b/hwe/sammo/Command/General/che_장비매매.php
index ea8f4954..2e4a0172 100644
--- a/hwe/sammo/Command/General/che_장비매매.php
+++ b/hwe/sammo/Command/General/che_장비매매.php
@@ -173,11 +173,13 @@ class che_장비매매 extends Command\GeneralCommand
if ($buying) {
$logger->pushGeneralActionLog("{$itemName}>{$josaUl} 구입했습니다. <1>$date>");
$general->increaseVarWithLimit('gold', -$cost, 0);
- $general->setVar($itemType, $itemCode);
+ $general->setItem($itemType, $itemCode);
+ $general->onArbitraryAction($general, '장비매매', '구매', ['itemCode' => $itemCode]);
} else {
$logger->pushGeneralActionLog("{$itemName}>{$josaUl} 판매했습니다. <1>$date>");
$general->increaseVarWithLimit('gold', $cost / 2);
- $general->deleteItem($itemType);
+ $general->onArbitraryAction($general, '장비매매', '판매', ['itemCode' => $itemCode]);
+ $general->setItem($itemType, null);
}
$exp = 10;
@@ -209,96 +211,39 @@ class che_장비매매 extends Command\GeneralCommand
continue;
}
$values[] = [
- 'id'=>$itemCode,
- 'name'=>$item->getName(),
- 'reqSecu'=>$item->getReqSecu(),
- 'cost'=>$item->getCost(),
- 'info'=>$item->getInfo(),
- 'isBuyable'=>$item->isBuyable(),//항상 true지만, 일관성을 위해
+ 'id' => $itemCode,
+ 'name' => $item->getName(),
+ 'reqSecu' => $item->getReqSecu(),
+ 'cost' => $item->getCost(),
+ 'info' => $item->getInfo(),
+ 'isBuyable' => $item->isBuyable(), //항상 true지만, 일관성을 위해
];
}
$itemList[$itemType] = [
- 'typeName'=>$typeName,
- 'values'=>$values
+ 'typeName' => $typeName,
+ 'values' => $values
];
}
$ownItem = [];
- foreach($general->getItems() as $itemType => $item){
+ foreach ($general->getItems() as $itemType => $item) {
$ownItem[$itemType] = [
- 'id'=>$item->getRawClassName(),
- 'name'=>$item->getName(),
- 'reqSecu'=>$item->getReqSecu(),
- 'cost'=>$item->getCost(),
- 'info'=>$item->getInfo(),
- 'isBuyable'=>$item->isBuyable(),
+ 'id' => $item->getRawClassName(),
+ 'name' => $item->getName(),
+ 'reqSecu' => $item->getReqSecu(),
+ 'cost' => $item->getCost(),
+ 'info' => $item->getInfo(),
+ 'isBuyable' => $item->isBuyable(),
];
}
return [
'procRes' => [
- 'citySecu'=>$citySecu,
- 'gold'=>$general->getVar('gold'),
- 'itemList'=>$itemList,
- 'ownItem'=>$ownItem,
+ 'citySecu' => $citySecu,
+ 'gold' => $general->getVar('gold'),
+ 'itemList' => $itemList,
+ 'ownItem' => $ownItem,
]
];
}
-
- public function getForm(): string
- {
- $form = [];
-
- $db = DB::db();
-
- $citySecu = $db->queryFirstField('SELECT secu FROM city WHERE city = %i', $this->generalObj->getCityID());
- $gold = $this->generalObj->getVar('gold');
-
- ob_start();
-?>
-
-
- 장비를 구입하거나 매각합니다.
- 현재 구입 불가능한 것은 붉은색으로 표시됩니다.
- 현재 도시 치안 : = $citySecu ?> 현재 자금 : = $gold ?>
- 장비 :
-
-getNationID() != $destNationID) {
@@ -92,9 +93,11 @@ class che_화계 extends Command\GeneralCommand
throw new \sammo\MustNotBeReachedException();
}
$maxGenScore = max($maxGenScore, $genScore);
+ $probCorrection = $destGeneral->onCalcStat($destGeneral, 'sabotageDefence', $probCorrection);
}
$prob = $maxGenScore / GameConst::$sabotageProbCoefByStat;
+ $prob += $probCorrection;
$prob += $destCity['secu'] / $destCity['secu_max'] / 5; //최대 20%p
$prob += $destCity['supply'] ? 0.1 : 0;
diff --git a/hwe/sammo/DefaultAction.php b/hwe/sammo/DefaultAction.php
index f6aec8e8..6b77c848 100644
--- a/hwe/sammo/DefaultAction.php
+++ b/hwe/sammo/DefaultAction.php
@@ -46,4 +46,8 @@ trait DefaultAction{
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return null;
}
+
+ public function onArbitraryAction(General $general, string $actionType, ?string $phase=null, $aux=null): null|array{
+ return $aux;
+ }
}
\ No newline at end of file
diff --git a/hwe/sammo/GameConstBase.php b/hwe/sammo/GameConstBase.php
index 8941f651..11b97f7d 100644
--- a/hwe/sammo/GameConstBase.php
+++ b/hwe/sammo/GameConstBase.php
@@ -251,17 +251,25 @@ class GameConstBase
'che_치료_환약' => 0, 'che_저격_수극' => 0, 'che_사기_탁주' => 0,
'che_훈련_청주' => 0, 'che_계략_이추' => 0, 'che_계략_향낭' => 0,
- 'che_의술_청낭서' => 1, 'che_의술_태평청령' => 1, 'che_의술_상한잡병론' => 1,
- 'che_부적_태현청생부' => 1,
- 'che_저격_매화수전' => 1, 'che_저격_비도' => 1,
+ 'che_의술_정력견혈산' => 1, 'che_의술_청낭서' => 1, 'che_의술_태평청령' => 1, 'che_의술_상한잡병론' => 1,
+ 'che_보물_도기' => 1, 'che_조달_주판' => 1,
+ 'che_내정_납금박산로' => 1, 'che_전략_평만지장도' => 1, 'che_숙련_동작' => 1, 'che_명성_구석' => 1,
+
+ 'che_척사_오악진형도' => 1, 'che_격노_구정신단경' => 1, 'che_징병_낙주' => 1,
+ 'che_저격_매화수전' => 1, 'che_저격_비도'=>1, 'che_위압_조목삭' => 1, 'che_공성_묵자' => 1,
+ 'che_집중_전국책' => 1, 'che_환술_논어집해' => 1,
+
+ 'che_반계저지_박혁론' => 1, 'che_부적_태현청생부' => 1, 'che_저지_삼황내문' => 1,
+ 'che_행동_서촉지형도' => 1, 'che_간파_노군입산부' => 1, 'che_불굴_상편' => 1,
+ 'che_약탈_옥벽' => 1,
+
+ 'che_농성_주서음부' => 1, 'che_농성_위공자병법' => 1,
'che_계략_육도' => 1, 'che_계략_삼략' => 1,
- 'che_반계_백우선' => 1,
- 'che_행동_서촉지형도' => 1,
-
- 'che_훈련_과실주' => 1, 'che_훈련_이강주' => 1, 'che_사기_두강주' => 1, 'che_사기_보령압주' => 1,
+ 'che_상성보정_과실주' => 1,
+ 'che_능력치_지력_이강주' => 1, 'che_능력치_무력_두강주' => 1, 'che_능력치_통솔_보령압주' => 1,
'che_훈련_철벽서' => 1, 'che_훈련_단결도' => 1, 'che_사기_춘화첩' => 1, 'che_사기_초선화' => 1,
- 'che_회피_태평요술' => 1, 'che_회피_둔갑천서' => 1,
+ 'che_회피_태평요술' => 1, 'che_필살_둔갑천서' => 1,
]
];
diff --git a/hwe/sammo/General.php b/hwe/sammo/General.php
index 8b359ec4..21f16585 100644
--- a/hwe/sammo/General.php
+++ b/hwe/sammo/General.php
@@ -183,6 +183,7 @@ class General implements iAction
{
if ($itemCode === null) {
$this->deleteItem($itemKey);
+ return;
}
$this->setVar($itemKey, $itemCode);
@@ -536,6 +537,7 @@ class General implements iAction
}
$dexType = "dex{$armType}";
+ $exp = $this->onCalcStat($this, 'addDex', $exp, ['armType'=>$armType]);
$this->increaseVar($dexType, $exp);
}
@@ -1009,6 +1011,25 @@ class General implements iAction
return $amount;
}
+ public function onArbitraryAction(General $general, string $actionType, ?string $phase=null, $aux=null): null|array{
+ foreach (array_merge([
+ $this->nationType,
+ $this->officerLevelObj,
+ $this->specialDomesticObj,
+ $this->specialWarObj,
+ $this->personalityObj,
+ $this->getCrewTypeObj(),
+ $this->inheritBuffObj,
+ ], $this->itemObjs) as $iObj) {
+ if (!$iObj) {
+ continue;
+ }
+ /** @var iAction $iObj */
+ $aux = $iObj->onArbitraryAction($general, $actionType, $phase, $aux);
+ }
+ return $aux;
+ }
+
public function getWarPowerMultiplier(WarUnit $unit): array
{
//xxx:$unit
diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php
index 08189fb8..9ff69c9e 100644
--- a/hwe/sammo/GeneralAI.php
+++ b/hwe/sammo/GeneralAI.php
@@ -4144,7 +4144,7 @@ class GeneralAI
$wallIncome = getWallIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
$income = $riceIncome + $wallIncome;
- $outcome = getOutcome(100, $dedicationList);
+ $outcome = Util::valueFit(getOutcome(100, $dedicationList), 1);
$bill = intval($income / $outcome * 90); // 수입의 90% 만 지급
if ($nation['rice'] + $income - $outcome > $this->nationPolicy->reqNationRice * 2) {
diff --git a/hwe/sammo/WarUnitTrigger/che_반계시도.php b/hwe/sammo/WarUnitTrigger/che_반계시도.php
index 33b76036..8ed41609 100644
--- a/hwe/sammo/WarUnitTrigger/che_반계시도.php
+++ b/hwe/sammo/WarUnitTrigger/che_반계시도.php
@@ -22,6 +22,9 @@ class che_반계시도 extends BaseWarUnitTrigger{
if(!$oppose->hasActivatedSkill('계략')){
return true;
}
+ if($self->hasActivatedSkill('반계불가')){
+ return true;
+ }
if(!Util::randBool($this->prob)){
return true;
diff --git a/hwe/sammo/WarUnitTrigger/che_약탈발동.php b/hwe/sammo/WarUnitTrigger/che_약탈발동.php
new file mode 100644
index 00000000..3c424d1b
--- /dev/null
+++ b/hwe/sammo/WarUnitTrigger/che_약탈발동.php
@@ -0,0 +1,59 @@
+hasActivatedSkill('약탈')) {
+ return true;
+ }
+
+ if ($selfEnv['약탈발동'] ?? false) {
+ return true;
+ }
+ $selfEnv['약탈발동'] = true;
+
+ $general = $self->getGeneral();
+
+ if (!($oppose instanceof WarUnitGeneral)) {
+ return true;
+ }
+
+
+ $general->increaseVarWithLimit('atmos', $selfEnv['addAtmos'], 0, GameConst::$maxAtmosByWar);
+
+ $opposeGeneral = $oppose->getGeneral();
+
+ $theftGold = $opposeGeneral->getVar('gold') * $selfEnv['theftRatio'];
+ $theftRice = $opposeGeneral->getVar('rice') * $selfEnv['theftRatio'];
+
+ $opposeGeneral->increaseVarWithLimit('gold', -$theftGold, 0);
+ $opposeGeneral->increaseVarWithLimit('rice', -$theftRice, 0);
+
+ $general->increaseVar('gold', $theftGold);
+ $general->increaseVar('rice', $theftRice);
+
+ $self->getLogger()->pushGeneralActionLog("상대를 약탈>했다!", ActionLogger::PLAIN);
+ $self->getLogger()->pushGeneralBattleDetailLog("상대에게서 금 {$theftGold}, 쌀 {$theftRice} 만큼을 약탈>했다!", ActionLogger::PLAIN);
+ $oppose->getLogger()->pushGeneralActionLog("상대에게 약탈>당했다!", ActionLogger::PLAIN);
+ $oppose->getLogger()->pushGeneralBattleDetailLog("상대에게 금 {$theftGold}, 쌀 {$theftRice} 만큼을 약탈>당했다!", ActionLogger::PLAIN);
+
+ $this->processConsumableItem();
+
+ return true;
+ }
+}
diff --git a/hwe/sammo/WarUnitTrigger/che_약탈시도.php b/hwe/sammo/WarUnitTrigger/che_약탈시도.php
new file mode 100644
index 00000000..e22c6477
--- /dev/null
+++ b/hwe/sammo/WarUnitTrigger/che_약탈시도.php
@@ -0,0 +1,47 @@
+object = $unit;
+ $this->raiseType = $raiseType;
+ $this->ratio = $ratio;
+ $this->theftRatio = $theftRatio;
+ }
+
+ protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
+ assert($self instanceof WarUnitGeneral, 'General만 발동 가능');
+ if($self->getPhase() !== 0 && $oppose->getPhase() !== 0){
+ return true;
+ }
+ if(!($oppose instanceof WarUnitGeneral)){
+ return true;
+ }
+ if($self->hasActivatedSkill('약탈')){
+ return true;
+ }
+ if($self->hasActivatedSkill('약탈불가')){
+ return true;
+ }
+ if(!Util::randBool($this->ratio)){
+ return true;
+ }
+
+ $self->activateSkill('약탈');
+ $selfEnv['theftRatio'] = $this->theftRatio;
+
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/hwe/sammo/WarUnitTrigger/전투력보정.php b/hwe/sammo/WarUnitTrigger/전투력보정.php
new file mode 100644
index 00000000..a06931de
--- /dev/null
+++ b/hwe/sammo/WarUnitTrigger/전투력보정.php
@@ -0,0 +1,25 @@
+object = $unit;
+ }
+
+ protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
+ $self->multiplyWarPowerMultiply($this->attackerWarPowerMultiplier);
+ $oppose->multiplyWarPowerMultiply($this->defenderWarPowerMultiplier);
+
+ $this->processConsumableItem();
+
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/hwe/sammo/iAction.php b/hwe/sammo/iAction.php
index d0393dec..54b5588e 100644
--- a/hwe/sammo/iAction.php
+++ b/hwe/sammo/iAction.php
@@ -18,4 +18,6 @@ interface iAction{
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller;
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller;
//NOTE: getBattleEndSkillTriggerList도 필요한가?
+
+ public function onArbitraryAction(General $general, string $actionType, ?string $phase=null, ?array $aux=null): null|array;
}
\ No newline at end of file