feat: 의원소환, 철야내정 추가
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace sammo\ActionBuff;
|
||||||
|
|
||||||
|
use sammo\General;
|
||||||
|
use \sammo\iAction;
|
||||||
|
|
||||||
|
class g65_내정성공 implements iAction
|
||||||
|
{
|
||||||
|
use \sammo\DefaultAction;
|
||||||
|
|
||||||
|
static protected $target = ['상업', '농업', '치안', '기술', '인구', '성벽', '수비', '민심'];
|
||||||
|
|
||||||
|
function onCalcDomestic(string $turnType, string $varType, float $value, $aux = null): float
|
||||||
|
{
|
||||||
|
if ($varType == 'success' && in_array($turnType, static::$target)) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,9 +3,6 @@ namespace sammo\Command\UserAction;
|
|||||||
|
|
||||||
use sammo\ActionBuff\g65_사기40;
|
use sammo\ActionBuff\g65_사기40;
|
||||||
use \sammo\Command;
|
use \sammo\Command;
|
||||||
use \sammo\Util;
|
|
||||||
use \sammo\JosaUtil;
|
|
||||||
use sammo\LastTurn;
|
|
||||||
|
|
||||||
class g65_병사연회 extends Command\UserActionCommand{
|
class g65_병사연회 extends Command\UserActionCommand{
|
||||||
static protected $actionName = '병사연회';
|
static protected $actionName = '병사연회';
|
||||||
@@ -22,7 +19,7 @@ class g65_병사연회 extends Command\UserActionCommand{
|
|||||||
public function getCommandDetailTitle(): string
|
public function getCommandDetailTitle(): string
|
||||||
{
|
{
|
||||||
$postReqTurn = $this->getPostReqTurn();
|
$postReqTurn = $this->getPostReqTurn();
|
||||||
return "3턴간 사기 +40(재사용 대기 {$postReqTurn})";
|
return "3턴 간 사기 +40(재사용 대기 {$postReqTurn})";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function init(){
|
protected function init(){
|
||||||
@@ -44,10 +41,12 @@ class g65_병사연회 extends Command\UserActionCommand{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function run(\Sammo\RandUtil $rng):bool{
|
public function run(\Sammo\RandUtil $rng):bool{
|
||||||
|
$general = $this->generalObj;
|
||||||
|
$general->addInstantBuff(new g65_사기40(), 3);
|
||||||
|
|
||||||
$this->generalObj->addInstantBuff(new g65_사기40(), 3);
|
$date = $general->getTurnTime($general::TURNTIME_HM);
|
||||||
$logger = $this->generalObj->getLogger();
|
$logger = $general->getLogger();
|
||||||
$logger->pushGeneralActionLog("병사에게 연회를 열어 3턴간 사기가 40 상승합니다.");
|
$logger->pushGeneralActionLog("병사에게 연회를 열어 3턴간 사기가 40 상승합니다. <1>$date</>");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
<?php
|
||||||
|
namespace sammo\Command\UserAction;
|
||||||
|
|
||||||
|
use sammo\ActionBuff\g65_내정성공;
|
||||||
|
use \sammo\Command;
|
||||||
|
use sammo\DB;
|
||||||
|
|
||||||
|
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;
|
||||||
|
if($general->getVar('injury') == 0){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$general->setVar('injury', 0);
|
||||||
|
$date = $general->getTurnTime($general::TURNTIME_HM);
|
||||||
|
|
||||||
|
$logger = $this->generalObj->getLogger();
|
||||||
|
$logger->pushGeneralActionLog("의원을 불러 부상을 치료합니다. <1>$date</>");
|
||||||
|
$general->applyDB(DB::db());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
<?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 "2턴 간 내정 항상 성공(재사용 대기 {$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_내정성공(), 3);
|
||||||
|
|
||||||
|
$logger = $general->getLogger();
|
||||||
|
$logger->pushGeneralActionLog("2턴 간 내정을 철저히 지휘합니다.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -401,8 +401,8 @@ class GameConstBase
|
|||||||
'개인 전략' => [
|
'개인 전략' => [
|
||||||
'휴식',
|
'휴식',
|
||||||
'g65_병사연회',
|
'g65_병사연회',
|
||||||
/*'g65_철야내정',
|
'g65_철야내정',
|
||||||
'g65_의원소환',*/
|
'g65_의원소환',
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user