Compare commits

..
Author SHA1 Message Date
devsam 2f00aee947 아주 약간 효율적으로 수정 2024-01-26 22:17:06 +09:00
devsam dd2b032fa3 리뷰 내용 반영 2024-01-26 22:13:44 +09:00
devsam 69f4d8e2c7 fix: 사전거병 후 군주가 사라지는 경우에 대한 수정 2023-12-29 12:07:59 +09:00
3 changed files with 10 additions and 3 deletions
@@ -90,6 +90,9 @@ class BuildNationCandidate extends \sammo\BaseAPI
return '거병을 실패했습니다.';
}
$general->setVar('killturn', $env['killturn']);
$general->applyDB($db);
return null;
}
}
+2 -2
View File
@@ -806,7 +806,7 @@ class General extends GeneralBase implements iAction
continue;
}
/** @var iAction $iObj */
$value = $iObj->onCalcStat($general, $statName, $value, $aux);
$value = $iObj->onCalcStat($this, $statName, $value, $aux);
}
return $value;
}
@@ -819,7 +819,7 @@ class General extends GeneralBase implements iAction
continue;
}
/** @var iAction $iObj */
$value = $iObj->onCalcOpposeStat($general, $statName, $value, $aux);
$value = $iObj->onCalcOpposeStat($this, $statName, $value, $aux);
}
return $value;
}
+5 -1
View File
@@ -3439,8 +3439,12 @@ class GeneralAI
$cmd = buildGeneralCommandClass($this->rng->choice($candidate), $this->general, $this->env);
if (!$cmd->hasFullConditionMet()) {
return buildGeneralCommandClass('che_물자조달', $this->general, $this->env);
$cmd = buildGeneralCommandClass('che_물자조달', $this->general, $this->env);
if (!$cmd->hasFullConditionMet()) {
$cmd = buildGeneralCommandClass('che_견문', $this->general, $this->env);
}
}
return $cmd;
}