Files
core/hwe/sammo/TriggerPersonality/che_출세.php
T
2018-09-13 02:21:42 +09:00

29 lines
755 B
PHP

<?php
namespace sammo\TriggerPersonality;
use \sammo\iActionTrigger;
use \sammo\General;
class che_출세 implements iActionTrigger{
use \sammo\DefaultActionTrigger;
static $id = 6;
static $name = '출세';
static $info = '명성 +10%, 징·모병 비용 +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 == 'experience'){
return $value * 1.1;
}
return $value;
}
}