v0.2.2b: fixed a bug with the piercing enchant

This commit is contained in:
Evan Debenham 2014-11-14 17:35:50 -05:00
parent c4b55ae70b
commit 1703c7108d

View File

@ -39,7 +39,7 @@ public class Piercing extends Enchantment {
int d = defender.pos - attacker.pos; int d = defender.pos - attacker.pos;
int pos = defender.pos + d; int pos = defender.pos + d;
do { while (pos >= 0 && pos < Level.LENGTH) {
Char ch = Actor.findChar( pos ); Char ch = Actor.findChar( pos );
if (ch == null) { if (ch == null) {
@ -56,7 +56,7 @@ public class Piercing extends Enchantment {
ch.sprite.flash(); ch.sprite.flash();
pos += d; pos += d;
} while (pos >= 0 && pos < Level.LENGTH); }
return true; return true;