From 5991a09a4b0f014b1ecbcb3f78ff421d454b96f3 Mon Sep 17 00:00:00 2001 From: Cathy Fitzpatrick Date: Tue, 5 Oct 2010 00:29:17 -0600 Subject: [PATCH] Fixed weather damage to always do at least one damage. --- resources/GlobalEffect.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/GlobalEffect.js b/resources/GlobalEffect.js index 1d673a4..23b09c4 100644 --- a/resources/GlobalEffect.js +++ b/resources/GlobalEffect.js @@ -111,7 +111,9 @@ makeEffect(GlobalEffect, { field.print(Text.weather_hail(3, subject)); } - subject.hp -= Math.floor(subject.getStat(Stat.HP) / denominator); + var damage = Math.floor(subject.getStat(Stat.HP) / denominator); + if (damage < 1) damage = 1; + subject.hp -= damage; } } });