버그 수정, 허보 구현

This commit is contained in:
2020-03-21 20:17:39 +09:00
parent afbbbaa855
commit d918234bb8
5 changed files with 297 additions and 5 deletions
+16 -4
View File
@@ -31,7 +31,17 @@ class che_수몰 extends Command\NationCommand{
static public $reqArg = true;
protected function argTest():bool{
$this->arg = [];
if(!key_exists('destCityID', $this->arg)){
return false;
}
if(CityConst::byID($this->arg['destCityID']) === null){
return false;
}
$destCityID = $this->arg['destCityID'];
$this->arg = [
'destCityID'=>$destCityID,
];
return true;
}
@@ -43,6 +53,8 @@ class che_수몰 extends Command\NationCommand{
$this->setCity();
$this->setNation(['strategic_cmd_limit']);
$this->setDestCity($this->arg['destCityID'], null);
$this->setDestNation($this->destCity['nation']);
$this->runnableConstraints=[
ConstraintHelper::OccupiedCity(),
@@ -51,7 +63,6 @@ class che_수몰 extends Command\NationCommand{
ConstraintHelper::NotOccupiedDestCity(),
ConstraintHelper::BattleGroundCity(),
ConstraintHelper::AvailableStrategicCommand(),
ConstraintHelper::OccupiedDestCity()
];
}
@@ -151,8 +162,9 @@ class che_수몰 extends Command\NationCommand{
$josaYiNation = JosaUtil::pick($nationName, '이');
$logger->pushGeneralHistoryLog('<M>수몰</>을 발동');
$logger->pushNationalHistoryLog("<L><b>【전략】</b></><D><b>{$nationName}</b></>{$josaYiNation} <G><b>{$destCityName}</b></>에 <M>수몰</>을 발동하였습니다.");
$logger->pushGeneralHistoryLog("<G><b>{$destCityName}</b></>에 <M>수몰</>을 발동");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <G><b>{$destCityName}</b></>에 <M>수몰</>을 발동");
$logger->pushGlobalHistoryLog("<L><b>【전략】</b></><D><b>{$nationName}</b></>{$josaYiNation} <G><b>{$destCityName}</b></>에 <M>수몰</>을 발동하였습니다.");
$db->update('nation', ['strategic_cmd_limit' => $this->getPostReqTurn()], 'nation=%i', $nationID);