diff --git a/hwe/sammo/Command/BaseCommand.php b/hwe/sammo/Command/BaseCommand.php index ceb9cbbb..d80e951d 100644 --- a/hwe/sammo/Command/BaseCommand.php +++ b/hwe/sammo/Command/BaseCommand.php @@ -455,7 +455,7 @@ abstract class BaseCommand{ } public function setResultTurn(LastTurn $lastTurn){ - $this->generalObj->setResultTurn($lastTurn); + $this->generalObj->_setResultTurn($lastTurn); } public function getResultTurn():LastTurn{ diff --git a/hwe/sammo/Command/General/che_NPC능동.php b/hwe/sammo/Command/General/che_NPC능동.php index a2518a79..33145ef8 100644 --- a/hwe/sammo/Command/General/che_NPC능동.php +++ b/hwe/sammo/Command/General/che_NPC능동.php @@ -95,7 +95,7 @@ class che_NPC능동 extends Command\GeneralCommand{ $logger->pushGeneralActionLog("NPC 전용 명령을 이용해 {$cityName}{$josaRo} 이동했습니다."); $general->setVar('city', $destCityID); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); } $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_강행.php b/hwe/sammo/Command/General/che_강행.php index a17cb3e4..d55a9e8e 100644 --- a/hwe/sammo/Command/General/che_강행.php +++ b/hwe/sammo/Command/General/che_강행.php @@ -165,7 +165,7 @@ class che_강행 extends Command\GeneralCommand $general->increaseVarWithLimit('gold', -$reqGold, 0); $general->addExperience($exp); $general->increaseVar('leadership_exp', 1); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_거병.php b/hwe/sammo/Command/General/che_거병.php index 6fbe970a..ff0400bd 100644 --- a/hwe/sammo/Command/General/che_거병.php +++ b/hwe/sammo/Command/General/che_거병.php @@ -172,7 +172,7 @@ class che_거병 extends Command\GeneralCommand{ $general->setVar('officer_city', 0); $general->setVar('nation', $nationID); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_건국.php b/hwe/sammo/Command/General/che_건국.php index c654f4e8..f23444f3 100644 --- a/hwe/sammo/Command/General/che_건국.php +++ b/hwe/sammo/Command/General/che_건국.php @@ -193,7 +193,7 @@ class che_건국 extends Command\GeneralCommand refreshNationStaticInfo(); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); tryUniqueItemLottery($general, '건국'); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_견문.php b/hwe/sammo/Command/General/che_견문.php index b5429df6..b390d885 100644 --- a/hwe/sammo/Command/General/che_견문.php +++ b/hwe/sammo/Command/General/che_견문.php @@ -114,7 +114,7 @@ class che_견문 extends Command\GeneralCommand{ $logger->pushGeneralActionLog("{$text} <1>$date"); $general->addExperience($exp); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_군량매매.php b/hwe/sammo/Command/General/che_군량매매.php index ff23e36a..58929c8d 100644 --- a/hwe/sammo/Command/General/che_군량매매.php +++ b/hwe/sammo/Command/General/che_군량매매.php @@ -179,7 +179,7 @@ class che_군량매매 extends Command\GeneralCommand{ $general->addDedication($ded); $general->increaseVar($incStat, 1); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_귀환.php b/hwe/sammo/Command/General/che_귀환.php index 9d772d68..32267c6b 100644 --- a/hwe/sammo/Command/General/che_귀환.php +++ b/hwe/sammo/Command/General/che_귀환.php @@ -99,7 +99,7 @@ class che_귀환 extends Command\GeneralCommand{ $general->addExperience($exp); $general->addDedication($ded); $general->increaseVar('leadership_exp', 1); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_기술연구.php b/hwe/sammo/Command/General/che_기술연구.php index 50d70d52..79892d26 100644 --- a/hwe/sammo/Command/General/che_기술연구.php +++ b/hwe/sammo/Command/General/che_기술연구.php @@ -125,7 +125,7 @@ class che_기술연구 extends che_상업투자{ $general->addDedication($ded); $general->increaseVar(static::$statKey.'_exp', 1); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); tryUniqueItemLottery($general); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_단련.php b/hwe/sammo/Command/General/che_단련.php index 39770f86..69dd65fb 100644 --- a/hwe/sammo/Command/General/che_단련.php +++ b/hwe/sammo/Command/General/che_단련.php @@ -126,7 +126,7 @@ class che_단련 extends Command\GeneralCommand{ $general->increaseVarWithLimit('rice', -$reqRice, 0); $general->addExperience($exp); $general->increaseVar($incStat, 1); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); tryUniqueItemLottery($general); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_등용.php b/hwe/sammo/Command/General/che_등용.php index 237d69f7..c7e3b13c 100644 --- a/hwe/sammo/Command/General/che_등용.php +++ b/hwe/sammo/Command/General/che_등용.php @@ -168,7 +168,7 @@ class che_등용 extends Command\GeneralCommand{ $general->increaseVar('leadership_exp', 1); $general->increaseVarWithLimit('gold', -$reqGold, 0); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_랜덤임관.php b/hwe/sammo/Command/General/che_랜덤임관.php index ec6bef21..a15db1ed 100644 --- a/hwe/sammo/Command/General/che_랜덤임관.php +++ b/hwe/sammo/Command/General/che_랜덤임관.php @@ -289,7 +289,7 @@ class che_랜덤임관 extends Command\GeneralCommand{ } $general->addExperience($exp); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); tryUniqueItemLottery($general, '랜덤 임관'); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_모반시도.php b/hwe/sammo/Command/General/che_모반시도.php index 5c04bb3b..4b74e9e3 100644 --- a/hwe/sammo/Command/General/che_모반시도.php +++ b/hwe/sammo/Command/General/che_모반시도.php @@ -100,7 +100,7 @@ class che_모반시도 extends Command\GeneralCommand{ $logger->pushGeneralHistoryLog("모반으로 {$nationName}의 군주자리를 찬탈"); $lordLogger->pushGeneralHistoryLog("{$generalName}의 모반으로 인해 {$nationName}의 군주자리를 박탈당함"); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); $general->applyDB($db); $lordGeneral->applyDB($db); diff --git a/hwe/sammo/Command/General/che_물자조달.php b/hwe/sammo/Command/General/che_물자조달.php index 0c6472c5..4defba5a 100644 --- a/hwe/sammo/Command/General/che_물자조달.php +++ b/hwe/sammo/Command/General/che_물자조달.php @@ -122,7 +122,7 @@ class che_물자조달 extends Command\GeneralCommand{ $resKey=>$db->sqleval('%b + %i', $resKey, $score) ], 'nation=%i',$general->getNationID()); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_방랑.php b/hwe/sammo/Command/General/che_방랑.php index 9e75e811..3efb4b41 100644 --- a/hwe/sammo/Command/General/che_방랑.php +++ b/hwe/sammo/Command/General/che_방랑.php @@ -127,7 +127,7 @@ class che_방랑 extends Command\GeneralCommand{ refreshNationStaticInfo(); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->applyDB($db); return true; diff --git a/hwe/sammo/Command/General/che_사기진작.php b/hwe/sammo/Command/General/che_사기진작.php index 15e8b5d6..e7efc0b1 100644 --- a/hwe/sammo/Command/General/che_사기진작.php +++ b/hwe/sammo/Command/General/che_사기진작.php @@ -104,7 +104,7 @@ class che_사기진작 extends Command\GeneralCommand{ $general->addExperience($exp); $general->addDedication($ded); $general->increaseVar('leadership_exp', 1); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); tryUniqueItemLottery($general); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_상업투자.php b/hwe/sammo/Command/General/che_상업투자.php index 17e86fc6..8b8f3ea8 100644 --- a/hwe/sammo/Command/General/che_상업투자.php +++ b/hwe/sammo/Command/General/che_상업투자.php @@ -196,7 +196,7 @@ class che_상업투자 extends Command\GeneralCommand{ $general->addExperience($exp); $general->addDedication($ded); $general->increaseVar(static::$statKey.'_exp', 1); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); tryUniqueItemLottery($general); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_선양.php b/hwe/sammo/Command/General/che_선양.php index 6229303e..dad19afc 100644 --- a/hwe/sammo/Command/General/che_선양.php +++ b/hwe/sammo/Command/General/che_선양.php @@ -139,7 +139,7 @@ class che_선양 extends Command\GeneralCommand $logger->pushGeneralHistoryLog("{$nationName}의 군주자리를 {$destGeneralName}에게 선양"); $destLogger->pushGeneralHistoryLog("{$nationName}의 군주자리를 물려 받음"); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); $general->applyDB($db); $destGeneral->applyDB($db); diff --git a/hwe/sammo/Command/General/che_소집해제.php b/hwe/sammo/Command/General/che_소집해제.php index 1eeadd2f..c3d86e82 100644 --- a/hwe/sammo/Command/General/che_소집해제.php +++ b/hwe/sammo/Command/General/che_소집해제.php @@ -83,7 +83,7 @@ class che_소집해제 extends Command\GeneralCommand{ $general->setVar('crew', 0); $general->addExperience($exp); $general->addDedication($ded); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_숙련전환.php b/hwe/sammo/Command/General/che_숙련전환.php index 5fcea84e..b6cc91e2 100644 --- a/hwe/sammo/Command/General/che_숙련전환.php +++ b/hwe/sammo/Command/General/che_숙련전환.php @@ -188,7 +188,7 @@ class che_숙련전환 extends Command\GeneralCommand $general->increaseVarWithLimit('gold', -$reqGold, 0); $general->increaseVarWithLimit('rice', -$reqRice, 0); $general->increaseVar('leadership_exp', 2); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); tryUniqueItemLottery($general); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_요양.php b/hwe/sammo/Command/General/che_요양.php index 2a8a398b..e5ccb7f5 100644 --- a/hwe/sammo/Command/General/che_요양.php +++ b/hwe/sammo/Command/General/che_요양.php @@ -74,7 +74,7 @@ class che_요양 extends Command\GeneralCommand{ $general->setVar('injury', 0); $general->addExperience($exp); $general->addDedication($ded); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_이동.php b/hwe/sammo/Command/General/che_이동.php index fa647d63..338c1b6c 100644 --- a/hwe/sammo/Command/General/che_이동.php +++ b/hwe/sammo/Command/General/che_이동.php @@ -173,7 +173,7 @@ class che_이동 extends Command\GeneralCommand $general->increaseVarWithLimit('atmos', -5, 20); $general->addExperience($exp); $general->increaseVar('leadership_exp', 1); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_인재탐색.php b/hwe/sammo/Command/General/che_인재탐색.php index e83db0c0..617c405c 100644 --- a/hwe/sammo/Command/General/che_인재탐색.php +++ b/hwe/sammo/Command/General/che_인재탐색.php @@ -164,7 +164,7 @@ class che_인재탐색 extends Command\GeneralCommand $general->addExperience($exp); $general->addDedication($ded); $general->increaseVar($incStat, 1); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); tryUniqueItemLottery($general); $general->applyDB($db); @@ -291,7 +291,7 @@ class che_인재탐색 extends Command\GeneralCommand $general->addExperience($exp); $general->addDedication($ded); $general->increaseVar($incStat, 3); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); tryUniqueItemLottery($general); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_임관.php b/hwe/sammo/Command/General/che_임관.php index 12ba0d72..15175e7e 100644 --- a/hwe/sammo/Command/General/che_임관.php +++ b/hwe/sammo/Command/General/che_임관.php @@ -175,7 +175,7 @@ class che_임관 extends Command\GeneralCommand{ } $general->addExperience($exp); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); tryUniqueItemLottery($general); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_장비매매.php b/hwe/sammo/Command/General/che_장비매매.php index 1a74d27c..fd0100db 100644 --- a/hwe/sammo/Command/General/che_장비매매.php +++ b/hwe/sammo/Command/General/che_장비매매.php @@ -178,7 +178,7 @@ class che_장비매매 extends Command\GeneralCommand{ $exp = 10; $general->addExperience($exp); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_장수대상임관.php b/hwe/sammo/Command/General/che_장수대상임관.php index 166e95fc..9ae60156 100644 --- a/hwe/sammo/Command/General/che_장수대상임관.php +++ b/hwe/sammo/Command/General/che_장수대상임관.php @@ -180,7 +180,7 @@ class che_장수대상임관 extends Command\GeneralCommand{ } $general->addExperience($exp); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); tryUniqueItemLottery($general); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_전투태세.php b/hwe/sammo/Command/General/che_전투태세.php index f6fbd890..5a3ed2f8 100644 --- a/hwe/sammo/Command/General/che_전투태세.php +++ b/hwe/sammo/Command/General/che_전투태세.php @@ -99,7 +99,7 @@ class che_전투태세 extends Command\GeneralCommand{ if($term < 3){ $logger->pushGeneralActionLog("병사들을 열심히 훈련중... ({$term}/3) <1>$date"); - $general->setResultTurn($turnResult); + $this->setResultTurn($turnResult); $general->applyDB($db); return true; @@ -121,7 +121,7 @@ class che_전투태세 extends Command\GeneralCommand{ $general->addDex($general->getCrewTypeObj(), $crew / 100 * 3, false); $general->increaseVar('leadership_exp', 3); - $general->setResultTurn($turnResult); + $this->setResultTurn($turnResult); $general->checkStatChange(); tryUniqueItemLottery($general); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_전투특기초기화.php b/hwe/sammo/Command/General/che_전투특기초기화.php index cd8bfe1a..7cff8ae1 100644 --- a/hwe/sammo/Command/General/che_전투특기초기화.php +++ b/hwe/sammo/Command/General/che_전투특기초기화.php @@ -119,7 +119,7 @@ class che_전투특기초기화 extends Command\GeneralCommand{ $logger->pushGeneralActionLog("새로운 {$specialName}를 가질 준비가 되었습니다. <1>$date"); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); tryUniqueItemLottery($general); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_정착장려.php b/hwe/sammo/Command/General/che_정착장려.php index 93fd93ea..05586f14 100644 --- a/hwe/sammo/Command/General/che_정착장려.php +++ b/hwe/sammo/Command/General/che_정착장려.php @@ -179,7 +179,7 @@ class che_정착장려 extends Command\GeneralCommand{ $general->addExperience($exp); $general->addDedication($ded); $general->increaseVar(static::$statKey.'_exp', 1); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); tryUniqueItemLottery($general); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_주민선정.php b/hwe/sammo/Command/General/che_주민선정.php index a6618601..a78c6200 100644 --- a/hwe/sammo/Command/General/che_주민선정.php +++ b/hwe/sammo/Command/General/che_주민선정.php @@ -179,7 +179,7 @@ class che_주민선정 extends Command\GeneralCommand{ $general->addExperience($exp); $general->addDedication($ded); $general->increaseVar(static::$statKey.'_exp', 1); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); tryUniqueItemLottery($general); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_증여.php b/hwe/sammo/Command/General/che_증여.php index d6744aa8..6ca976f5 100644 --- a/hwe/sammo/Command/General/che_증여.php +++ b/hwe/sammo/Command/General/che_증여.php @@ -175,7 +175,7 @@ class che_증여 extends Command\GeneralCommand $general->addDedication($ded); $general->increaseVar('leadership_exp', 1); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); $general->applyDB($db); $destGeneral->applyDB($db); diff --git a/hwe/sammo/Command/General/che_집합.php b/hwe/sammo/Command/General/che_집합.php index 3b4a1d8d..de3684a1 100644 --- a/hwe/sammo/Command/General/che_집합.php +++ b/hwe/sammo/Command/General/che_집합.php @@ -104,7 +104,7 @@ class che_집합 extends Command\GeneralCommand{ $general->addExperience($exp); $general->addDedication($ded); $general->increaseVar('leadership_exp', 1); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); tryUniqueItemLottery($general); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_징병.php b/hwe/sammo/Command/General/che_징병.php index bd02fe0e..6c26fee7 100644 --- a/hwe/sammo/Command/General/che_징병.php +++ b/hwe/sammo/Command/General/che_징병.php @@ -227,7 +227,7 @@ class che_징병 extends Command\GeneralCommand $general->increaseVarWithLimit('gold', -$reqGold, 0); $general->increaseVarWithLimit('rice', -$reqRice, 0); $general->increaseVar('leadership_exp', 1); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); $general->setAuxVar('armType', $reqCrewType->armType); tryUniqueItemLottery($general); diff --git a/hwe/sammo/Command/General/che_첩보.php b/hwe/sammo/Command/General/che_첩보.php index 304dd89e..bd701b61 100644 --- a/hwe/sammo/Command/General/che_첩보.php +++ b/hwe/sammo/Command/General/che_첩보.php @@ -221,7 +221,7 @@ class che_첩보 extends Command\GeneralCommand $general->addExperience($exp); $general->addDedication($ded); $general->increaseVar('leadership_exp', 1); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_출병.php b/hwe/sammo/Command/General/che_출병.php index d5ad600b..804610e0 100644 --- a/hwe/sammo/Command/General/che_출병.php +++ b/hwe/sammo/Command/General/che_출병.php @@ -232,7 +232,7 @@ class che_출병 extends Command\GeneralCommand $general->addDex($general->getCrewTypeObj(), $general->getVar('crew') / 100); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->applyDB($db); processWar($general, $this->nation, $this->destCity); diff --git a/hwe/sammo/Command/General/che_하야.php b/hwe/sammo/Command/General/che_하야.php index 8a077d6a..382e9e4a 100644 --- a/hwe/sammo/Command/General/che_하야.php +++ b/hwe/sammo/Command/General/che_하야.php @@ -107,7 +107,7 @@ class che_하야 extends Command\GeneralCommand{ $general->setVar('belong', 0); $general->setVar('makelimit', 12); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_해산.php b/hwe/sammo/Command/General/che_해산.php index dd2de1cc..b606cfec 100644 --- a/hwe/sammo/Command/General/che_해산.php +++ b/hwe/sammo/Command/General/che_해산.php @@ -92,7 +92,7 @@ class che_해산 extends Command\GeneralCommand{ $logger->pushGeneralActionLog("세력을 해산했습니다. <1>$date"); $logger->pushGlobalActionLog("{$generalName}{$josaYi} 세력을 해산했습니다."); $logger->pushGeneralHistoryLog("{$nationName}{$josaUl} 해산"); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $nationGenerals = deleteNation($general, false); foreach($nationGenerals as $oldGeneral){ diff --git a/hwe/sammo/Command/General/che_헌납.php b/hwe/sammo/Command/General/che_헌납.php index cecd4e20..92b97515 100644 --- a/hwe/sammo/Command/General/che_헌납.php +++ b/hwe/sammo/Command/General/che_헌납.php @@ -151,7 +151,7 @@ class che_헌납 extends Command\GeneralCommand $general->addDedication($ded); $general->increaseVar('leadership_exp', 1); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_화계.php b/hwe/sammo/Command/General/che_화계.php index 2efb6a52..a7314675 100644 --- a/hwe/sammo/Command/General/che_화계.php +++ b/hwe/sammo/Command/General/che_화계.php @@ -297,7 +297,7 @@ class che_화계 extends Command\GeneralCommand $general->addDedication($ded); $general->increaseVar($statType . '_exp', 1); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); $general->applyDB($db); return false; @@ -330,7 +330,7 @@ class che_화계 extends Command\GeneralCommand $general->addDedication($ded); $general->increaseVar($statType . '_exp', 1); $general->increaseRankVar('firenum', 1); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/che_훈련.php b/hwe/sammo/Command/General/che_훈련.php index 05432f6c..c1f42260 100644 --- a/hwe/sammo/Command/General/che_훈련.php +++ b/hwe/sammo/Command/General/che_훈련.php @@ -108,7 +108,7 @@ class che_훈련 extends Command\GeneralCommand{ $general->addExperience($exp); $general->addDedication($ded); $general->increaseVar('leadership_exp', 1); - $general->setResultTurn(new LastTurn(static::getName(), $this->arg)); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->checkStatChange(); tryUniqueItemLottery($general); $general->applyDB($db); diff --git a/hwe/sammo/Command/General/휴식.php b/hwe/sammo/Command/General/휴식.php index 68f7b97d..fb793d11 100644 --- a/hwe/sammo/Command/General/휴식.php +++ b/hwe/sammo/Command/General/휴식.php @@ -38,7 +38,7 @@ class 휴식 extends Command\GeneralCommand{ $date = $general->getTurnTime($general::TURNTIME_HM); $logger->pushGeneralActionLog("아무것도 실행하지 않았습니다. <1>$date"); - $general->setResultTurn(new LastTurn()); + $this->setResultTurn(new LastTurn()); $general->applyDB(DB::db()); return true; diff --git a/hwe/sammo/Command/Nation/che_감축.php b/hwe/sammo/Command/Nation/che_감축.php index b11d07c0..252a7c3a 100644 --- a/hwe/sammo/Command/Nation/che_감축.php +++ b/hwe/sammo/Command/Nation/che_감축.php @@ -207,7 +207,7 @@ class che_감축 extends Command\NationCommand{ $logger->pushGlobalActionLog("{$generalName}{$josaYi} {$destCityName}{$josaUl} 감축하였습니다."); $logger->pushGlobalHistoryLog("【감축】{$nationName}{$josaYiNation} {$destCityName}{$josaUl} 감축하였습니다."); - $general->setResultTurn(new LastTurn($this->getName(), $this->arg, 0)); + $this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0)); $general->applyDB($db); return true; diff --git a/hwe/sammo/Command/Nation/che_국기변경.php b/hwe/sammo/Command/Nation/che_국기변경.php index 6c71091a..50884a83 100644 --- a/hwe/sammo/Command/Nation/che_국기변경.php +++ b/hwe/sammo/Command/Nation/che_국기변경.php @@ -155,7 +155,7 @@ class che_국기변경 extends Command\NationCommand $logger->pushGlobalActionLog("{$generalName}{$josaYi} 국기를 변경하였습니다"); $logger->pushGlobalHistoryLog("【국기변경】{$nationName}{$josaYiNation} 국기를 변경하였습니다."); - $general->setResultTurn(new LastTurn($this->getName(), $this->arg, 0)); + $this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0)); $general->applyDB($db); return true; } diff --git a/hwe/sammo/Command/Nation/che_국호변경.php b/hwe/sammo/Command/Nation/che_국호변경.php index 63eecaef..2ec976d1 100644 --- a/hwe/sammo/Command/Nation/che_국호변경.php +++ b/hwe/sammo/Command/Nation/che_국호변경.php @@ -162,7 +162,7 @@ class che_국호변경 extends Command\NationCommand $logger->pushGlobalActionLog("{$generalName}{$josaYi} 국호를 {$newNationName}{$josaRo} 변경합니다."); $logger->pushGlobalHistoryLog("【국호변경】{$nationName}{$josaYiNation} 국호를 {$newNationName}{$josaRo} 변경합니다."); - $general->setResultTurn(new LastTurn($this->getName(), $this->arg, 0)); + $this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0)); $general->applyDB($db); return true; } diff --git a/hwe/sammo/Command/Nation/che_급습.php b/hwe/sammo/Command/Nation/che_급습.php index 918b872a..d2220773 100644 --- a/hwe/sammo/Command/Nation/che_급습.php +++ b/hwe/sammo/Command/Nation/che_급습.php @@ -198,7 +198,7 @@ class che_급습 extends Command\NationCommand $db->update('diplomacy', [ 'term' => $db->sqleval('`term` - %i', 3), ], '(me = %i AND you = %i) OR (you = %i AND me = %i)', $nationID, $destNationID, $nationID, $destNationID); - + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->applyDB($db); return true; diff --git a/hwe/sammo/Command/Nation/che_물자원조.php b/hwe/sammo/Command/Nation/che_물자원조.php index 90b7e81a..9224099d 100644 --- a/hwe/sammo/Command/Nation/che_물자원조.php +++ b/hwe/sammo/Command/Nation/che_물자원조.php @@ -230,7 +230,7 @@ class che_물자원조 extends Command\NationCommand{ $general->addExperience(5); $general->addDedication(5); - + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->applyDB($db); return true; diff --git a/hwe/sammo/Command/Nation/che_백성동원.php b/hwe/sammo/Command/Nation/che_백성동원.php index 0fc4cee9..63c19ff9 100644 --- a/hwe/sammo/Command/Nation/che_백성동원.php +++ b/hwe/sammo/Command/Nation/che_백성동원.php @@ -164,7 +164,7 @@ class che_백성동원 extends Command\NationCommand{ 'strategic_cmd_limit' => $this->getPostReqTurn() ], 'nation=%i', $nationID); - $general->setResultTurn(new LastTurn($this->getName(), $this->arg, 0)); + $this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0)); $general->applyDB($db); return true; diff --git a/hwe/sammo/Command/Nation/che_수몰.php b/hwe/sammo/Command/Nation/che_수몰.php index a4325acf..8dfb52da 100644 --- a/hwe/sammo/Command/Nation/che_수몰.php +++ b/hwe/sammo/Command/Nation/che_수몰.php @@ -182,7 +182,7 @@ class che_수몰 extends Command\NationCommand{ 'strategic_cmd_limit' => $this->getPostReqTurn() ], 'nation=%i', $nationID); - $general->setResultTurn(new LastTurn($this->getName(), $this->arg, 0)); + $this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0)); $general->applyDB($db); return true; diff --git a/hwe/sammo/Command/Nation/che_의병모집.php b/hwe/sammo/Command/Nation/che_의병모집.php index b334fba7..43ff6db9 100644 --- a/hwe/sammo/Command/Nation/che_의병모집.php +++ b/hwe/sammo/Command/Nation/che_의병모집.php @@ -235,7 +235,7 @@ class che_의병모집 extends Command\NationCommand 'strategic_cmd_limit' => $this->getPostReqTurn() ], 'nation=%i', $nationID); - + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->applyDB($db); return true; diff --git a/hwe/sammo/Command/Nation/che_이호경식.php b/hwe/sammo/Command/Nation/che_이호경식.php index 68e6fc61..a25c4aaf 100644 --- a/hwe/sammo/Command/Nation/che_이호경식.php +++ b/hwe/sammo/Command/Nation/che_이호경식.php @@ -197,6 +197,7 @@ class che_이호경식 extends Command\NationCommand 'state' => 1, ], '(me = %i AND you = %i) OR (you = %i AND me = %i)', $nationID, $destNationID, $nationID, $destNationID); + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $general->applyDB($db); return true; diff --git a/hwe/sammo/Command/Nation/che_증축.php b/hwe/sammo/Command/Nation/che_증축.php index c0f08c63..5e983ed4 100644 --- a/hwe/sammo/Command/Nation/che_증축.php +++ b/hwe/sammo/Command/Nation/che_증축.php @@ -198,7 +198,7 @@ class che_증축 extends Command\NationCommand{ $logger->pushGlobalActionLog("{$generalName}{$josaYi} {$destCityName}{$josaUl} 증축하였습니다."); $logger->pushGlobalHistoryLog("【증축】{$nationName}{$josaYiNation} {$destCityName}{$josaUl} 증축하였습니다."); - $general->setResultTurn(new LastTurn($this->getName(), $this->arg, 0)); + $this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0)); $general->applyDB($db); return true; diff --git a/hwe/sammo/Command/Nation/che_천도.php b/hwe/sammo/Command/Nation/che_천도.php index fb404048..3acef6ac 100644 --- a/hwe/sammo/Command/Nation/che_천도.php +++ b/hwe/sammo/Command/Nation/che_천도.php @@ -235,7 +235,7 @@ class che_천도 extends Command\NationCommand $logger->pushGlobalActionLog("{$generalName}{$josaYi} {$destCityName}{$josaRo} 천도를 명령하였습니다."); $logger->pushGlobalHistoryLog("【천도】{$nationName}{$josaYiNation} {$destCityName}{$josaRo} 천도하였습니다."); - $general->setResultTurn(new LastTurn($this->getName(), $this->arg, 0)); + $this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0)); $general->applyDB($db); return true; } diff --git a/hwe/sammo/Command/Nation/che_초토화.php b/hwe/sammo/Command/Nation/che_초토화.php index 4d8a4f1c..fc2c5cef 100644 --- a/hwe/sammo/Command/Nation/che_초토화.php +++ b/hwe/sammo/Command/Nation/che_초토화.php @@ -190,7 +190,7 @@ class che_초토화 extends Command\NationCommand{ $logger->pushGlobalActionLog("{$generalName}{$josaYi} {$destCityName}{$josaUl} 초토화하였습니다."); $logger->pushGlobalHistoryLog("【초토화】{$nationName}{$josaYiNation} {$destCityName}{$josaUl} 초토화하였습니다."); - $general->setResultTurn(new LastTurn($this->getName(), $this->arg, 0)); + $this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0)); $general->applyDB($db); return true; } diff --git a/hwe/sammo/Command/Nation/che_필사즉생.php b/hwe/sammo/Command/Nation/che_필사즉생.php index af835d13..707ab769 100644 --- a/hwe/sammo/Command/Nation/che_필사즉생.php +++ b/hwe/sammo/Command/Nation/che_필사즉생.php @@ -126,7 +126,7 @@ class che_필사즉생 extends Command\NationCommand{ 'strategic_cmd_limit' => $this->getPostReqTurn() ], 'nation=%i', $nationID); - $general->setResultTurn(new LastTurn($this->getName(), $this->arg, 0)); + $this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0)); $general->applyDB($db); return true; diff --git a/hwe/sammo/Command/Nation/che_허보.php b/hwe/sammo/Command/Nation/che_허보.php index fa9d617c..e3cce769 100644 --- a/hwe/sammo/Command/Nation/che_허보.php +++ b/hwe/sammo/Command/Nation/che_허보.php @@ -207,7 +207,7 @@ class che_허보 extends Command\NationCommand 'strategic_cmd_limit' => $this->getPostReqTurn() ], 'nation=%i', $nationID); - $general->setResultTurn(new LastTurn($this->getName(), $this->arg, 0)); + $this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0)); $general->applyDB($db); return true; diff --git a/hwe/sammo/Command/Nation/휴식.php b/hwe/sammo/Command/Nation/휴식.php index add56cbb..952e68d6 100644 --- a/hwe/sammo/Command/Nation/휴식.php +++ b/hwe/sammo/Command/Nation/휴식.php @@ -32,6 +32,7 @@ class 휴식 extends Command\NationCommand{ } public function run():bool{ + $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); return true; } } \ No newline at end of file diff --git a/hwe/sammo/Command/NationCommand.php b/hwe/sammo/Command/NationCommand.php index 433a1005..ba895539 100644 --- a/hwe/sammo/Command/NationCommand.php +++ b/hwe/sammo/Command/NationCommand.php @@ -9,7 +9,7 @@ abstract class NationCommand extends BaseCommand{ public function __construct(General $generalObj, array $env, LastTurn $lastTurn, $arg = null){ $this->lastTurn = $lastTurn; - $this->resultTurn = new LastTurn(); + $this->resultTurn = $lastTurn->duplicate(); parent::__construct($generalObj, $env, $arg); } diff --git a/hwe/sammo/Constraint/OccupiedCity.php b/hwe/sammo/Constraint/OccupiedCity.php index 967426fb..d98e93b1 100644 --- a/hwe/sammo/Constraint/OccupiedCity.php +++ b/hwe/sammo/Constraint/OccupiedCity.php @@ -28,7 +28,7 @@ class OccupiedCity extends Constraint{ $this->tested = true; //재야여도 허용하는 경우 - if($this->arg[0] && $this->general['nation'] == 0){ + if($this->arg && $this->general['nation'] == 0){ return true; } diff --git a/hwe/sammo/General.php b/hwe/sammo/General.php index 5ad93842..ba839b27 100644 --- a/hwe/sammo/General.php +++ b/hwe/sammo/General.php @@ -185,7 +185,7 @@ class General implements iAction{ return $this->lastTurn; } - function setResultTurn(LastTurn $resultTurn){ + function _setResultTurn(LastTurn $resultTurn){ $this->resultTurn = $resultTurn; }