From 568ff4b36631c6eb98e305daa508db1a218fc464 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 9 Mar 2019 17:08:11 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=80=ED=87=B4=20=EC=97=B0=EB=A0=B9=20?= =?UTF-8?q?=EA=B0=92=EC=9D=84=20GameConst=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func.php | 6 +++--- hwe/func_process_personnel.php | 4 ++-- hwe/join_post.php | 4 ++-- hwe/sammo/GameConstBase.php | 1 + 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/hwe/func.php b/hwe/func.php index 822b13d6..c1042744 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -910,8 +910,8 @@ function generalInfo($no) { if($nation['color'] == "") { $nation['color'] = "#000000"; } - if($general['age'] < 60) { $general['age'] = "{$general['age']} 세"; } - elseif($general['age'] < 80) { $general['age'] = "{$general['age']} 세"; } + if($general['age'] < GameConst::$retirementYear*0.75) { $general['age'] = "{$general['age']} 세"; } + elseif($general['age'] < GameConst::$retirementYear) { $general['age'] = "{$general['age']} 세"; } else { $general['age'] = "{$general['age']} 세"; } $general['connect'] = Util::round($general['connect'] / 10) * 10; @@ -2078,7 +2078,7 @@ function updateTurntime($no) { } } - if($general['age'] >= 80 && $general['npc'] == 0) { + if($general['age'] >= GameConst::$retirementYear && $general['npc'] == 0) { if($admin['isunited'] == 0) { CheckHall($no); } diff --git a/hwe/func_process_personnel.php b/hwe/func_process_personnel.php index de6769ac..cc8fcead 100644 --- a/hwe/func_process_personnel.php +++ b/hwe/func_process_personnel.php @@ -466,8 +466,8 @@ function process_29(&$general) { $bornyear = $admin['year']; $deadyear = $admin['year'] + 3; $age = 20; - $specage = Util::round((80 - $age)/12) + $age; - $specage2 = Util::round((80 - $age)/3) + $age; + $specage = Util::round((GameConst::$retirementYear - $age)/12) + $age; + $specage2 = Util::round((GameConst::$retirementYear - $age)/3) + $age; //$specage = $age + 1 + rand() % 3; //$specage2 = $age + 5 + rand() % 5; // 20년 ~ 50년 diff --git a/hwe/join_post.php b/hwe/join_post.php index c02132d9..2452534c 100644 --- a/hwe/join_post.php +++ b/hwe/join_post.php @@ -162,11 +162,11 @@ if ($genius) { $specage2 = $age; $special2 = getSpecial2($leader, $power, $intel); } else { - $specage2 = Util::valueFit(Util::round((80 - $age)/4 - $relYear / 2), 3) + $age; + $specage2 = Util::valueFit(Util::round((GameConst::$retirementYear - $age)/4 - $relYear / 2), 3) + $age; $special2 = 0; } //내특 -$specage = Util::valueFit(Util::round((80 - $age)/12 - $relYear / 2), 3) + $age; +$specage = Util::valueFit(Util::round((GameConst::$retirementYear - $age)/12 - $relYear / 2), 3) + $age; $special = 0; if ($admin['scenario'] >= 1000) { diff --git a/hwe/sammo/GameConstBase.php b/hwe/sammo/GameConstBase.php index 3a8dc3ce..33e6fab2 100644 --- a/hwe/sammo/GameConstBase.php +++ b/hwe/sammo/GameConstBase.php @@ -93,4 +93,5 @@ class GameConstBase public static $maxTurn = 24; public static $statGradeLevel = 5; + public static $retirementYear = 80; }