feat: 입대독력, 병장기지원 추가, 기타 개인전략 수정
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace sammo\ActionBuff;
|
||||
|
||||
use \sammo\iAction;
|
||||
|
||||
class g65_징병비용무시 implements iAction
|
||||
{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux = null): float
|
||||
{
|
||||
if ($varType == 'cost' && in_array($turnType, ['징병', '모병'])) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace sammo\ActionBuff;
|
||||
|
||||
use \sammo\iAction;
|
||||
|
||||
class g65_징병인구무시 implements iAction
|
||||
{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux = null): float
|
||||
{
|
||||
if ($turnType == '징집인구' && $varType == 'score') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
namespace sammo\Command\UserAction;
|
||||
|
||||
use sammo\ActionBuff\g65_징병비용무시;
|
||||
use \sammo\Command;
|
||||
|
||||
class g65_병장기지원 extends Command\UserActionCommand{
|
||||
static protected $actionName = '병장기지원';
|
||||
|
||||
protected function argTest():bool{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getBrief(): string
|
||||
{
|
||||
return '병장기 지원';
|
||||
}
|
||||
|
||||
public function getCommandDetailTitle(): string
|
||||
{
|
||||
$postReqTurn = $this->getPostReqTurn();
|
||||
return "이번턴의 징병/모병 비용 무시(재사용 대기 {$postReqTurn})";
|
||||
}
|
||||
|
||||
protected function init(){
|
||||
//아무것도 하지 않음
|
||||
$this->fullConditionConstraints=[];
|
||||
|
||||
}
|
||||
|
||||
public function getPreReqTurn():int{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function getPostReqTurn():int{
|
||||
return 60;
|
||||
}
|
||||
|
||||
public function getCost():array{
|
||||
return [0, 0];
|
||||
}
|
||||
|
||||
public function run(\Sammo\RandUtil $rng):bool{
|
||||
$general = $this->generalObj;
|
||||
$general->addInstantBuff(new g65_징병비용무시(), 1);
|
||||
|
||||
$date = $general->getTurnTime($general::TURNTIME_HM);
|
||||
|
||||
$logger = $general->getLogger();
|
||||
$logger->pushGeneralActionLog("상인에게 병사들의 병장기를 지원받습니다. <1>$date</>");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
namespace sammo\Command\UserAction;
|
||||
|
||||
use sammo\ActionBuff\g65_내정성공;
|
||||
use \sammo\Command;
|
||||
use sammo\DB;
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
namespace sammo\Command\UserAction;
|
||||
|
||||
use sammo\ActionBuff\g65_징병인구무시;
|
||||
use \sammo\Command;
|
||||
|
||||
class g65_입대독려 extends Command\UserActionCommand{
|
||||
static protected $actionName = '입대독려';
|
||||
|
||||
protected function argTest():bool{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getBrief(): string
|
||||
{
|
||||
return '입대 독려';
|
||||
}
|
||||
|
||||
public function getCommandDetailTitle(): string
|
||||
{
|
||||
$postReqTurn = $this->getPostReqTurn();
|
||||
return "이번턴의 징병/모병 인구 무시(재사용 대기 {$postReqTurn})";
|
||||
}
|
||||
|
||||
protected function init(){
|
||||
//아무것도 하지 않음
|
||||
$this->fullConditionConstraints=[];
|
||||
|
||||
}
|
||||
|
||||
public function getPreReqTurn():int{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function getPostReqTurn():int{
|
||||
return 60;
|
||||
}
|
||||
|
||||
public function getCost():array{
|
||||
return [0, 0];
|
||||
}
|
||||
|
||||
public function run(\Sammo\RandUtil $rng):bool{
|
||||
$general = $this->generalObj;
|
||||
$general->addInstantBuff(new g65_징병인구무시(), 1);
|
||||
|
||||
$date = $general->getTurnTime($general::TURNTIME_HM);
|
||||
|
||||
$logger = $general->getLogger();
|
||||
$logger->pushGeneralActionLog("성 밖의 주민들에게 입대를 요청합니다. <1>$date</>");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ class g65_철야내정 extends Command\UserActionCommand{
|
||||
|
||||
public function run(\Sammo\RandUtil $rng):bool{
|
||||
$general = $this->generalObj;
|
||||
$general->addInstantBuff(new g65_내정성공(), 3);
|
||||
$general->addInstantBuff(new g65_내정성공(), 2);
|
||||
|
||||
$logger = $general->getLogger();
|
||||
$logger->pushGeneralActionLog("2턴 간 내정을 철저히 지휘합니다.");
|
||||
|
||||
@@ -403,6 +403,7 @@ class GameConstBase
|
||||
'g65_병사연회',
|
||||
'g65_철야내정',
|
||||
'g65_의원소환',
|
||||
'g65_병장기지원',
|
||||
]
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user