From 6e19722742885aa6f0ff19f9c2a3ec3cf097828f Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 9 May 2020 23:18:47 +0900 Subject: [PATCH] getVar('npc') -> getNPCType() --- hwe/b_battleCenter.php | 2 +- hwe/b_betting.php | 2 +- hwe/b_myPage.php | 4 +-- hwe/func.php | 6 ++--- hwe/j_getChiefTurn.php | 2 +- hwe/j_myBossInfo.php | 8 +++--- hwe/process_war.php | 2 +- hwe/sammo/AutorunGeneralPolicy.php | 4 +-- hwe/sammo/AutorunNationPolicy.php | 2 +- hwe/sammo/Command/General/che_군량매매.php | 6 ++--- hwe/sammo/Command/General/che_등용수락.php | 4 +-- hwe/sammo/Command/General/che_랜덤임관.php | 4 +-- hwe/sammo/Command/General/che_임관.php | 2 +- hwe/sammo/Command/General/che_장비매매.php | 4 +-- .../Command/General/che_장수대상임관.php | 2 +- hwe/sammo/Command/General/che_하야.php | 2 +- hwe/sammo/Command/Nation/che_몰수.php | 2 +- hwe/sammo/General.php | 4 +++ hwe/sammo/GeneralAI.php | 26 +++++++++---------- hwe/sammo/TextDecoration/DyingMessage.php | 2 +- hwe/sammo/TurnExecutionHelper.php | 8 +++--- 21 files changed, 51 insertions(+), 47 deletions(-) diff --git a/hwe/b_battleCenter.php b/hwe/b_battleCenter.php index 9727a448..727558de 100644 --- a/hwe/b_battleCenter.php +++ b/hwe/b_battleCenter.php @@ -176,7 +176,7 @@ $showGeneral = General::createGeneralObjFromDB($gen); -getVar('npc') > 1 || $permission >= 2): ?> +getNPCType() > 1 || $permission >= 2): ?> 개인 기록   diff --git a/hwe/b_betting.php b/hwe/b_betting.php index cafa7f45..e2663c84 100644 --- a/hwe/b_betting.php +++ b/hwe/b_betting.php @@ -457,7 +457,7 @@ foreach($tournamentType as $tournamentTypeText=>[$statTypeText,$statFunc,$rankCo foreach($tournamentRankerList as $rank=>$ranker){ printRow( $rank+1, - $ranker->getVar('npc'), + $ranker->getNPCType(), $ranker->getName(), ($statFunc)($ranker), $ranker->getRankVar($winColumn)+$ranker->getRankVar($drawColumn)+$ranker->getRankVar($loseColumn), diff --git a/hwe/b_myPage.php b/hwe/b_myPage.php index b6e38b0f..73fdd6ba 100644 --- a/hwe/b_myPage.php +++ b/hwe/b_myPage.php @@ -71,7 +71,7 @@ if (($btn == "설정저장" || $detachNPC) && $myset > 0) { $me->setVar('tnmt', $tnmt); } - if($me->getVar('npc') == 1 && $detachNPC){ + if($me->getNPCType() == 1 && $detachNPC){ $turnterm = $gameStor->turnterm; if($turnterm < 10){ @@ -88,7 +88,7 @@ $me->applyDB($db); if($gameStor->turntime <= $gameStor->opentime){ //서버 가오픈시 할 수 있는 행동 - if($me->getVar('npc') == 0){ + if($me->getNPCType() == 0){ $showDieImmediatelyBtn = true; if(addTurn($me->getVar('lastrefresh'), $gameStor->turnterm, 2) <= TimeUtil::now()){ $availableDieImmediately = true; diff --git a/hwe/func.php b/hwe/func.php index fbcbf834..10ddf3f8 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -1581,11 +1581,11 @@ function tryUniqueItemLottery(General $general, string $acquireType = '아이템 $db = DB::db(); $gameStor = KVStorage::getStorage($db, 'game_env'); - if ($general->getVar('npc') >= 2) { + if ($general->getNPCType() >= 2) { return false; } - if ($general->getVar('npc') > 6) { + if ($general->getNPCType() > 6) { return false; } @@ -1729,7 +1729,7 @@ function nextRuler(General $general) $candidate = null; //npc or npc유저인 경우 후계 찾기 - if ($general->getVar('npc') > 0) { + if ($general->getNPCType() > 0) { $candidate = $db->queryFirstRow( 'SELECT no,name,officer_level,IF(ABS(affinity-%i)>75,150-ABS(affinity-%i),ABS(affinity-%i)) as npcmatch2 from general where nation=%i and officer_level!=12 and 1 <= npc and npc<=3 order by npcmatch2,rand() LIMIT 1', $general->getVar('affinity'), diff --git a/hwe/j_getChiefTurn.php b/hwe/j_getChiefTurn.php index b537b9d3..5dc34dab 100644 --- a/hwe/j_getChiefTurn.php +++ b/hwe/j_getChiefTurn.php @@ -77,7 +77,7 @@ foreach($nationTurnList as $officer_level=>$turnBrief){ 'name'=>$general->getName(), 'turnTime'=>$general->getTurnTime($general::TURNTIME_FULL), 'officerLevelText'=>getOfficerLevelText($general->getVar('officer_level'), $nationLevel), - 'npcType'=>$general->getVar('npc'), + 'npcType'=>$general->getNPCType(), 'turn'=>$turnBrief ]; } diff --git a/hwe/j_myBossInfo.php b/hwe/j_myBossInfo.php index 61c09783..e95b57d1 100644 --- a/hwe/j_myBossInfo.php +++ b/hwe/j_myBossInfo.php @@ -223,7 +223,7 @@ function do추방(General $general, int $myOfficerLevel):?string{ $logger->pushGeneralActionLog("{$nationName}에서 추방당했습니다.", ActionLogger::PLAIN); // 명성/공헌 N*10%감소 - if($env['year'] <= $env['startyear'] && $general->getVar('npc') < 2){ + if($env['year'] <= $env['startyear'] && $general->getNPCType() < 2){ $general->setVar('makelimit', $oldMakeLimit); } else{ @@ -243,7 +243,7 @@ function do추방(General $general, int $myOfficerLevel):?string{ } $general->setVar('troop', 0); - if($general->getVar('npc') >= 2 && ($env['scenario'] < 100 || Util::randBool(0.01))) { + if($general->getNPCType() >= 2 && ($env['scenario'] < 100 || Util::randBool(0.01))) { $str = Util::choiceRandom([ '날 버리다니... 곧 전장에서 복수해주겠다...', @@ -280,7 +280,7 @@ function do추방(General $general, int $myOfficerLevel):?string{ ], 'nation=%i AND officer_level=12', $nationID); $db->update('nation', [ - 'gennum'=>$db->sqleval('gennum - %i', $general->getVar('npc')!=5?1:0), + 'gennum'=>$db->sqleval('gennum - %i', $general->getNPCType()!=5?1:0), 'gold'=>$db->sqleval('gold + %i', $gold), 'rice'=>$db->sqleval('rice + %i', $rice), ], 'nation = %i', $nationID); @@ -288,7 +288,7 @@ function do추방(General $general, int $myOfficerLevel):?string{ //이번분기는 추방불가(초반 제외) $db->update('nation', [ 'chief_set'=>$db->sqleval('chief_set | %i', doOfficerSet(0, $myOfficerLevel)), - 'gennum'=>$db->sqleval('gennum - %i', $general->getVar('npc')!=5?1:0), + 'gennum'=>$db->sqleval('gennum - %i', $general->getNPCType()!=5?1:0), 'gold'=>$db->sqleval('gold + %i', $gold), 'rice'=>$db->sqleval('rice + %i', $rice), ], 'nation = %i', $nationID); diff --git a/hwe/process_war.php b/hwe/process_war.php index 291ab201..50745861 100644 --- a/hwe/process_war.php +++ b/hwe/process_war.php @@ -553,7 +553,7 @@ function ConquerCity(array $admin, General $general, array $city) { } //NPC인 경우 10% 확률로 임관(엔장, 인재, 의병) - $npcType = $oldGeneral->getVar('npc'); + $npcType = $oldGeneral->getNPCType(); if($admin['join_mode'] != 'onlyRandom' && 2 <= $npcType && $npcType <= 8 && $npcType != 5 && Util::randBool(0.1)) { $cmd = buildGeneralCommandClass('che_임관', $oldGeneral, $admin, [ 'destNationID'=>$attackerNationID diff --git a/hwe/sammo/AutorunGeneralPolicy.php b/hwe/sammo/AutorunGeneralPolicy.php index 74c57b92..855d144a 100644 --- a/hwe/sammo/AutorunGeneralPolicy.php +++ b/hwe/sammo/AutorunGeneralPolicy.php @@ -90,7 +90,7 @@ class AutorunGeneralPolicy{ public $can선양 = false; function doNPCState(General $general){ - $npc = $general->getVar('npc'); + $npc = $general->getNPCType(); $nationID = $general->getNationID(); if($npc==5){ @@ -117,7 +117,7 @@ class AutorunGeneralPolicy{ //TODO: 국가 정책을 받아와야함 $this->priority = static::$default_priority; - if($general->getVar('npc') >= 2){ + if($general->getNPCType() >= 2){ $this->doNPCState($general); return; } diff --git a/hwe/sammo/AutorunNationPolicy.php b/hwe/sammo/AutorunNationPolicy.php index 44e04820..e9f42ab5 100644 --- a/hwe/sammo/AutorunNationPolicy.php +++ b/hwe/sammo/AutorunNationPolicy.php @@ -198,7 +198,7 @@ class AutorunNationPolicy { $this->reqHumanWarRecommandRice = Util::round(max(20000, $this->reqHumanWarRecommandRice * 3), -2); } - if($general->getVar('npc') >= 2){ + if($general->getNPCType() >= 2){ return; } diff --git a/hwe/sammo/Command/General/che_군량매매.php b/hwe/sammo/Command/General/che_군량매매.php index ba28e57e..ff23e36a 100644 --- a/hwe/sammo/Command/General/che_군량매매.php +++ b/hwe/sammo/Command/General/che_군량매매.php @@ -65,7 +65,7 @@ class che_군량매매 extends Command\GeneralCommand{ $this->setNation(); $this->minConditionConstraints=[ - ConstraintHelper::ReqCityTrader($general->getVar('npc')), + ConstraintHelper::ReqCityTrader($general->getNPCType()), ConstraintHelper::OccupiedCity(true), ConstraintHelper::SuppliedCity(), ]; @@ -76,7 +76,7 @@ class che_군량매매 extends Command\GeneralCommand{ $general = $this->generalObj; $this->fullConditionConstraints=[ - ConstraintHelper::ReqCityTrader($general->getVar('npc')), + ConstraintHelper::ReqCityTrader($general->getNPCType()), ConstraintHelper::OccupiedCity(true), ConstraintHelper::SuppliedCity(), ]; @@ -115,7 +115,7 @@ class che_군량매매 extends Command\GeneralCommand{ $buyRice = $this->arg['buyRice']; if($tradeRate === null){ - if($general->getVar('npc') >= 2){ + if($general->getNPCType() >= 2){ $tradeRate = 1.0; } else{ diff --git a/hwe/sammo/Command/General/che_등용수락.php b/hwe/sammo/Command/General/che_등용수락.php index 9faa2de7..f655e958 100644 --- a/hwe/sammo/Command/General/che_등용수락.php +++ b/hwe/sammo/Command/General/che_등용수락.php @@ -135,7 +135,7 @@ class che_등용수락 extends Command\GeneralCommand{ $destNationName = $this->destNation['name']; $relYear = $env['year'] - $env['startyear']; - if($general->getVar('npc') == 1 || $relYear >= 3){ + if($general->getNPCType() == 1 || $relYear >= 3){ $joinedNations = $general->getAuxVar('joinedNations')??[]; $joinedNations[] = $destNationID; $general->setAuxVar('joinedNations', $joinedNations); @@ -178,7 +178,7 @@ class che_등용수락 extends Command\GeneralCommand{ $general->addDedication(100); } - if($general->getVar('npc') < 2){ + if($general->getNPCType() < 2){ $general->setVar('killturn', $env['killturn']); } diff --git a/hwe/sammo/Command/General/che_랜덤임관.php b/hwe/sammo/Command/General/che_랜덤임관.php index 51fdcd90..55c08682 100644 --- a/hwe/sammo/Command/General/che_랜덤임관.php +++ b/hwe/sammo/Command/General/che_랜덤임관.php @@ -125,7 +125,7 @@ class che_랜덤임관 extends Command\GeneralCommand{ $destNation = null; - if ($general->getVar('npc') >= 2 && !$env['fiction'] && 1000 <= $env['scenario'] && $env['scenario'] < 2000) { + if ($general->getNPCType() >= 2 && !$env['fiction'] && 1000 <= $env['scenario'] && $env['scenario'] < 2000) { if($notIn){ $nations = $db->query( 'SELECT nation.`name` as `name`,nation.nation as nation,scout,gennum,`affinity` FROM nation join general on general.nation = nation.nation and general.officer_level = 12 WHERE scout=0 and gennum<%i and nation.nation not in %li', @@ -276,7 +276,7 @@ class che_랜덤임관 extends Command\GeneralCommand{ ], 'nation=%i', $destNationID); $relYear = $env['year'] - $env['startyear']; - if($general->getVar('npc') == 1 || $relYear >= 3){ + if($general->getNPCType() == 1 || $relYear >= 3){ $joinedNations = $general->getAuxVar('joinedNations')??[]; $joinedNations[] = $destNationID; $general->setAuxVar('joinedNations', $joinedNations); diff --git a/hwe/sammo/Command/General/che_임관.php b/hwe/sammo/Command/General/che_임관.php index b7f2ecd4..12ba0d72 100644 --- a/hwe/sammo/Command/General/che_임관.php +++ b/hwe/sammo/Command/General/che_임관.php @@ -168,7 +168,7 @@ class che_임관 extends Command\GeneralCommand{ \sammo\refreshNationStaticInfo(); $relYear = $env['year'] - $env['startyear']; - if($general->getVar('npc') == 1 || $relYear >= 3){ + if($general->getNPCType() == 1 || $relYear >= 3){ $joinedNations = $general->getAuxVar('joinedNations')??[]; $joinedNations[] = $destNationID; $general->setAuxVar('joinedNations', $joinedNations); diff --git a/hwe/sammo/Command/General/che_장비매매.php b/hwe/sammo/Command/General/che_장비매매.php index ab8fda8e..1a74d27c 100644 --- a/hwe/sammo/Command/General/che_장비매매.php +++ b/hwe/sammo/Command/General/che_장비매매.php @@ -64,7 +64,7 @@ class che_장비매매 extends Command\GeneralCommand{ $this->setNation(); $this->minConditionConstraints=[ - ConstraintHelper::ReqCityTrader($general->getVar('npc')), + ConstraintHelper::ReqCityTrader($general->getNPCType()), ]; } @@ -80,7 +80,7 @@ class che_장비매매 extends Command\GeneralCommand{ [$reqGold, $reqRice] = $this->getCost(); $this->fullConditionConstraints=[ - ConstraintHelper::ReqCityTrader($general->getVar('npc')), + ConstraintHelper::ReqCityTrader($general->getNPCType()), ConstraintHelper::ReqCityCapacity('secu', '치안 수치', $itemClass->getReqSecu()), ConstraintHelper::ReqGeneralGold($reqGold), ConstraintHelper::ReqGeneralRice($reqRice), diff --git a/hwe/sammo/Command/General/che_장수대상임관.php b/hwe/sammo/Command/General/che_장수대상임관.php index 2e733e3b..166e95fc 100644 --- a/hwe/sammo/Command/General/che_장수대상임관.php +++ b/hwe/sammo/Command/General/che_장수대상임관.php @@ -173,7 +173,7 @@ class che_장수대상임관 extends Command\GeneralCommand{ \sammo\refreshNationStaticInfo(); $relYear = $env['year'] - $env['startyear']; - if($general->getVar('npc') == 1 || $relYear >= 3){ + if($general->getNPCType() == 1 || $relYear >= 3){ $joinedNations = $general->getAuxVar('joinedNations')??[]; $joinedNations[] = $destNationID; $general->setAuxVar('joinedNations', $joinedNations); diff --git a/hwe/sammo/Command/General/che_하야.php b/hwe/sammo/Command/General/che_하야.php index 79eb3405..8a077d6a 100644 --- a/hwe/sammo/Command/General/che_하야.php +++ b/hwe/sammo/Command/General/che_하야.php @@ -97,7 +97,7 @@ class che_하야 extends Command\GeneralCommand{ $db->update('nation', [ 'gold'=>$db->sqleval('gold + %i', $lostGold), 'rice'=>$db->sqleval('rice + %i', $lostRice), - 'gennum'=>$db->sqleval('gennum - %i', $general->getVar('npc')!=5?1:0) + 'gennum'=>$db->sqleval('gennum - %i', $general->getNPCType()!=5?1:0) ], 'nation=%i', $nationID); \sammo\refreshNationStaticInfo(); diff --git a/hwe/sammo/Command/Nation/che_몰수.php b/hwe/sammo/Command/Nation/che_몰수.php index dbf8bfd6..f0357235 100644 --- a/hwe/sammo/Command/Nation/che_몰수.php +++ b/hwe/sammo/Command/Nation/che_몰수.php @@ -175,7 +175,7 @@ class che_몰수 extends Command\NationCommand ); $amountText = number_format($amount, 0); - if ($destGeneral->getVar('npc') >= 2 && Util::randBool(0.01)) { + if ($destGeneral->getNPCType() >= 2 && Util::randBool(0.01)) { $npcTexts = [ '몰수를 하다니... 이것이 윗사람이 할 짓이란 말입니까...', '사유재산까지 몰수해가면서 이 나라가 잘 될거라 믿습니까? 정말 이해할 수가 없군요...', diff --git a/hwe/sammo/General.php b/hwe/sammo/General.php index 478ab12d..80174190 100644 --- a/hwe/sammo/General.php +++ b/hwe/sammo/General.php @@ -158,6 +158,10 @@ class General implements iAction{ return $this->itemObjs[$itemKey]; } + function getNPCType():int{ + return $this->raw['npc']; + } + /** @return BaseItem[] */ function getItems():array{ return $this->itemObjs; diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php index 19b575d3..509452f1 100644 --- a/hwe/sammo/GeneralAI.php +++ b/hwe/sammo/GeneralAI.php @@ -634,7 +634,7 @@ class GeneralAI //고립 도시 장수 발령 $args = []; foreach ($this->lostGenerals as $lostGeneral) { - if ($lostGeneral->getVar('npc') >= 2) { + if ($lostGeneral->getNPCType() >= 2) { continue; } @@ -885,7 +885,7 @@ class GeneralAI //고립 도시 장수 발령 $args = []; foreach ($this->lostGenerals as $lostGeneral) { - if ($lostGeneral->getVar('npc') < 2 || $lostGeneral->getVar('npc') == 5) { + if ($lostGeneral->getNPCType() < 2 || $lostGeneral->getNPCType() == 5) { continue; } $selCity = Util::choiceRandom($this->supplyCities); @@ -2662,7 +2662,7 @@ class GeneralAI { $general = $this->general; - if($general->getVar('npc') == 5){ + if($general->getNPCType() == 5){ $newKillTurn = ($general->getVar('killturn') + Util::randRangeInt(2, 4)) % 5; $newKillTurn += 70; $general->setVar('killturn', $newKillTurn); @@ -2812,7 +2812,7 @@ class GeneralAI $db = DB::db(); // 오랑캐는 바로 임관 - if ($general->getVar('npc') == 9) { + if ($general->getNPCType() == 9) { $rulerNation = $db->queryFirstField( 'SELECT nation FROM general WHERE `officer_level`=12 AND npc=9 and nation not in %li ORDER BY RAND() limit 1', $general->getAuxVar('joinedNations') ?? [0] @@ -3010,7 +3010,7 @@ class GeneralAI foreach($nationGenerals as $nationGeneral){ $generalID = $nationGeneral->getID(); $cityID = $nationGeneral->getCityID(); - $npcType = $nationGeneral->getVar('npc'); + $npcType = $nationGeneral->getNPCType(); $officerLevel = $nationGeneral->getVar('officer_level'); $officerCity = $nationGeneral->getVar('officer_city'); @@ -3081,7 +3081,7 @@ class GeneralAI //TODO: NationTurn과 InstantNationTurn 구분 필요 $lastTurn = $reservedCommand->getLastTurn(); $general = $this->general; - $npcType = $general->getVar('npc'); + $npcType = $general->getNPCType(); $this->categorizeNationGeneral(); $this->categorizeNationCities(); @@ -3160,7 +3160,7 @@ class GeneralAI public function chooseGeneralTurn(GeneralCommand $reservedCommand): GeneralCommand{ $general = $this->general; - $npcType = $general->getVar('npc'); + $npcType = $general->getNPCType(); $nationID = $general->getNationID(); //특별 메세지 있는 경우 출력 하루 4번 @@ -3427,7 +3427,7 @@ class GeneralAI continue; } $chief = $this->chiefGenerals[$chiefLevel]; - if($chief->getVar('npc') < 2 && $chief->getVar('killturn') >= $minUserKillturn){ + if($chief->getNPCType() < 2 && $chief->getVar('killturn') >= $minUserKillturn){ $userChiefCnt+=1; $chief->setVar('permission', 'ambassador'); } @@ -3490,7 +3490,7 @@ class GeneralAI if(key_exists($chiefLevel, $this->chiefGenerals)){ $oldChief = $this->chiefGenerals[$chiefLevel]; - if($oldChief->getVar('npc') < 2 && $oldChief->getVar('killturn') >= $minChiefLevel){ + if($oldChief->getNPCType() < 2 && $oldChief->getVar('killturn') >= $minChiefLevel){ continue; } } @@ -3512,10 +3512,10 @@ class GeneralAI if($general->getVar('officer_level') !== 1){ continue; } - if($general->getVar('npc') < 2 && $general->getVar('killturn') < $minUserKillturn){ + if($general->getNPCType() < 2 && $general->getVar('killturn') < $minUserKillturn){ continue; } - if($general->getVar('npc') >= 2 && $general->getVar('killturn') < $minNPCKillturn){ + if($general->getNPCType() >= 2 && $general->getVar('killturn') < $minNPCKillturn){ continue; } @@ -3528,7 +3528,7 @@ class GeneralAI continue; } - if($general->getVar('npc') < 2 && $userChiefCnt >= 3){ + if($general->getNPCType() < 2 && $userChiefCnt >= 3){ continue; } @@ -3540,7 +3540,7 @@ class GeneralAI continue; } - if($newChief->getVar('npc') < 2){ + if($newChief->getNPCType() < 2){ $userChiefCnt += 1; $newChief->setVar('permission', 'ambassador'); } diff --git a/hwe/sammo/TextDecoration/DyingMessage.php b/hwe/sammo/TextDecoration/DyingMessage.php index da073a55..a66e6ebc 100644 --- a/hwe/sammo/TextDecoration/DyingMessage.php +++ b/hwe/sammo/TextDecoration/DyingMessage.php @@ -97,7 +97,7 @@ class DyingMessage{ } $this->general = $general; $this->name = $general->getName(); - $this->npc = $general->getVar('npc'); + $this->npc = $general->getNPCType(); if($general->getVar('owner') > 0 && $general->getVar('startage') - $general->getVar('age') > 1){ $this->realName = $general->getVar('owner_name'); } diff --git a/hwe/sammo/TurnExecutionHelper.php b/hwe/sammo/TurnExecutionHelper.php index 2c33ec10..9789d70f 100644 --- a/hwe/sammo/TurnExecutionHelper.php +++ b/hwe/sammo/TurnExecutionHelper.php @@ -142,7 +142,7 @@ class TurnExecutionHelper $killTurn = $gameStor->killturn; - if($general->getVar('npc') >= 2){ + if($general->getNPCType() >= 2){ $general->increaseVarWithLimit('killturn', -1); } else if($general->getVar('killturn') > $killTurn){ @@ -175,7 +175,7 @@ class TurnExecutionHelper // 삭턴장수 삭제처리 if($general->getVar('killturn') <= 0){ // npc유저 삭턴시 npc로 전환 - if($general->getVar('npc') == 1 && $general->getVar('deadyear') > $gameStor->year){ + if($general->getNPCType() == 1 && $general->getVar('deadyear') > $gameStor->year){ $ownerName = $general->getVar('owner_name'); $josaYi = JosaUtil::pick($ownerName, '이'); @@ -197,7 +197,7 @@ class TurnExecutionHelper } //은퇴 - if($general->getVar('age') >= GameConst::$retirementYear && $general->getVar('npc') == 0) { + if($general->getVar('age') >= GameConst::$retirementYear && $general->getNPCType() == 0) { if($gameStor->isunited == 0) { $general->applyDB($db); CheckHall($generalID); @@ -258,7 +258,7 @@ class TurnExecutionHelper $turnObj->preprocessCommand(); - if($general->getVar('npc') >= 2 || ($autorun_user['limit_minutes']??false)){ + if($general->getNPCType() >= 2 || ($autorun_user['limit_minutes']??false)){ $ai = new GeneralAI($turnObj->getGeneral()); }