v0.2.2: tweaked the behaviour of some of the sewer quest bosses

This commit is contained in:
Evan Debenham 2014-10-26 02:18:21 -04:00
parent 50cb7c59a2
commit c10f9b290c

View File

@ -487,7 +487,7 @@ public class Ghost extends NPC {
if (effect > 2) { if (effect > 2) {
if (effect >=5 && enemy.buff(Burning.class) == null){ if (effect >=6 && enemy.buff(Burning.class) == null){
if (Level.flamable[enemy.pos]) if (Level.flamable[enemy.pos])
GameScene.add( Blob.seed( enemy.pos, 4, Fire.class ) ); GameScene.add( Blob.seed( enemy.pos, 4, Fire.class ) );
@ -503,8 +503,8 @@ public class Ghost extends NPC {
@Override @Override
protected boolean getCloser( int target ) { protected boolean getCloser( int target ) {
combo = 0; //if he's moving, he isn't attacking, reset combo. combo = 0; //if he's moving, he isn't attacking, reset combo.
if (state == HUNTING) { if (Level.adjacent(pos, enemy.pos)) {
return enemySeen && getFurther( target ); return getFurther( target );
} else { } else {
return super.getCloser( target ); return super.getCloser( target );
} }
@ -559,16 +559,16 @@ public class Ghost extends NPC {
state = WANDERING; state = WANDERING;
} }
private boolean moving = true; private int moving = 0;
@Override @Override
protected boolean getCloser( int target ) { protected boolean getCloser( int target ) {
//this is used so that the crab remains slow, but still detects the player at the expected rate. //this is used so that the crab remains slower, but still detects the player at the expected rate.
if (moving) { moving++;
moving = false; if (moving < 3) {
return super.getCloser( target ); return super.getCloser( target );
} else { } else {
moving = true; moving = 0;
return true; return true;
} }