trigger 타입에서 $tunType을 한글로 변경. 성격 추가. 계략 성공 확률을 onCalcDomestic으로 통합.

This commit is contained in:
2018-09-13 01:43:32 +09:00
parent 1efef1fdcd
commit d981265f12
37 changed files with 366 additions and 52 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace sammo\TriggerCharacter;
use \sammo\iActionTrigger;
use \sammo\General;
class che_패권 implements iActionTrigger{
use \sammo\DefaultActionTrigger;
static $id = 3;
static $name = '패권';
static $info = '훈련 +5, 징·모병 비용 +20%';
public function onCalcDomestic(string $turnType, string $varType, float $value):float{
if(in_array($turnType, ['징병', '모병'])){
if($varType == 'cost'){
return $value * 1.2;
}
}
return $value;
}
public function onPreGeneralStatUpdate(General $general, string $statName, $value){
if($statName == 'bonusTrain'){
return $value + 5;
}
return $value;
}
}