From 62f53d09bfa3290b62bd572a785dfca99c58c52a Mon Sep 17 00:00:00 2001 From: Hide_D Date: Tue, 6 Sep 2022 19:48:52 +0900 Subject: [PATCH] =?UTF-8?q?feat,=20game:=20=EC=A7=95=EB=B3=91=20=EC=A0=84?= =?UTF-8?q?=ED=8A=B9=20=EB=A6=AC=EB=B0=B8=EB=9F=B0=EC=8B=B1,=20=EC=A7=95?= =?UTF-8?q?=EB=B3=91/=EC=86=8C=EC=A7=91=ED=95=B4=EC=A0=9C=EC=8B=9C=20?= =?UTF-8?q?=EC=9D=B8=EA=B5=AC=20=EB=B3=80=EB=8F=99=20=ED=8A=B8=EB=A6=AC?= =?UTF-8?q?=EA=B1=B0=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/ActionItem/che_징병_낙주.php | 6 +++++- hwe/sammo/ActionItem/event_전투특기_징병.php | 14 +++++++++++++- .../ActionSpecialDomestic/che_event_징병.php | 16 ++++++++++++++-- hwe/sammo/ActionSpecialWar/che_징병.php | 16 ++++++++++++++-- hwe/sammo/Command/General/che_소집해제.php | 6 +++--- hwe/sammo/Command/General/che_징병.php | 17 +++++++++++------ hwe/sammo/GeneralTrigger/che_병력군량소모.php | 3 ++- 7 files changed, 62 insertions(+), 16 deletions(-) diff --git a/hwe/sammo/ActionItem/che_징병_낙주.php b/hwe/sammo/ActionItem/che_징병_낙주.php index e12e1c3a..c2b1e901 100644 --- a/hwe/sammo/ActionItem/che_징병_낙주.php +++ b/hwe/sammo/ActionItem/che_징병_낙주.php @@ -9,7 +9,7 @@ class che_징병_낙주 extends \sammo\BaseItem{ protected $rawName = '낙주'; protected $name = '낙주(징병)'; - protected $info = '[군사] 징·모병비 -30%, 통솔 순수 능력치 보정 +15%'; + protected $info = '[군사] 징·모병비 -30%
[기타] 통솔 순수 능력치 보정 +15%, 징병/모병/소집해제 시 인구 변동 없음'; protected $cost = 200; protected $consumable = false; @@ -18,6 +18,10 @@ class che_징병_낙주 extends \sammo\BaseItem{ if($varType == 'cost') return $value * 0.7; } + if($turnType == '징집인구' && $varType == 'score'){ + return 0; + } + return $value; } diff --git a/hwe/sammo/ActionItem/event_전투특기_징병.php b/hwe/sammo/ActionItem/event_전투특기_징병.php index ceb94e50..17345e9a 100644 --- a/hwe/sammo/ActionItem/event_전투특기_징병.php +++ b/hwe/sammo/ActionItem/event_전투특기_징병.php @@ -9,7 +9,7 @@ class event_전투특기_징병 extends \sammo\BaseItem{ protected $rawName = '비급'; protected $name = '비급(징병)'; - protected $info = '[군사] 징·모병비 -50%, 통솔 순수 능력치 보정 +25%'; + protected $info = '[군사] 징병/모병 시 훈사 70/84 제공
[기타] 통솔 순수 능력치 보정 +25%, 징병/모병/소집해제 시 인구 변동 없음'; protected $cost = 100; protected $buyable = true; protected $consumable = false; @@ -18,6 +18,18 @@ class event_전투특기_징병 extends \sammo\BaseItem{ public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{ if(in_array($turnType, ['징병', '모병'])){ if($varType == 'cost') return $value * 0.5; + if($varType == 'train' || $varType == 'atmos'){ + if($turnType === '징병'){ + return 70; + } + else{ + return 84; + } + } + } + + if($turnType == '징집인구' && $varType == 'score'){ + return 0; } return $value; diff --git a/hwe/sammo/ActionSpecialDomestic/che_event_징병.php b/hwe/sammo/ActionSpecialDomestic/che_event_징병.php index 50671021..56089a7f 100644 --- a/hwe/sammo/ActionSpecialDomestic/che_event_징병.php +++ b/hwe/sammo/ActionSpecialDomestic/che_event_징병.php @@ -9,7 +9,7 @@ class che_event_징병 extends \sammo\BaseSpecial{ protected $id = 72; protected $name = '징병'; - protected $info = '[군사] 징·모병비 -50%, 통솔 순수 능력치 보정 +25%'; + protected $info = '[군사] 징병/모병 시 훈사 70/84 제공
[기타] 통솔 순수 능력치 보정 +25%, 징병/모병/소집해제 시 인구 변동 없음'; static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeight = 1; @@ -22,8 +22,20 @@ class che_event_징병 extends \sammo\BaseSpecial{ public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{ if(in_array($turnType, ['징병', '모병'])){ if($varType == 'cost') return $value * 0.5; + if($varType == 'train' || $varType == 'atmos'){ + if($turnType === '징병'){ + return 70; + } + else{ + return 84; + } + } } - + + if($turnType == '징집인구' && $varType == 'score'){ + return 0; + } + return $value; } diff --git a/hwe/sammo/ActionSpecialWar/che_징병.php b/hwe/sammo/ActionSpecialWar/che_징병.php index 2256f35b..72fbc8eb 100644 --- a/hwe/sammo/ActionSpecialWar/che_징병.php +++ b/hwe/sammo/ActionSpecialWar/che_징병.php @@ -9,7 +9,7 @@ class che_징병 extends \sammo\BaseSpecial{ protected $id = 72; protected $name = '징병'; - protected $info = '[군사] 징·모병비 -50%, 통솔 순수 능력치 보정 +25%'; + protected $info = '[군사] 징병/모병 시 훈사 70/84 제공
[기타] 통솔 순수 능력치 보정 +25%, 징병/모병/소집해제 시 인구 변동 없음'; static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeight = 1; @@ -22,8 +22,20 @@ class che_징병 extends \sammo\BaseSpecial{ public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{ if(in_array($turnType, ['징병', '모병'])){ if($varType == 'cost') return $value * 0.5; + if($varType == 'train' || $varType == 'atmos'){ + if($turnType === '징병'){ + return 70; + } + else{ + return 84; + } + } } - + + if($turnType == '징집인구' && $varType == 'score'){ + return 0; + } + return $value; } diff --git a/hwe/sammo/Command/General/che_소집해제.php b/hwe/sammo/Command/General/che_소집해제.php index f4a9b84f..3826d005 100644 --- a/hwe/sammo/Command/General/che_소집해제.php +++ b/hwe/sammo/Command/General/che_소집해제.php @@ -62,8 +62,6 @@ class che_소집해제 extends Command\GeneralCommand{ $general = $this->generalObj; $date = $general->getTurnTime($general::TURNTIME_HM); - $crew = $general->getVar('crew'); - $logger = $general->getLogger(); $logger->pushGeneralActionLog("병사들을 소집해제하였습니다. <1>$date"); @@ -71,8 +69,10 @@ class che_소집해제 extends Command\GeneralCommand{ $exp = 70; $ded = 100; + $crewUp = $general->onCalcDomestic('징집인구', 'score', $general->getVar('crew')); + $db->update('city', [ - 'pop'=>$db->sqleval('pop + %i', $crew) + 'pop'=>$db->sqleval('pop + %i', $crewUp) ], 'city=%i', $general->getCityID()); $general->setVar('crew', 0); diff --git a/hwe/sammo/Command/General/che_징병.php b/hwe/sammo/Command/General/che_징병.php index 3e538c9c..e733dcce 100644 --- a/hwe/sammo/Command/General/che_징병.php +++ b/hwe/sammo/Command/General/che_징병.php @@ -184,10 +184,13 @@ class che_징병 extends Command\GeneralCommand $logger = $general->getLogger(); + $setTrain = $general->onCalcDomestic(static::$actionName, 'train', static::$defaultTrain); + $setAtmos = $general->onCalcDomestic(static::$actionName, 'atmos', static::$defaultAtmos); + if ($reqCrewType->id == $currCrewType->id && $currCrew > 0) { $logger->pushGeneralActionLog("{$crewTypeName} {$reqCrewText}명을 추가{$this->getName()}했습니다. <1>$date"); - $train = ($currCrew * $general->getVar('train') + $reqCrew * static::$defaultTrain) / ($currCrew + $reqCrew); - $atmos = ($currCrew * $general->getVar('atmos') + $reqCrew * static::$defaultAtmos) / ($currCrew + $reqCrew); + $train = ($currCrew * $general->getVar('train') + $reqCrew * $setTrain) / ($currCrew + $reqCrew); + $atmos = ($currCrew * $general->getVar('atmos') + $reqCrew * $setAtmos) / ($currCrew + $reqCrew); $general->increaseVar('crew', $reqCrew); $general->setVar('train', $train); @@ -196,15 +199,17 @@ class che_징병 extends Command\GeneralCommand $logger->pushGeneralActionLog("{$crewTypeName} {$reqCrewText}명을 {$this->getName()}했습니다. <1>$date"); $general->setVar('crewtype', $reqCrewType->id); $general->setVar('crew', $reqCrew); - $general->setVar('train', static::$defaultTrain); - $general->setVar('atmos', static::$defaultAtmos); + $general->setVar('train', $setTrain); + $general->setVar('atmos', $setAtmos); } - $newTrust = Util::valueFit($this->city['trust'] - ($reqCrew / $this->city['pop']) / static::$costOffset * 100, 0); + $reqCrewDown = $general->onCalcDomestic('징집인구', 'score', $reqCrew); + + $newTrust = Util::valueFit($this->city['trust'] - ($reqCrewDown / $this->city['pop']) / static::$costOffset * 100, 0); $db->update('city', [ 'trust' => $newTrust, - 'pop' => $this->city['pop'] - $reqCrew + 'pop' => $this->city['pop'] - $reqCrewDown ], 'city=%i', $general->getCityID()); $exp = Util::round($reqCrew / 100); diff --git a/hwe/sammo/GeneralTrigger/che_병력군량소모.php b/hwe/sammo/GeneralTrigger/che_병력군량소모.php index 5dc948cd..42a3871a 100644 --- a/hwe/sammo/GeneralTrigger/che_병력군량소모.php +++ b/hwe/sammo/GeneralTrigger/che_병력군량소모.php @@ -23,8 +23,9 @@ class che_병력군량소모 extends BaseGeneralTrigger{ } else{ $db = DB::db(); + $crewUp = $general->onCalcDomestic('징집인구', 'score', $general->getVar('crew')); $db->update('city', [ - 'pop'=>$db->sqleval('pop + %i', $general->getVar('crew')) + 'pop'=>$db->sqleval('pop + %i', $crewUp) ], 'city=%i', $general->getCityID()); $general->setVar('crew', 0);