병종이 행동에 전투에 event로 개입 가능하도록 수정 중

This commit is contained in:
2019-04-29 01:01:47 +09:00
parent bbfe5c2ab0
commit afeaf01fdb
8 changed files with 141 additions and 24 deletions
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace sammo;
class GameUnitInitTriggerBase extends ObjectTrigger{
static protected $priority = 10000;
public function __construct(WarUnit $unit){
$this->object = $unit;
$this->unitType = $unit->getCrewType();
}
public function action(?array $env=null, $arg=null):?array{
/** @var WarUnitGeneral $attacker */
/** @var WarUnit $defender */
[$attacker, $defender] = $arg;
$attackerCrewType = $attacker->getCrewType();
$defenderCrewType = $defender->getCrewType();
//TODO: 충차는 성벽 상대로 부상입지 않음
return $env;
}
}