game: 성벽이 선제공격

This commit is contained in:
2023-05-12 00:07:01 +09:00
parent 18f9d87a29
commit 4e504e9679
3 changed files with 14 additions and 1 deletions
+12
View File
@@ -37,13 +37,25 @@ class DummyGeneral extends General
}
}
public function setCrewType(GameUnitDetail $crewType){
$this->crewType = $crewType;
}
public function getBattleInitSkillTriggerList(WarUnit $unit): ?WarUnitTriggerCaller
{
//crewType에만 반응하자
if($this->crewType !== null){
return $this->crewType->getBattleInitSkillTriggerList($unit);
}
return new WarUnitTriggerCaller();
}
public function getBattlePhaseSkillTriggerList(WarUnit $unit): ?WarUnitTriggerCaller
{
//crewType에만 반응하자
if($this->crewType !== null){
return $this->crewType->getBattlePhaseSkillTriggerList($unit);
}
return new WarUnitTriggerCaller();
}
+1 -1
View File
@@ -41,7 +41,7 @@ class GameUnitConstBase{
[],//성벽은 공격할 수 없다.
[self::T_FOOTMAN=>1.2],
['성벽입니다.','생성할 수 없습니다.'],
null, null, null
null, ['che_선제사격시도', 'che_선제사격발동'], null
],
[
+1
View File
@@ -25,6 +25,7 @@ class WarUnitCity extends WarUnit{
$this->logger = $general->getLogger();
$this->crewType = GameUnitConst::byID(GameUnitConst::CREWTYPE_CASTLE);
$general->setCrewType($this->crewType);
$this->hp = $this->getCityVar('def') * 10;