장수 수 적용 관련 변경

This commit is contained in:
2020-05-09 23:09:36 +09:00
parent 8eb2380542
commit d083dc36b2
8 changed files with 43 additions and 12 deletions
+15
View File
@@ -378,6 +378,21 @@ function buildWarUnitTriggerClass(?string $type, WarUnit $unit, ?array $args = n
return $class->newInstanceArgs(array_merge([$unit], $args));
}
function countPureGeneralFromRawList(?array $rawGeneralList=null):int{
if(!$rawGeneralList){
return 0;
}
$result = 0;
foreach($rawGeneralList as $rawGeneral){
if(!$rawGeneral['npc'] === 5){
continue;
}
$result+=1;
}
return $result;
}
function getOfficerLevelText($officerLevel, $nlevel=8) {
if($officerLevel >= 0 && $officerLevel <= 4) { $nlevel = 0; }
$code = $nlevel * 100 + $officerLevel;