forked from devsam/core
game: 1회저지, 회피저지 유니크 추가
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use sammo\WarUnit;
|
||||
use sammo\WarUnitTrigger\che_저지발동;
|
||||
use sammo\WarUnitTrigger\WarActivateSkills;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
|
||||
class che_저지_상황내문 extends \sammo\BaseItem{
|
||||
|
||||
protected $rawName = '상황내문';
|
||||
protected $name = '상황내문(저지)';
|
||||
protected $info = '[전투] 수비 시 저지';
|
||||
protected $cost = 200;
|
||||
protected $consumable = false;
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
if($unit->getPhase() != 0){
|
||||
return null;
|
||||
}
|
||||
|
||||
return new WarUnitTriggerCaller(
|
||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, true, '특수', '저지'),
|
||||
new che_저지발동($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_회피저지_노군입산부 extends \sammo\BaseItem{
|
||||
|
||||
protected $rawName = '노군입산부';
|
||||
protected $name = '노군입산부(회피저지)';
|
||||
protected $info = '[전투] 상대 회피 확률 -15%p';
|
||||
protected $cost = 200;
|
||||
protected $consumable = false;
|
||||
|
||||
public function onCalcOpposeStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warAvoidRatio'){
|
||||
return $value - 0.15;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user