From 9417d3d88c8d3be8de74bd9d1ef710bb836536f2 Mon Sep 17 00:00:00 2001 From: Kyle Coburn Date: Wed, 6 May 2015 21:45:46 -0700 Subject: [PATCH] Ensure empty exp bar at start --- ai/combat.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ai/combat.lua b/ai/combat.lua index f0f9dcc..192e577 100644 --- a/ai/combat.lua +++ b/ai/combat.lua @@ -473,7 +473,7 @@ function Combat.updateHP(curr_hp) lastHP = curr_hp local baseExp = Pokemon.getExpForLevelFromCurrent(0) local expForCurrentLevel = Pokemon.getExp() - baseExp - local nextLevelExp = Pokemon.getExpForLevelFromCurrent(1) - baseExp + local nextLevelExp = math.max(Pokemon.getExpForLevelFromCurrent(1) - baseExp, 1) Bridge.hp(curr_hp, max_hp, expForCurrentLevel, nextLevelExp, Pokemon.index(0, "level")) end end