From 460ef266604caa32054040d0921cff38b121325f Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 6 Nov 2015 15:27:33 -0500 Subject: [PATCH] v0.3.2a: fixed a bug with thieves and slowed them down slightly when they have stolen an item. --- .../shatteredpixeldungeon/actors/mobs/Thief.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Thief.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Thief.java index a5419d626..ebf76b0af 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Thief.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Thief.java @@ -72,6 +72,12 @@ public class Thief extends Mob { item = (Item)bundle.get( ITEM ); } + @Override + public float speed() { + if (item != null) return (5*super.speed())/6; + else return super.speed(); + } + @Override public int damageRoll() { return Random.NormalIntRange( 1, 7 ); @@ -180,7 +186,7 @@ public class Thief extends Mob { sprite.showStatus(CharSprite.NEGATIVE, TXT_RAGE); state = HUNTING; } else { - GLog.n("The thief gets away with your " + item.name() + "!"); + if (item != null) GLog.n("The thief gets away with your " + item.name() + "!"); item = null; state = WANDERING; }