불가침, 종전 메시지

This commit is contained in:
2020-05-03 00:31:04 +09:00
parent 83e8cfc2cc
commit ce5ad89d5e
16 changed files with 477 additions and 98 deletions
@@ -105,8 +105,6 @@ class che_불가침제의 extends Command\NationCommand{
$this->runnableConstraints=[
ConstraintHelper::BeChief(),
ConstraintHelper::NotBeNeutral(),
ConstraintHelper::OccupiedCity(),
ConstraintHelper::SuppliedCity(),
ConstraintHelper::ExistsDestNation(),
ConstraintHelper::DisallowDiplomacyBetweenStatus([
0 => '아국과 이미 교전중입니다.',
@@ -137,7 +135,7 @@ class che_불가침제의 extends Command\NationCommand{
$destNationName = getNationStaticInfo($this->arg['destNationID'])['name'];
$year = $this->arg['year'];
$month = $this->arg['month'];
return "{$destNationName}】에게 {$year}{$month}까지 {$commandName}";
return "{$destNationName}】에게 {$year}{$month}월까지 {$commandName}";
}
@@ -191,11 +189,13 @@ class che_불가침제의 extends Command\NationCommand{
$validMinutes = max(30, $env['turnterm']*3);
$validUntil->add(new \DateInterval("PT{$validMinutes}M"));
$josaWa = JosaUtil::pick($nationName, '와');
$msg = new DiplomaticMessage(
Message::MSGTYPE_DIPLOMACY,
$src,
$dest,
"{$nationName} {$year}{$month}까지 불가침 제의 서신",
"{$nationName}{$josaWa} {$year}{$month}월까지 불가침 제의 서신",
$now,
$validUntil,
[
@@ -283,7 +283,7 @@ class che_불가침제의 extends Command\NationCommand{
<?php foreach(Util::range(1, 12+1) as $formMonth): ?>
<option value='<?=$formMonth?>'><?=$formMonth?></option>
<?php endforeach; ?>
</select>월까지
</select>월까지
<input type=button id="commonSubmit" value="<?=$this->getName()?>">
<?php
return ob_get_clean();