v0.3.2a: fixed a bug with thieves and slowed them down slightly when they have stolen an item.

This commit is contained in:
Evan Debenham 2015-11-06 15:27:33 -05:00 committed by Evan Debenham
parent d60be385c2
commit 460ef26660

View File

@ -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;
}