From 1703c7108d246cba3af2f1c30a183a4ec4679469 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 14 Nov 2014 17:35:50 -0500 Subject: [PATCH] v0.2.2b: fixed a bug with the piercing enchant --- .../items/weapon/enchantments/Piercing.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Piercing.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Piercing.java index 6cdd587b5..49ce51f54 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Piercing.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Piercing.java @@ -39,7 +39,7 @@ public class Piercing extends Enchantment { int d = defender.pos - attacker.pos; int pos = defender.pos + d; - do { + while (pos >= 0 && pos < Level.LENGTH) { Char ch = Actor.findChar( pos ); if (ch == null) { @@ -56,7 +56,7 @@ public class Piercing extends Enchantment { ch.sprite.flash(); pos += d; - } while (pos >= 0 && pos < Level.LENGTH); + } return true;