From c10f9b290c65577516df18a35ab3e906f675c62d Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sun, 26 Oct 2014 02:18:21 -0400 Subject: [PATCH] v0.2.2: tweaked the behaviour of some of the sewer quest bosses --- .../actors/mobs/npcs/Ghost.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java index a20fca641..0255bd577 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java @@ -487,7 +487,7 @@ public class Ghost extends NPC { if (effect > 2) { - if (effect >=5 && enemy.buff(Burning.class) == null){ + if (effect >=6 && enemy.buff(Burning.class) == null){ if (Level.flamable[enemy.pos]) GameScene.add( Blob.seed( enemy.pos, 4, Fire.class ) ); @@ -503,8 +503,8 @@ public class Ghost extends NPC { @Override protected boolean getCloser( int target ) { combo = 0; //if he's moving, he isn't attacking, reset combo. - if (state == HUNTING) { - return enemySeen && getFurther( target ); + if (Level.adjacent(pos, enemy.pos)) { + return getFurther( target ); } else { return super.getCloser( target ); } @@ -559,16 +559,16 @@ public class Ghost extends NPC { state = WANDERING; } - private boolean moving = true; + private int moving = 0; @Override protected boolean getCloser( int target ) { - //this is used so that the crab remains slow, but still detects the player at the expected rate. - if (moving) { - moving = false; + //this is used so that the crab remains slower, but still detects the player at the expected rate. + moving++; + if (moving < 3) { return super.getCloser( target ); } else { - moving = true; + moving = 0; return true; }