v0.3.1: shopkeepers will now flee when their position is forcably changed (sorry ethereal chains users)

This commit is contained in:
Evan Debenham
2015-08-09 00:36:10 -04:00
committed by Evan Debenham
parent 3ac41624f9
commit 9fce7586c9
@@ -35,6 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndTradeItem;
public class Shopkeeper extends NPC {
public static final String TXT_THIEF = "Thief, Thief!";
private int startPos = -1;
{
name = "shopkeeper";
@@ -43,6 +44,13 @@ public class Shopkeeper extends NPC {
@Override
protected boolean act() {
if (startPos == -1) startPos = pos;
if (startPos != pos){
flee();
return true;
}
throwItem();