Compare commits

..
3 changed files with 10 additions and 3 deletions
@@ -90,6 +90,9 @@ class BuildNationCandidate extends \sammo\BaseAPI
return '거병을 실패했습니다.'; return '거병을 실패했습니다.';
} }
$general->setVar('killturn', $env['killturn']);
$general->applyDB($db);
return null; return null;
} }
} }
+2 -2
View File
@@ -365,14 +365,14 @@ class General extends GeneralBase implements iAction
} }
} }
$this->calcCache[$cKey] = $statValue;
$statValue = Util::clamp($statValue, 0, GameConst::$maxLevel); $statValue = Util::clamp($statValue, 0, GameConst::$maxLevel);
if ($useFloor) { if ($useFloor) {
return Util::toInt($statValue); return Util::toInt($statValue);
} }
$this->calcCache[$cKey] = $statValue;
return $statValue; return $statValue;
} }
+5 -1
View File
@@ -3439,8 +3439,12 @@ class GeneralAI
$cmd = buildGeneralCommandClass($this->rng->choice($candidate), $this->general, $this->env); $cmd = buildGeneralCommandClass($this->rng->choice($candidate), $this->general, $this->env);
if (!$cmd->hasFullConditionMet()) { 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; return $cmd;
} }