Files
core/hwe/sammo/ActionSpecialWar/che_신산.php
T

38 lines
1.1 KiB
PHP

<?php
namespace sammo\ActionSpecialWar;
use \sammo\iAction;
use \sammo\General;
use \sammo\SpecialityConst;
use \sammo\WarUnit;
class che_신산 implements iAction{
use \sammo\DefaultAction;
protected $id = 41;
protected $name = '신산';
protected $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +10%p<br>[전투] 계략 시도 확률 +20%p, 계략 성공 확률 +20%p';
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_INTEL,
];
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
if($turnType == '계략'){
if($varType == 'success') return $value + 0.1;
}
return $value;
}
public function onCalcStat(General $general, string $statName, $value, $aux=null){
if($statName === 'warMagicTrialProb'){
return $value + 0.2;
}
if($statName === 'warMagicSuccessProb'){
return $value + 0.2;
}
return $value;
}
}