From 3e427db0f168029f963ca46662d487b3ccbbd208 Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 19 Jul 2018 20:53:46 +0900 Subject: [PATCH] =?UTF-8?q?relativeYear=EC=97=90=20=EC=9D=8C=EC=88=98=20?= =?UTF-8?q?=EB=B6=88=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/GameUnitDetail.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hwe/sammo/GameUnitDetail.php b/hwe/sammo/GameUnitDetail.php index 41463257..db43c898 100644 --- a/hwe/sammo/GameUnitDetail.php +++ b/hwe/sammo/GameUnitDetail.php @@ -156,6 +156,9 @@ class GameUnitDetail{ } public function isValid($ownCities, $ownRegions, $relativeYear, $tech){ + //음수 없음 + $relativeYear = max(0, $relativeYear); + if($relativeYear < $this->reqYear){ return false; }