From 5b2b7dc03e352e59efa52e5c968a0ba03629ca01 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 25 Apr 2020 06:30:01 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=BC=EB=B6=80=20=EC=84=A4=EC=A0=95?= =?UTF-8?q?=EA=B0=92=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_gamerule.php | 2 ++ hwe/sammo/GeneralAI.php | 11 +++-------- hwe/sammo/Scenario/NPC.php | 4 ++-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/hwe/func_gamerule.php b/hwe/func_gamerule.php index 1219cc00..427da20c 100644 --- a/hwe/func_gamerule.php +++ b/hwe/func_gamerule.php @@ -979,6 +979,8 @@ function updateNationState() { 999, sprintf('부대장%4d',$lastAssemblerID), null, $nation['nation'], null, 10, 10, 10, 1, $admin['year'] - 15, $admin['year'] + 15, '은둔', '척사' ); + $npcObj->gold=0; + $npcObj->rice=0; $npcObj->npc = 5; $npcObj->build($admin); $npcID = $npcObj->generalID; diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php index d7742ccf..88af346c 100644 --- a/hwe/sammo/GeneralAI.php +++ b/hwe/sammo/GeneralAI.php @@ -3521,14 +3521,9 @@ class GeneralAI $outcome = getOutcome(100, $dedicationList); - $bill = intval($income / $outcome * 80); // 수입의 80% 만 지급 + $bill = intval($income / $outcome * 90); // 수입의 80% 만 지급 - if ($bill < 20) { - $bill = 20; - } - if ($bill > 200) { - $bill = 200; - } + $bill = Util::valueFit($bill, 20, 200); $db->update('nation', [ 'bill' => $bill, @@ -3563,7 +3558,7 @@ class GeneralAI $outcome = getOutcome(100, $dedicationList); - $bill = intval($income / $outcome * 80); // 수입의 80% 만 지급 + $bill = intval($income / $outcome * 90); // 수입의 80% 만 지급 if ($bill < 20) { $bill = 20; diff --git a/hwe/sammo/Scenario/NPC.php b/hwe/sammo/Scenario/NPC.php index 3459a60d..8d2e89ab 100644 --- a/hwe/sammo/Scenario/NPC.php +++ b/hwe/sammo/Scenario/NPC.php @@ -41,8 +41,8 @@ class NPC{ 9 => 'ⓞ', //오랑캐? ]; - protected $gold; - protected $rice; + public $gold; + public $rice; protected $specAge = null; protected $specAge2 = null;