v0.3.1: shopkeepers will now flee when their position is forcably changed (sorry ethereal chains users)
This commit is contained in:
committed by
Evan Debenham
parent
3ac41624f9
commit
9fce7586c9
@@ -35,6 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndTradeItem;
|
|||||||
public class Shopkeeper extends NPC {
|
public class Shopkeeper extends NPC {
|
||||||
|
|
||||||
public static final String TXT_THIEF = "Thief, Thief!";
|
public static final String TXT_THIEF = "Thief, Thief!";
|
||||||
|
private int startPos = -1;
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "shopkeeper";
|
name = "shopkeeper";
|
||||||
@@ -43,6 +44,13 @@ public class Shopkeeper extends NPC {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean act() {
|
protected boolean act() {
|
||||||
|
|
||||||
|
if (startPos == -1) startPos = pos;
|
||||||
|
|
||||||
|
if (startPos != pos){
|
||||||
|
flee();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
throwItem();
|
throwItem();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user