fix: 성벽 선제가 호출조차 되지 않는 버그 수정

This commit is contained in:
2023-05-11 01:58:16 +09:00
parent 265a5ebf5c
commit fd6405ea97
6 changed files with 18 additions and 6 deletions
+1 -1
View File
@@ -328,7 +328,7 @@ function buildGeneralSpecialWarClass(?string $type):BaseSpecial{
function getActionCrewTypeClass(?string $type){
if($type === null || $type === ''){
$type = GameConst::$defaultSpecialWar;
$type = 'None';
}
static $basePath = __NAMESPACE__.'\\ActionCrewType\\';
+1 -1
View File
@@ -409,7 +409,7 @@ function simulateBattle(
);
}
if(count($defenderList) == 0 && extractBattleOrder($city, $attacker) > 0){
if(count($defenderList) && extractBattleOrder($city, $attacker) > 0){
$defenderList[] = $city;
}
+1 -1
View File
@@ -51,7 +51,7 @@ function processWar(string $warSeed, General $attackerGeneral, array $rawAttacke
$defenderList[] = $defenderCandidate;
}
if(count($defenderList) == 0 && extractBattleOrder($city, $attacker) > 0){
if(count($defenderList) && extractBattleOrder($city, $attacker) > 0){
$defenderList[] = $city;
}
+12
View File
@@ -0,0 +1,12 @@
<?php
namespace sammo\ActionCrewType;
use \sammo\iAction;
use \sammo\General;
class None implements iAction{
use \sammo\DefaultAction;
protected $id = -1;
protected $name = '-';
protected $info = '';
}
+2 -2
View File
@@ -334,7 +334,7 @@ class GameUnitConstBase{
[self::T_FOOTMAN=>1.25, self::T_ARCHER=>1.25, self::T_CAVALRY=>1.25, self::T_WIZARD=>1.25, self::T_CASTLE=>1.8, 1106=>1.112],
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2, 1106=>1.067],
['상대에게 돌덩이를 날립니다.'],
['che_성벽부상무효'], ['che_선제사격시도', 'che_선제사격발동'], null
['che_성벽부상무효'], ['che_선제사격시도', 'che_선제사격발동'], ['che_성벽선제']
],
[
1503, self::T_SIEGE, '목우',
@@ -343,7 +343,7 @@ class GameUnitConstBase{
[self::T_FOOTMAN=>1, self::T_ARCHER=>1, self::T_CAVALRY=>1, self::T_WIZARD=>1, self::T_CASTLE=>1.8],
[self::T_FOOTMAN=>1, self::T_ARCHER=>1, self::T_CAVALRY=>1, self::T_WIZARD=>1, 1106=>1],
['상대를 저지하는 특수병기입니다.'],
['che_성벽부상무효'], ['che_저지시도', 'che_저지발동'], ['che_성벽선제']
['che_성벽부상무효'], ['che_저지시도', 'che_저지발동'], null
]
];
+1 -1
View File
@@ -70,7 +70,7 @@ class GameUnitDetail implements iAction
$this->initSkillTrigger = $initSkillTrigger;
$this->phaseSkillTrigger = $phaseSkillTrigger;
$this->iActionList = [];
foreach($iActionList as $rawAction){
foreach($iActionList ?? [] as $rawAction){
$action = buildActionCrewTypeClass($rawAction);
if(!$action){
continue;