BaseWarUnitTrigger, TriggerCaller 구조 변경, 클래스 반영
This commit is contained in:
+4
-45
@@ -298,57 +298,16 @@ function processWar_NG(
|
||||
$initCaller->merge($defender->getGeneral()->getBattleInitSkillTriggerList($defender));
|
||||
|
||||
$initCaller->fire([], [$attacker, $defender]);
|
||||
//스킬류, 아이템, 스킬 및 아이템 적용 순이어야 할 것
|
||||
|
||||
/*
|
||||
foreach(Util::zip(
|
||||
$attacker->checkBattleBeginSkill(),
|
||||
$defender->checkBattleBeginSkill()
|
||||
) as $b){
|
||||
//doNothing
|
||||
}
|
||||
|
||||
$attacker->checkBattleBeginItem();
|
||||
$defender->checkBattleBeginItem();
|
||||
|
||||
$attacker->applyBattleBeginSkillAndItem();
|
||||
$defender->applyBattleBeginSkillAndItem();
|
||||
*/
|
||||
}
|
||||
|
||||
$attacker->beginPhase();
|
||||
$defender->beginPhase();
|
||||
|
||||
foreach(Util::zip(
|
||||
$attacker->checkPreActiveSkill(),
|
||||
$defender->checkPreActiveSkill()
|
||||
) as $b){
|
||||
//doNothing
|
||||
}
|
||||
|
||||
foreach(Util::zip(
|
||||
$attacker->checkActiveSkill(),
|
||||
$defender->checkActiveSkill()
|
||||
) as $b){
|
||||
//doNothing
|
||||
}
|
||||
//NOTE: 마법은 checkActiveSkill, checkPostActiveSkill 내에서 반영
|
||||
|
||||
foreach(Util::zip(
|
||||
$attacker->checkPostActiveSkill(),
|
||||
$defender->checkPostActiveSkill()
|
||||
) as $b){
|
||||
//doNothing
|
||||
}
|
||||
//NOTE: 반계류 등의 스킬을 post에서 반영
|
||||
|
||||
foreach(Util::zip(
|
||||
$attacker->applyActiveSkill(),
|
||||
$defender->applyActiveSkill()
|
||||
) as $b){
|
||||
//doNothing
|
||||
}
|
||||
$battleCaller = $attacker->getGeneral()->getBattlePhaseSkillTriggerList($attacker);
|
||||
$battleCaller->merge($defender->getGeneral()->getBattlePhaseSkillTriggerList($defender));
|
||||
|
||||
$battleCaller->fire([], [$attacker, $defender]);
|
||||
|
||||
$deadDefender = $attacker->calcDamage();
|
||||
$deadAttacker = $defender->calcDamage();
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ class che_사기_탁주 extends \sammo\BaseItem{
|
||||
protected static $buyable = true;
|
||||
|
||||
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller([
|
||||
new 능력치변경($unit, BaseWarUnitTrigger::TYPE_CONSUMABLE_ITEM, 'atmos', '+', 3),
|
||||
]);
|
||||
return new WarUnitTriggerCaller(
|
||||
new 능력치변경($unit, BaseWarUnitTrigger::TYPE_CONSUMABLE_ITEM, 'atmos', '+', 3)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -18,17 +18,17 @@ class che_의술_청낭서 extends \sammo\BaseItem{
|
||||
protected static $consumable = false;
|
||||
|
||||
public function getPreTurnExecuteTriggerList(General $general):?GeneralTriggerCaller{
|
||||
return new GeneralTriggerCaller([
|
||||
return new GeneralTriggerCaller(
|
||||
new GeneralTrigger\che_도시치료($general)
|
||||
]);
|
||||
);
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(\sammo\WarUnit $unit): ?WarUnitTriggerCaller
|
||||
{
|
||||
return new WarUnitTriggerCaller([
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_전투치료시도($unit, BaseWarUnitTrigger::TYPE_ITEM),
|
||||
new che_전투치료발동($unit, BaseWarUnitTrigger::TYPE_ITEM)
|
||||
|
||||
]);
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\GeneralTrigger;
|
||||
use \sammo\GeneralTriggerCaller;
|
||||
use \sammo\BaseWarUnitTrigger;
|
||||
|
||||
class che_의술_태평청령 extends \sammo\BaseItem{
|
||||
|
||||
@@ -14,17 +15,17 @@ class che_의술_태평청령 extends \sammo\BaseItem{
|
||||
protected static $consumable = false;
|
||||
|
||||
public function getPreTurnExecuteTriggerList(General $general):?GeneralTriggerCaller{
|
||||
return new GeneralTriggerCaller([
|
||||
return new GeneralTriggerCaller(
|
||||
new GeneralTrigger\che_도시치료($general)
|
||||
]);
|
||||
);
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(\sammo\WarUnit $unit): ?WarUnitTriggerCaller
|
||||
{
|
||||
return new WarUnitTriggerCaller([
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_전투치료시도($unit, BaseWarUnitTrigger::TYPE_ITEM),
|
||||
new che_전투치료발동($unit, BaseWarUnitTrigger::TYPE_ITEM)
|
||||
|
||||
]);
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -18,9 +18,9 @@ class che_저격_수극 extends \sammo\BaseItem{
|
||||
protected static $buyable = true;
|
||||
|
||||
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller([
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_저격시도($unit, BaseWarUnitTrigger::TYPE_CONSUMABLE_ITEM, 0.2, 20, 40),
|
||||
new che_저격발동($unit)
|
||||
]);
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\BaseWarUnitTrigger;
|
||||
|
||||
class che_훈련_청주 extends \sammo\BaseItem{
|
||||
|
||||
@@ -13,8 +14,8 @@ class che_훈련_청주 extends \sammo\BaseItem{
|
||||
protected static $buyable = true;
|
||||
|
||||
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller([
|
||||
new 능력치변경($unit, BaseWarUnitTrigger::TYPE_CONSUMABLE_ITEM, 'train', '+', 3),
|
||||
]);
|
||||
return new WarUnitTriggerCaller(
|
||||
new 능력치변경($unit, BaseWarUnitTrigger::TYPE_CONSUMABLE_ITEM, 'train', '+', 3)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -23,8 +23,8 @@ class che_견고 implements iAction{
|
||||
];
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller([
|
||||
return new WarUnitTriggerCaller(
|
||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '필살불가', '위압불가', '격노불가', '계략약화')
|
||||
]);
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
use \sammo\WarUnit;
|
||||
use \sammo\BaseWarUnitTrigger;
|
||||
|
||||
class che_돌격 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
@@ -34,8 +35,8 @@ class che_돌격 implements iAction{
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller([
|
||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '회피불가')
|
||||
]);
|
||||
return new WarUnitTriggerCaller(
|
||||
(new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '회피불가'))->setPriority(BaseWarUnitTrigger::PRIORITY_BEGIN + 200)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -5,9 +5,10 @@ use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
use \sammo\WarUnit;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
use \sammo\BaseWarUnitTrigger;
|
||||
use \sammo\WarUnitTrigger\WarActivateSkills;
|
||||
use \sammo\WarUnitTrigger\che_반목시도;
|
||||
use \sammo\WarUnitTrigger\che_반목발동;
|
||||
use \sammo\WarUnitTrigger\che_반계시도;
|
||||
use \sammo\WarUnitTrigger\che_반계발동;
|
||||
|
||||
class che_반계 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
@@ -30,10 +31,10 @@ class che_반계 implements iAction{
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller([
|
||||
return new WarUnitTriggerCaller(
|
||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '계략약화'),
|
||||
new che_반목시도($unit),
|
||||
new che_반목발동($unit)
|
||||
]);
|
||||
new che_반계시도($unit),
|
||||
new che_반계발동($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -26,9 +26,9 @@ class che_위압 implements iAction{
|
||||
if($unit->getPhase() != 0){
|
||||
return null;
|
||||
}
|
||||
return new WarUnitTriggerCaller([
|
||||
new che_위압시도(),
|
||||
new che_위압발동()
|
||||
]);
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_위압시도($unit),
|
||||
new che_위압발동($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -8,13 +8,19 @@ abstract class BaseWarUnitTrigger extends ObjectTrigger{
|
||||
const TYPE_ITEM = 1;
|
||||
const TYPE_CONSUMABLE_ITEM = 2;
|
||||
|
||||
protected $raiseType;
|
||||
protected $raiseType = self::TYPE_NONE;
|
||||
|
||||
public function __construct(WarUnit $unit, int $raiseType = 0){
|
||||
$this->object = $unit;
|
||||
$this->raiseType = $raiseType;
|
||||
}
|
||||
|
||||
public function getUniqueID():string{
|
||||
$priority = $this->priority;
|
||||
$fqn = static::class;
|
||||
return "{$priority}_{$fqn}_{$this->raiseType}";
|
||||
}
|
||||
|
||||
public function action(?array $env=null, $arg=null):?array{
|
||||
if($env === null){
|
||||
$env = [];
|
||||
|
||||
+10
-1
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
use sammo\WarUnitTrigger as WarUnitTrigger;
|
||||
|
||||
class General implements iAction{
|
||||
use LazyVarUpdater;
|
||||
@@ -506,7 +507,15 @@ class General implements iAction{
|
||||
return $caller;
|
||||
}
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
$caller = new WarUnitTriggerCaller();
|
||||
$caller = new WarUnitTriggerCaller(
|
||||
new WarUnitTrigger\che_필살시도($unit),
|
||||
new WarUnitTrigger\che_필살발동($unit),
|
||||
new WarUnitTrigger\che_회피시도($unit),
|
||||
new WarUnitTrigger\che_회피발동($unit),
|
||||
new WarUnitTrigger\che_계략시도($unit),
|
||||
new WarUnitTrigger\che_계략발동($unit),
|
||||
new WarUnitTrigger\che_계략실패($unit)
|
||||
);
|
||||
foreach(array_merge([
|
||||
$this->nationType,
|
||||
$this->levelObj,
|
||||
|
||||
@@ -8,7 +8,7 @@ use sammo\Util;
|
||||
use sammo\JosaUtil;
|
||||
|
||||
class che_도시치료 extends BaseGeneralTrigger{
|
||||
static protected $priority = 10000;
|
||||
protected $priority = 10000;
|
||||
|
||||
public function action(?array $env=null, $arg=null):?array{
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ use sammo\Util;
|
||||
use sammo\JosaUtil;
|
||||
|
||||
class che_병력군량소모 extends BaseGeneralTrigger{
|
||||
static protected $priority = 50000;
|
||||
protected $priority = 50000;
|
||||
|
||||
public function action(?array $env=null, $arg=null):?array{
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ use sammo\Util;
|
||||
use sammo\JosaUtil;
|
||||
|
||||
class che_부상경감 extends BaseGeneralTrigger{
|
||||
static protected $priority = 30010;
|
||||
protected $priority = 30010;
|
||||
|
||||
public function action(?array $env=null, $arg=null):?array{
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ use sammo\Util;
|
||||
use sammo\JosaUtil;
|
||||
|
||||
class che_아이템치료 extends BaseGeneralTrigger{
|
||||
static protected $priority = 20010;
|
||||
protected $priority = 20010;
|
||||
|
||||
public function action(?array $env=null, $arg=null):?array{
|
||||
|
||||
|
||||
@@ -9,17 +9,22 @@ abstract class ObjectTrigger{
|
||||
const PRIORITY_POST = 40000;
|
||||
const PRIORITY_FINAL = 50000;
|
||||
|
||||
static protected $priority;
|
||||
protected $priority;
|
||||
protected $object = null;
|
||||
|
||||
static public function getPriority():int{
|
||||
return static::$priority;
|
||||
public function getPriority():int{
|
||||
return $this->priority;
|
||||
}
|
||||
|
||||
public function setPriority(int $newPriority):self{
|
||||
$this->priority = $newPriority;
|
||||
return $this;
|
||||
}
|
||||
|
||||
abstract public function action(?array $env=null, $arg=null):?array;
|
||||
public function getUniqueID():string{
|
||||
$priority = static::$priority;
|
||||
$objID = spl_object_id($this->object);
|
||||
$priority = $this->priority;
|
||||
$fqn = static::class;
|
||||
return "{$priority}_{$fqn}_{$objID}";
|
||||
return "{$priority}_{$fqn}";
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ abstract class TriggerCaller{
|
||||
return !$this->triggerListByPriority;
|
||||
}
|
||||
|
||||
function __construct(?array $triggerList=null)
|
||||
function __construct(ObjectTrigger ...$triggerList)
|
||||
{
|
||||
if(!$triggerList){
|
||||
return;
|
||||
|
||||
@@ -344,22 +344,6 @@ class WarUnit{
|
||||
}
|
||||
}
|
||||
|
||||
function checkPreActiveSkill(){
|
||||
yield true;
|
||||
}
|
||||
|
||||
function checkActiveSkill(){
|
||||
yield true;
|
||||
}
|
||||
|
||||
function checkPostActiveSkill(){
|
||||
yield true;
|
||||
}
|
||||
|
||||
function applyActiveSkill(){
|
||||
yield true;
|
||||
}
|
||||
|
||||
function getHP():int{
|
||||
throw new NotInheritedMethodException();
|
||||
return 0;
|
||||
|
||||
@@ -9,7 +9,7 @@ use sammo\Util;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class WarActivateSkills extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_INIT;
|
||||
protected $priority = ObjectTrigger::PRIORITY_INIT;
|
||||
|
||||
protected $isSelf;
|
||||
protected $activeSkills;
|
||||
|
||||
@@ -9,7 +9,7 @@ use sammo\Util;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_격노발동 extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_POST + 600;
|
||||
protected $priority = ObjectTrigger::PRIORITY_POST + 600;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!$self->hasActivatedSkill('격노') && !$self->hasActivatedSkill('진노')){
|
||||
|
||||
@@ -9,7 +9,7 @@ use sammo\Util;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_계략발동 extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_POST + 100;
|
||||
protected $priority = ObjectTrigger::PRIORITY_POST + 100;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!$self->hasActivatedSkill('계략')){
|
||||
|
||||
@@ -8,7 +8,7 @@ use sammo\GameUnitDetail;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_계략시도 extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_PRE + 300;
|
||||
protected $priority = ObjectTrigger::PRIORITY_PRE + 300;
|
||||
|
||||
static protected $tableToGeneral = [
|
||||
'위보'=>[1.2, 1.1],
|
||||
|
||||
@@ -9,7 +9,7 @@ use sammo\Util;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_계략실패 extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_POST + 200;
|
||||
protected $priority = ObjectTrigger::PRIORITY_POST + 200;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!$self->hasActivatedSkill('계략실패')){
|
||||
|
||||
@@ -8,8 +8,8 @@ use sammo\GameUnitDetail;
|
||||
use sammo\Util;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_계략발동 extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_POST + 150;
|
||||
class che_반계발동 extends BaseWarUnitTrigger{
|
||||
protected $priority = ObjectTrigger::PRIORITY_POST + 150;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!$self->hasActivatedSkill('반계')){
|
||||
|
||||
@@ -8,7 +8,7 @@ use sammo\GameUnitDetail;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_반계시도 extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_BODY + 300;
|
||||
protected $priority = ObjectTrigger::PRIORITY_BODY + 300;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!$oppose->hasActivatedSkill('계략')){
|
||||
|
||||
@@ -8,7 +8,7 @@ use sammo\GameUnitDetail;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_부상무효 extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_BEGIN + 200;
|
||||
protected $priority = ObjectTrigger::PRIORITY_BEGIN + 200;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
assert($self instanceof WarUnitGeneral, 'General만 발동 가능');
|
||||
|
||||
@@ -8,7 +8,7 @@ use sammo\GameUnitDetail;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_성벽부상무효 extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_BEGIN + 100;
|
||||
protected $priority = ObjectTrigger::PRIORITY_BEGIN + 100;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
assert($self instanceof WarUnitGeneral, 'General만 발동 가능');
|
||||
|
||||
@@ -9,7 +9,7 @@ use sammo\Util;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_위압발동 extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_POST + 700;
|
||||
protected $priority = ObjectTrigger::PRIORITY_POST + 700;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!$self->hasActivatedSkill('위압')){
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
namespace sammo\WarUnitTrigger;
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use sammo\WarUnitGeneral;
|
||||
use sammo\WarUnitCity;
|
||||
use sammo\WarUnit;
|
||||
use sammo\GameUnitDetail;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_위압시도 extends BaseWarUnitTrigger{
|
||||
protected $priority = ObjectTrigger::PRIORITY_BEGIN + 100;
|
||||
|
||||
protected $woundMin;
|
||||
protected $woundMax;
|
||||
protected $ratio;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
assert($self instanceof WarUnitGeneral, 'General만 발동 가능');
|
||||
if($self->getPhase() != 0){
|
||||
return true;
|
||||
}
|
||||
if($self->getHP() < 1000){
|
||||
return true;
|
||||
}
|
||||
if($self->getComputedAtmos() < 90){
|
||||
return true;
|
||||
}
|
||||
if($self->getComputedTrain() < 90){
|
||||
return true;
|
||||
}
|
||||
if($self->hasActivatedSkill('위압불가')){
|
||||
return true;
|
||||
}
|
||||
|
||||
$this->activateSkill('위압');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ use sammo\Util;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_저격발동 extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_POST + 100;
|
||||
protected $priority = ObjectTrigger::PRIORITY_POST + 100;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!$oppose->hasActivatedSkill('저격')){
|
||||
|
||||
@@ -8,7 +8,7 @@ use sammo\GameUnitDetail;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_저격시도 extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_PRE + 100;
|
||||
protected $priority = ObjectTrigger::PRIORITY_PRE + 100;
|
||||
|
||||
protected $woundMin;
|
||||
protected $woundMax;
|
||||
|
||||
@@ -9,7 +9,7 @@ use sammo\Util;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_저지발동 extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_POST; //최우선 순위
|
||||
protected $priority = ObjectTrigger::PRIORITY_POST; //최우선 순위
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!$self->hasActivatedSkill('저지')){
|
||||
|
||||
@@ -8,7 +8,7 @@ use sammo\GameUnitDetail;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_저지시도 extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_PRE; //최 우선 순위
|
||||
protected $priority = ObjectTrigger::PRIORITY_PRE; //최 우선 순위
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
assert($self instanceof WarUnitGeneral, 'General만 발동 가능');
|
||||
|
||||
@@ -9,7 +9,7 @@ use sammo\Util;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_전투치료발동 extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_POST + 300;
|
||||
protected $priority = ObjectTrigger::PRIORITY_POST + 300;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!$self->hasActivatedSkill('치료')){
|
||||
|
||||
@@ -8,7 +8,7 @@ use sammo\GameUnitDetail;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_전투치료시도 extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_PRE + 300;
|
||||
protected $priority = ObjectTrigger::PRIORITY_PRE + 300;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
assert($self instanceof WarUnitGeneral, 'General만 발동 가능');
|
||||
|
||||
@@ -9,7 +9,7 @@ use sammo\Util;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_필살발동 extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_POST + 400;
|
||||
protected $priority = ObjectTrigger::PRIORITY_POST + 400;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!$self->hasActivatedSkill('필살')){
|
||||
|
||||
@@ -8,7 +8,7 @@ use sammo\GameUnitDetail;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_필살시도 extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_PRE + 100;
|
||||
protected $priority = ObjectTrigger::PRIORITY_PRE + 100;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!($self instanceof WarUnitGeneral)){
|
||||
|
||||
@@ -9,7 +9,7 @@ use sammo\Util;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_회피발동 extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_POST + 500;
|
||||
protected $priority = ObjectTrigger::PRIORITY_POST + 500;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!$self->hasActivatedSkill('회피')){
|
||||
|
||||
@@ -8,7 +8,7 @@ use sammo\GameUnitDetail;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_회피시도 extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_PRE + 200;
|
||||
protected $priority = ObjectTrigger::PRIORITY_PRE + 200;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!($self instanceof WarUnitGeneral)){
|
||||
|
||||
@@ -8,7 +8,7 @@ use sammo\GameUnitDetail;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class 능력치변경 extends BaseWarUnitTrigger{
|
||||
static protected $priority = ObjectTrigger::PRIORITY_BEGIN;
|
||||
protected $priority = ObjectTrigger::PRIORITY_BEGIN;
|
||||
|
||||
protected $variable;
|
||||
protected $operator;
|
||||
|
||||
Reference in New Issue
Block a user