From b4b6f5a1f7098d7fe1ba0ba40c71dde5a3731df3 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 21 Apr 2019 11:43:23 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/Constraint/AdhocCallback.php | 2 +- hwe/sammo/Constraint/AllowJoinAction.php | 2 +- hwe/sammo/Constraint/AllowJoinDestNation.php | 4 ++-- hwe/sammo/Constraint/AllowRebellion.php | 2 +- hwe/sammo/Constraint/AllowStrategicCommand.php | 2 +- hwe/sammo/Constraint/AllowWar.php | 2 +- hwe/sammo/Constraint/AlwaysFail.php | 2 +- hwe/sammo/Constraint/AvailableRecruitCrewType.php | 2 +- hwe/sammo/Constraint/BattleGroundCity.php | 2 +- hwe/sammo/Constraint/BeChief.php | 2 +- hwe/sammo/Constraint/BeLord.php | 2 +- hwe/sammo/Constraint/BeNeutral.php | 2 +- hwe/sammo/Constraint/BeOpeningPart.php | 4 ++-- hwe/sammo/Constraint/CheckNationNameDuplicate.php | 2 +- hwe/sammo/Constraint/ConstructableCity.php | 4 ++-- hwe/sammo/Constraint/DifferentNationDestGeneral.php | 2 +- .../Constraint/DisallowDiplomacyBetweenStatus.php | 2 +- hwe/sammo/Constraint/DisallowDiplomacyStatus.php | 2 +- hwe/sammo/Constraint/ExistsAllowJoinNation.php | 2 +- hwe/sammo/Constraint/ExistsDestGeneral.php | 2 +- hwe/sammo/Constraint/ExistsDestNation.php | 2 +- hwe/sammo/Constraint/FriendlyDestGeneral.php | 2 +- hwe/sammo/Constraint/MustBeNPC.php | 2 +- hwe/sammo/Constraint/MustBeTroopLeader.php | 2 +- hwe/sammo/Constraint/NearCity.php | 2 +- hwe/sammo/Constraint/NotBeNeutral.php | 2 +- hwe/sammo/Constraint/NotCapital.php | 2 +- hwe/sammo/Constraint/NotChief.php | 2 +- hwe/sammo/Constraint/NotLord.php | 2 +- hwe/sammo/Constraint/NotNeutralDestCity.php | 2 +- hwe/sammo/Constraint/NotOccupiedDestCity.php | 2 +- hwe/sammo/Constraint/NotOpeningPart.php | 4 ++-- hwe/sammo/Constraint/NotSameDestCity.php | 2 +- hwe/sammo/Constraint/NotWanderingNation.php | 2 +- hwe/sammo/Constraint/OccupiedCity.php | 2 +- hwe/sammo/Constraint/OccupiedDestCity.php | 2 +- hwe/sammo/Constraint/RemainCityCapacity.php | 3 ++- hwe/sammo/Constraint/RemainCityTrust.php | 3 ++- hwe/sammo/Constraint/ReqCityCapacity.php | 5 +++-- hwe/sammo/Constraint/ReqCityTrader.php | 2 +- hwe/sammo/Constraint/ReqCityTrust.php | 2 +- hwe/sammo/Constraint/ReqEnvValue.php | 6 +++--- hwe/sammo/Constraint/ReqGeneralAtmosMargin.php | 2 +- hwe/sammo/Constraint/ReqGeneralCrew.php | 2 +- hwe/sammo/Constraint/ReqGeneralCrewMargin.php | 13 ++++++------- hwe/sammo/Constraint/ReqGeneralGold.php | 2 +- hwe/sammo/Constraint/ReqGeneralRice.php | 2 +- hwe/sammo/Constraint/ReqGeneralTrainMargin.php | 2 +- hwe/sammo/Constraint/ReqGeneralValue.php | 7 ++++--- hwe/sammo/Constraint/ReqNationValue.php | 7 ++++--- hwe/sammo/Constraint/ReqNationalGold.php | 2 +- hwe/sammo/Constraint/ReqNationalRice.php | 2 +- hwe/sammo/Constraint/ReqTroopMembers.php | 2 +- hwe/sammo/Constraint/SuppliedCity.php | 2 +- hwe/sammo/Constraint/SuppliedDestCity.php | 2 +- hwe/sammo/Constraint/WanderingNation.php | 2 +- 56 files changed, 77 insertions(+), 73 deletions(-) diff --git a/hwe/sammo/Constraint/AdhocCallback.php b/hwe/sammo/Constraint/AdhocCallback.php index 1bc2f0d1..a627ee9d 100644 --- a/hwe/sammo/Constraint/AdhocCallback.php +++ b/hwe/sammo/Constraint/AdhocCallback.php @@ -8,7 +8,7 @@ class AdhocCallback extends Constraint{ const REQ_VALUES = Constraint::REQ_ARG; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/AllowJoinAction.php b/hwe/sammo/Constraint/AllowJoinAction.php index abc72033..9e2a53ed 100644 --- a/hwe/sammo/Constraint/AllowJoinAction.php +++ b/hwe/sammo/Constraint/AllowJoinAction.php @@ -7,7 +7,7 @@ class AllowJoinAction extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/AllowJoinDestNation.php b/hwe/sammo/Constraint/AllowJoinDestNation.php index 7dbb51ba..4de94521 100644 --- a/hwe/sammo/Constraint/AllowJoinDestNation.php +++ b/hwe/sammo/Constraint/AllowJoinDestNation.php @@ -10,7 +10,7 @@ class AllowJoinDestNation extends Constraint{ protected $relYear; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } @@ -40,7 +40,7 @@ class AllowJoinDestNation extends Constraint{ $db = DB::db(); - if($relYear < GameConst::$openingPartYear && $this->destNation['gennum'] >= GameConst::$initialNationGenLimit){ + if($this->relYear < GameConst::$openingPartYear && $this->destNation['gennum'] >= GameConst::$initialNationGenLimit){ $this->reason = "임관이 제한되고 있습니다."; return false; } diff --git a/hwe/sammo/Constraint/AllowRebellion.php b/hwe/sammo/Constraint/AllowRebellion.php index 1c1a3bc1..0351c352 100644 --- a/hwe/sammo/Constraint/AllowRebellion.php +++ b/hwe/sammo/Constraint/AllowRebellion.php @@ -11,7 +11,7 @@ class AllowRebellion extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/AllowStrategicCommand.php b/hwe/sammo/Constraint/AllowStrategicCommand.php index 122b0e00..d1eaf61f 100644 --- a/hwe/sammo/Constraint/AllowStrategicCommand.php +++ b/hwe/sammo/Constraint/AllowStrategicCommand.php @@ -6,7 +6,7 @@ class AllowWar extends Constraint{ const REQ_VALUES = Constraint::REQ_NATION; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/AllowWar.php b/hwe/sammo/Constraint/AllowWar.php index 122b0e00..d1eaf61f 100644 --- a/hwe/sammo/Constraint/AllowWar.php +++ b/hwe/sammo/Constraint/AllowWar.php @@ -6,7 +6,7 @@ class AllowWar extends Constraint{ const REQ_VALUES = Constraint::REQ_NATION; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/AlwaysFail.php b/hwe/sammo/Constraint/AlwaysFail.php index ed2ad7d2..deea7e00 100644 --- a/hwe/sammo/Constraint/AlwaysFail.php +++ b/hwe/sammo/Constraint/AlwaysFail.php @@ -8,7 +8,7 @@ class AlwaysFail extends Constraint{ const REQ_VALUES = Constraint::REQ_STRING_ARG; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/AvailableRecruitCrewType.php b/hwe/sammo/Constraint/AvailableRecruitCrewType.php index 6d6b8433..2c74c40d 100644 --- a/hwe/sammo/Constraint/AvailableRecruitCrewType.php +++ b/hwe/sammo/Constraint/AvailableRecruitCrewType.php @@ -9,7 +9,7 @@ class AvailableRecruitCrewType extends Constraint{ const REQ_VALUES = Constraint::REQ_NATION|Constraint::REQ_INT_ARG; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/BattleGroundCity.php b/hwe/sammo/Constraint/BattleGroundCity.php index 9ae63add..eac3866f 100644 --- a/hwe/sammo/Constraint/BattleGroundCity.php +++ b/hwe/sammo/Constraint/BattleGroundCity.php @@ -7,7 +7,7 @@ class BattleGroundCity extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_DEST_CITY|Constraint::REQ_BOOLEAN_ARG; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/BeChief.php b/hwe/sammo/Constraint/BeChief.php index de53a291..b96328d0 100644 --- a/hwe/sammo/Constraint/BeChief.php +++ b/hwe/sammo/Constraint/BeChief.php @@ -6,7 +6,7 @@ class BeChief extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/BeLord.php b/hwe/sammo/Constraint/BeLord.php index 30922c5e..a6ce1f3b 100644 --- a/hwe/sammo/Constraint/BeLord.php +++ b/hwe/sammo/Constraint/BeLord.php @@ -6,7 +6,7 @@ class BeLord extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/BeNeutral.php b/hwe/sammo/Constraint/BeNeutral.php index 73b7682f..557f1b0a 100644 --- a/hwe/sammo/Constraint/BeNeutral.php +++ b/hwe/sammo/Constraint/BeNeutral.php @@ -6,7 +6,7 @@ class BeNeutral extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/BeOpeningPart.php b/hwe/sammo/Constraint/BeOpeningPart.php index cec24aaa..2e156445 100644 --- a/hwe/sammo/Constraint/BeOpeningPart.php +++ b/hwe/sammo/Constraint/BeOpeningPart.php @@ -8,7 +8,7 @@ class BeOpeningPart extends Constraint{ protected $relYear; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } @@ -21,7 +21,7 @@ class BeOpeningPart extends Constraint{ $this->checkInputValues(); $this->tested = true; - if($relYear < GameConst::$openingPartYear){ + if($this->relYear < GameConst::$openingPartYear){ return true; } diff --git a/hwe/sammo/Constraint/CheckNationNameDuplicate.php b/hwe/sammo/Constraint/CheckNationNameDuplicate.php index 9487f195..13653b7b 100644 --- a/hwe/sammo/Constraint/CheckNationNameDuplicate.php +++ b/hwe/sammo/Constraint/CheckNationNameDuplicate.php @@ -9,7 +9,7 @@ class CheckNationNameDuplicate extends Constraint{ protected $relYear; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/ConstructableCity.php b/hwe/sammo/Constraint/ConstructableCity.php index 026cd8cc..a73642f5 100644 --- a/hwe/sammo/Constraint/ConstructableCity.php +++ b/hwe/sammo/Constraint/ConstructableCity.php @@ -8,7 +8,7 @@ class ConstructableCity extends Constraint{ protected $relYear; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } @@ -29,7 +29,7 @@ class ConstructableCity extends Constraint{ $this->checkInputValues(); $this->tested = true; - $city = $this->city(); + $city = $this->city; if($city['nation'] != 0){ $this->reason = '공백지가 아닙니다.'; diff --git a/hwe/sammo/Constraint/DifferentNationDestGeneral.php b/hwe/sammo/Constraint/DifferentNationDestGeneral.php index b7bc2119..281c209e 100644 --- a/hwe/sammo/Constraint/DifferentNationDestGeneral.php +++ b/hwe/sammo/Constraint/DifferentNationDestGeneral.php @@ -6,7 +6,7 @@ class DifferentNationDestGeneral extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_DEST_GENERAL; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/DisallowDiplomacyBetweenStatus.php b/hwe/sammo/Constraint/DisallowDiplomacyBetweenStatus.php index f4611db0..6a3a9e27 100644 --- a/hwe/sammo/Constraint/DisallowDiplomacyBetweenStatus.php +++ b/hwe/sammo/Constraint/DisallowDiplomacyBetweenStatus.php @@ -12,7 +12,7 @@ class DisallowDiplomacyBetweenStatus extends Constraint{ protected $disallowStatus = []; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/DisallowDiplomacyStatus.php b/hwe/sammo/Constraint/DisallowDiplomacyStatus.php index 54097d0c..fcfe6a01 100644 --- a/hwe/sammo/Constraint/DisallowDiplomacyStatus.php +++ b/hwe/sammo/Constraint/DisallowDiplomacyStatus.php @@ -11,7 +11,7 @@ class DisallowDiplomacyStatus extends Constraint{ protected $disallowStatus = []; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/ExistsAllowJoinNation.php b/hwe/sammo/Constraint/ExistsAllowJoinNation.php index aabc5f3c..65fb3687 100644 --- a/hwe/sammo/Constraint/ExistsAllowJoinNation.php +++ b/hwe/sammo/Constraint/ExistsAllowJoinNation.php @@ -10,7 +10,7 @@ class AllowJoinDestNation extends Constraint{ protected $relYear; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/ExistsDestGeneral.php b/hwe/sammo/Constraint/ExistsDestGeneral.php index ac3ab9fe..05eda6dc 100644 --- a/hwe/sammo/Constraint/ExistsDestGeneral.php +++ b/hwe/sammo/Constraint/ExistsDestGeneral.php @@ -6,7 +6,7 @@ class ExistsDestGeneral extends Constraint{ const REQ_VALUES = Constraint::REQ_DEST_GENERAL; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/ExistsDestNation.php b/hwe/sammo/Constraint/ExistsDestNation.php index 407bfd4f..9d0a7bf4 100644 --- a/hwe/sammo/Constraint/ExistsDestNation.php +++ b/hwe/sammo/Constraint/ExistsDestNation.php @@ -6,7 +6,7 @@ class ExistsDestNation extends Constraint{ const REQ_VALUES = Constraint::REQ_DEST_NATION; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/FriendlyDestGeneral.php b/hwe/sammo/Constraint/FriendlyDestGeneral.php index 42a6818b..43d2350a 100644 --- a/hwe/sammo/Constraint/FriendlyDestGeneral.php +++ b/hwe/sammo/Constraint/FriendlyDestGeneral.php @@ -6,7 +6,7 @@ class FriendlyDestGeneral extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_DEST_GENERAL; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/MustBeNPC.php b/hwe/sammo/Constraint/MustBeNPC.php index 7787ad4e..885fdd60 100644 --- a/hwe/sammo/Constraint/MustBeNPC.php +++ b/hwe/sammo/Constraint/MustBeNPC.php @@ -5,7 +5,7 @@ namespace sammo\Constraint; class MustBeNPC extends Constraint{ public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/MustBeTroopLeader.php b/hwe/sammo/Constraint/MustBeTroopLeader.php index 66bdd46d..685036c9 100644 --- a/hwe/sammo/Constraint/MustBeTroopLeader.php +++ b/hwe/sammo/Constraint/MustBeTroopLeader.php @@ -8,7 +8,7 @@ class MustBeTroopLeader extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/NearCity.php b/hwe/sammo/Constraint/NearCity.php index f48cc9b9..77e107cb 100644 --- a/hwe/sammo/Constraint/NearCity.php +++ b/hwe/sammo/Constraint/NearCity.php @@ -6,7 +6,7 @@ class NearCity extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_DEST_CITY|Constraint::REQ_NUMERIC_ARG; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/NotBeNeutral.php b/hwe/sammo/Constraint/NotBeNeutral.php index 8ecd8a1f..e95dbade 100644 --- a/hwe/sammo/Constraint/NotBeNeutral.php +++ b/hwe/sammo/Constraint/NotBeNeutral.php @@ -6,7 +6,7 @@ class NotBeNeutral extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/NotCapital.php b/hwe/sammo/Constraint/NotCapital.php index c25c4a80..2725fe88 100644 --- a/hwe/sammo/Constraint/NotCapital.php +++ b/hwe/sammo/Constraint/NotCapital.php @@ -6,7 +6,7 @@ class NotCapital extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_NATION|Constraint::REQ_BOOLEAN_ARG; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/NotChief.php b/hwe/sammo/Constraint/NotChief.php index f5e39043..fde27dbd 100644 --- a/hwe/sammo/Constraint/NotChief.php +++ b/hwe/sammo/Constraint/NotChief.php @@ -6,7 +6,7 @@ class NotChief extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/NotLord.php b/hwe/sammo/Constraint/NotLord.php index 6aad5612..a268629d 100644 --- a/hwe/sammo/Constraint/NotLord.php +++ b/hwe/sammo/Constraint/NotLord.php @@ -6,7 +6,7 @@ class NotLord extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/NotNeutralDestCity.php b/hwe/sammo/Constraint/NotNeutralDestCity.php index 3e2564bf..1b576c06 100644 --- a/hwe/sammo/Constraint/NotNeutralDestCity.php +++ b/hwe/sammo/Constraint/NotNeutralDestCity.php @@ -6,7 +6,7 @@ class NotBeNeutral extends Constraint{ const REQ_VALUES = Constraint::REQ_DEST_CITY; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/NotOccupiedDestCity.php b/hwe/sammo/Constraint/NotOccupiedDestCity.php index 26040a50..e32092b9 100644 --- a/hwe/sammo/Constraint/NotOccupiedDestCity.php +++ b/hwe/sammo/Constraint/NotOccupiedDestCity.php @@ -6,7 +6,7 @@ class NotOccupiedDestCity extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_DEST_CITY; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/NotOpeningPart.php b/hwe/sammo/Constraint/NotOpeningPart.php index d1aad147..337d48d7 100644 --- a/hwe/sammo/Constraint/NotOpeningPart.php +++ b/hwe/sammo/Constraint/NotOpeningPart.php @@ -8,7 +8,7 @@ class NotOpeningPart extends Constraint{ protected $relYear; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } @@ -21,7 +21,7 @@ class NotOpeningPart extends Constraint{ $this->checkInputValues(); $this->tested = true; - if($relYear >= GameConst::$openingPartYear){ + if($this->relYear >= GameConst::$openingPartYear){ return true; } diff --git a/hwe/sammo/Constraint/NotSameDestCity.php b/hwe/sammo/Constraint/NotSameDestCity.php index a0c41502..7711498b 100644 --- a/hwe/sammo/Constraint/NotSameDestCity.php +++ b/hwe/sammo/Constraint/NotSameDestCity.php @@ -6,7 +6,7 @@ class NotSameDestCity extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_DEST_CITY; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/NotWanderingNation.php b/hwe/sammo/Constraint/NotWanderingNation.php index 52deff06..5b43756c 100644 --- a/hwe/sammo/Constraint/NotWanderingNation.php +++ b/hwe/sammo/Constraint/NotWanderingNation.php @@ -6,7 +6,7 @@ class NotWanderingNation extends Constraint{ const REQ_VALUES = Constraint::REQ_NATION; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/OccupiedCity.php b/hwe/sammo/Constraint/OccupiedCity.php index 788280ac..72ac4c69 100644 --- a/hwe/sammo/Constraint/OccupiedCity.php +++ b/hwe/sammo/Constraint/OccupiedCity.php @@ -6,7 +6,7 @@ class OccupiedCity extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_CITY|Constraint::REQ_BOOLEAN_ARG; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/OccupiedDestCity.php b/hwe/sammo/Constraint/OccupiedDestCity.php index 37506323..efceccaf 100644 --- a/hwe/sammo/Constraint/OccupiedDestCity.php +++ b/hwe/sammo/Constraint/OccupiedDestCity.php @@ -6,7 +6,7 @@ class OccupiedDestCity extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_DEST_CITY; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/RemainCityCapacity.php b/hwe/sammo/Constraint/RemainCityCapacity.php index d4617208..f83c05ab 100644 --- a/hwe/sammo/Constraint/RemainCityCapacity.php +++ b/hwe/sammo/Constraint/RemainCityCapacity.php @@ -12,7 +12,7 @@ class RemainCityCapacity extends Constraint{ protected $keyNick; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } @@ -35,6 +35,7 @@ class RemainCityCapacity extends Constraint{ public function test():bool{ $this->checkInputValues(); $this->tested = true; + $keyNick = $this->keyNick; if($this->city[$this->key] < $this->city[$this->maxKey]){ return true; diff --git a/hwe/sammo/Constraint/RemainCityTrust.php b/hwe/sammo/Constraint/RemainCityTrust.php index 0ee43235..774b60ef 100644 --- a/hwe/sammo/Constraint/RemainCityTrust.php +++ b/hwe/sammo/Constraint/RemainCityTrust.php @@ -12,7 +12,7 @@ class RemainCityTrust extends Constraint{ protected $keyNick; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } @@ -31,6 +31,7 @@ class RemainCityTrust extends Constraint{ public function test():bool{ $this->checkInputValues(); $this->tested = true; + $keyNick = $this->keyNick; if($this->city[$this->key] < $this->maxVal){ return true; diff --git a/hwe/sammo/Constraint/ReqCityCapacity.php b/hwe/sammo/Constraint/ReqCityCapacity.php index 82fa23b0..cc5f287c 100644 --- a/hwe/sammo/Constraint/ReqCityCapacity.php +++ b/hwe/sammo/Constraint/ReqCityCapacity.php @@ -14,7 +14,7 @@ class ReqCityCapacity extends Constraint{ protected $reqVal; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } @@ -50,6 +50,7 @@ class ReqCityCapacity extends Constraint{ public function test():bool{ $this->checkInputValues(); $this->tested = true; + $keyNick = $this->keyNick; if($this->isPercent){ if($this->city[$this->key] >= $this->city[$this->maxKey] * $this->reqVal){ @@ -64,7 +65,7 @@ class ReqCityCapacity extends Constraint{ } $josaYi = JosaUtil::pick($keyNick, '이'); - $this->reason = "{$keyNick}{$josaUn} 부족합니다."; + $this->reason = "{$keyNick}{$josaYi} 부족합니다."; return false; } } \ No newline at end of file diff --git a/hwe/sammo/Constraint/ReqCityTrader.php b/hwe/sammo/Constraint/ReqCityTrader.php index eb1387af..2e6cd162 100644 --- a/hwe/sammo/Constraint/ReqCityTrader.php +++ b/hwe/sammo/Constraint/ReqCityTrader.php @@ -6,7 +6,7 @@ class ReqCityTrader extends Constraint{ const REQ_VALUES = Constraint::REQ_CITY|Constraint::REQ_INT_ARG; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/ReqCityTrust.php b/hwe/sammo/Constraint/ReqCityTrust.php index 9f476713..7688e15c 100644 --- a/hwe/sammo/Constraint/ReqCityTrust.php +++ b/hwe/sammo/Constraint/ReqCityTrust.php @@ -12,7 +12,7 @@ class RemainCityTrust extends Constraint{ protected $keyNick; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/ReqEnvValue.php b/hwe/sammo/Constraint/ReqEnvValue.php index 17544a43..4df65e36 100644 --- a/hwe/sammo/Constraint/ReqEnvValue.php +++ b/hwe/sammo/Constraint/ReqEnvValue.php @@ -18,7 +18,7 @@ class ReqEnvValue extends Constraint{ protected $msg; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } @@ -62,13 +62,13 @@ class ReqEnvValue extends Constraint{ '=='=>function($target, $src){ return ($target == $src); }, - '!='=>function($targeta, $src){ + '!='=>function($target, $src){ return ($target != $src); }, '==='=>function($target, $src){ return ($target === $src); }, - '!=='=>function($targeta, $src){ + '!=='=>function($target, $src){ return ($target !== $src); }, '>='=>function($target, $src){ diff --git a/hwe/sammo/Constraint/ReqGeneralAtmosMargin.php b/hwe/sammo/Constraint/ReqGeneralAtmosMargin.php index 51555dae..b331c943 100644 --- a/hwe/sammo/Constraint/ReqGeneralAtmosMargin.php +++ b/hwe/sammo/Constraint/ReqGeneralAtmosMargin.php @@ -7,7 +7,7 @@ class ReqGeneralAtmosMargin extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_INT_ARG; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/ReqGeneralCrew.php b/hwe/sammo/Constraint/ReqGeneralCrew.php index 8cfae2a4..132a04a8 100644 --- a/hwe/sammo/Constraint/ReqGeneralCrew.php +++ b/hwe/sammo/Constraint/ReqGeneralCrew.php @@ -6,7 +6,7 @@ class ReqGeneralCrew extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/ReqGeneralCrewMargin.php b/hwe/sammo/Constraint/ReqGeneralCrewMargin.php index bf0c2633..4c5db62c 100644 --- a/hwe/sammo/Constraint/ReqGeneralCrewMargin.php +++ b/hwe/sammo/Constraint/ReqGeneralCrewMargin.php @@ -6,10 +6,12 @@ use sammo\GameUnitConst; use sammo\General; class ReqGeneralCrewMargin extends Constraint{ + + protected $crewType; const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_INT_ARG; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } @@ -25,22 +27,19 @@ class ReqGeneralCrewMargin extends Constraint{ } } + $this->crewType = $this->arg; + return true; } public function test():bool{ $this->checkInputValues(); $this->tested = true; - - if($crewType != $this->general['crewtype']){ - return true; - } + $reqCrewType = GameUnitConst::byID($this->arg); //XXX: 왜 General -> obj -> General 변환을 하고 있나? $generalObj = new General($this->general, null, null, null, false); - $reqCrewType = GameUnitConst::byID($this->arg); - if($reqCrewType->id != $generalObj->getCrewTypeObj()->id){ return true; } diff --git a/hwe/sammo/Constraint/ReqGeneralGold.php b/hwe/sammo/Constraint/ReqGeneralGold.php index 2d33f0b9..f54f7ef7 100644 --- a/hwe/sammo/Constraint/ReqGeneralGold.php +++ b/hwe/sammo/Constraint/ReqGeneralGold.php @@ -6,7 +6,7 @@ class ReqGeneralGold extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_NUMERIC_ARG; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/ReqGeneralRice.php b/hwe/sammo/Constraint/ReqGeneralRice.php index 40d3246a..6e1e3d67 100644 --- a/hwe/sammo/Constraint/ReqGeneralRice.php +++ b/hwe/sammo/Constraint/ReqGeneralRice.php @@ -6,7 +6,7 @@ class ReqGeneralRice extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_NUMERIC_ARG; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/ReqGeneralTrainMargin.php b/hwe/sammo/Constraint/ReqGeneralTrainMargin.php index 4cde1a55..f14af95c 100644 --- a/hwe/sammo/Constraint/ReqGeneralTrainMargin.php +++ b/hwe/sammo/Constraint/ReqGeneralTrainMargin.php @@ -7,7 +7,7 @@ class ReqGeneralTrainMargin extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_INT_ARG; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/ReqGeneralValue.php b/hwe/sammo/Constraint/ReqGeneralValue.php index 4e4a793a..8a165076 100644 --- a/hwe/sammo/Constraint/ReqGeneralValue.php +++ b/hwe/sammo/Constraint/ReqGeneralValue.php @@ -18,7 +18,7 @@ class ReqGeneralValue extends Constraint{ protected $comp; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } @@ -67,6 +67,7 @@ class ReqGeneralValue extends Constraint{ public function test():bool{ $this->checkInputValues(); $this->tested = true; + $keyNick = $this->keyNick; if ($this->isPercent) { $reqVal = $this->general[$this->maxKey] * $this->reqVal; @@ -85,13 +86,13 @@ class ReqGeneralValue extends Constraint{ '=='=>function($target, $src)use($keyNick){ return ($target == $src)?true:"올바르지 않은 {$keyNick} 입니다."; }, - '!='=>function($targeta, $src)use($keyNick){ + '!='=>function($target, $src)use($keyNick){ return ($target != $src)?true:"올바르지 않은 {$keyNick} 입니다."; }, '==='=>function($target, $src)use($keyNick){ return ($target === $src)?true:"올바르지 않은 {$keyNick} 입니다."; }, - '!=='=>function($targeta, $src)use($keyNick){ + '!=='=>function($target, $src)use($keyNick){ return ($target !== $src)?true:"올바르지 않은 {$keyNick} 입니다."; }, '>='=>function($target, $src){ diff --git a/hwe/sammo/Constraint/ReqNationValue.php b/hwe/sammo/Constraint/ReqNationValue.php index 128cfba0..16364334 100644 --- a/hwe/sammo/Constraint/ReqNationValue.php +++ b/hwe/sammo/Constraint/ReqNationValue.php @@ -18,7 +18,7 @@ class ReqNationValue extends Constraint{ protected $comp; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } @@ -67,6 +67,7 @@ class ReqNationValue extends Constraint{ public function test():bool{ $this->checkInputValues(); $this->tested = true; + $keyNick = $this->keyNick; if ($this->isPercent) { $reqVal = $this->nation[$this->maxKey] * $this->reqVal; @@ -85,13 +86,13 @@ class ReqNationValue extends Constraint{ '=='=>function($target, $src)use($keyNick){ return ($target == $src)?true:"올바르지 않은 {$keyNick} 입니다."; }, - '!='=>function($targeta, $src)use($keyNick){ + '!='=>function($target, $src)use($keyNick){ return ($target != $src)?true:"올바르지 않은 {$keyNick} 입니다."; }, '==='=>function($target, $src)use($keyNick){ return ($target === $src)?true:"올바르지 않은 {$keyNick} 입니다."; }, - '!=='=>function($targeta, $src)use($keyNick){ + '!=='=>function($target, $src)use($keyNick){ return ($target !== $src)?true:"올바르지 않은 {$keyNick} 입니다."; }, '>='=>function($target, $src){ diff --git a/hwe/sammo/Constraint/ReqNationalGold.php b/hwe/sammo/Constraint/ReqNationalGold.php index 77dcbeb5..6183305b 100644 --- a/hwe/sammo/Constraint/ReqNationalGold.php +++ b/hwe/sammo/Constraint/ReqNationalGold.php @@ -6,7 +6,7 @@ class ReqNationGold extends Constraint{ const REQ_VALUES = Constraint::REQ_NATION|Constraint::REQ_NUMERIC_ARG; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/ReqNationalRice.php b/hwe/sammo/Constraint/ReqNationalRice.php index 19e21071..1b7d4a90 100644 --- a/hwe/sammo/Constraint/ReqNationalRice.php +++ b/hwe/sammo/Constraint/ReqNationalRice.php @@ -6,7 +6,7 @@ class ReqNationRice extends Constraint{ const REQ_VALUES = Constraint::REQ_NATION|Constraint::REQ_NUMERIC_ARG; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/ReqTroopMembers.php b/hwe/sammo/Constraint/ReqTroopMembers.php index f764e3bf..78de204f 100644 --- a/hwe/sammo/Constraint/ReqTroopMembers.php +++ b/hwe/sammo/Constraint/ReqTroopMembers.php @@ -7,7 +7,7 @@ class ReqTroopMembers extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/SuppliedCity.php b/hwe/sammo/Constraint/SuppliedCity.php index 86144d2f..625ef0a4 100644 --- a/hwe/sammo/Constraint/SuppliedCity.php +++ b/hwe/sammo/Constraint/SuppliedCity.php @@ -6,7 +6,7 @@ class SuppliedCity extends Constraint{ const REQ_VALUES = Constraint::REQ_CITY; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/SuppliedDestCity.php b/hwe/sammo/Constraint/SuppliedDestCity.php index 21fd1ec8..f1b7bb6f 100644 --- a/hwe/sammo/Constraint/SuppliedDestCity.php +++ b/hwe/sammo/Constraint/SuppliedDestCity.php @@ -6,7 +6,7 @@ class SuppliedDestCity extends Constraint{ const REQ_VALUES = Constraint::REQ_DEST_CITY; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; } diff --git a/hwe/sammo/Constraint/WanderingNation.php b/hwe/sammo/Constraint/WanderingNation.php index 2ead535c..0494783b 100644 --- a/hwe/sammo/Constraint/WanderingNation.php +++ b/hwe/sammo/Constraint/WanderingNation.php @@ -6,7 +6,7 @@ class WanderingNation extends Constraint{ const REQ_VALUES = Constraint::REQ_NATION; public function checkInputValues(bool $throwExeception=true){ - if(!parent::checkInputValues($throwExeception) && !$throwException){ + if(!parent::checkInputValues($throwExeception) && !$throwExeception){ return false; }