feat: 접경귀환, 다 전략 조건 추가

This commit is contained in:
2023-12-25 14:54:44 +00:00
parent f5dfb83356
commit 05eb4366b1
5 changed files with 135 additions and 11 deletions
@@ -3,6 +3,7 @@ namespace sammo\Command\UserAction;
use sammo\ActionBuff\g65_징병비용무시;
use \sammo\Command;
use sammo\Constraint\ConstraintHelper;
class g65_병장기지원 extends Command\UserActionCommand{
static protected $actionName = '병장기지원';
@@ -23,9 +24,10 @@ class g65_병장기지원 extends Command\UserActionCommand{
}
protected function init(){
//아무것도 하지 않음
$this->fullConditionConstraints=[];
$this->fullConditionConstraints = [
ConstraintHelper::NotBeNeutral(),
ConstraintHelper::OccupiedCity()
];
}
public function getPreReqTurn():int{
@@ -41,6 +43,10 @@ class g65_병장기지원 extends Command\UserActionCommand{
}
public function run(\Sammo\RandUtil $rng):bool{
if (!$this->hasFullConditionMet()) {
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
}
$general = $this->generalObj;
$general->addInstantBuff(new g65_징병비용무시(), 1);