v1.1.0: fixed various alert-based visual bugs with static enemies

This commit is contained in:
Evan Debenham 2021-09-21 19:42:05 -04:00
parent bb9947bee4
commit 0e215cb8b0
3 changed files with 10 additions and 12 deletions

View File

@ -117,6 +117,7 @@ public class DemonSpawner extends Mob {
} }
} }
} }
alerted = false;
return super.act(); return super.act();
} }

View File

@ -73,16 +73,8 @@ public class Pylon extends Mob {
@Override @Override
protected boolean act() { protected boolean act() {
spend(TICK); alerted = false;
super.act();
Heap heap = Dungeon.level.heaps.get( pos );
if (heap != null) {
int n;
do {
n = pos + PathFinder.NEIGHBOURS8[Random.Int( 8 )];
} while (!Dungeon.level.passable[n] && !Dungeon.level.avoid[n]);
Dungeon.level.drop( heap.pickUp(), n ).sprite.drop( pos );
}
if (alignment == Alignment.NEUTRAL){ if (alignment == Alignment.NEUTRAL){
return true; return true;
@ -151,7 +143,7 @@ public class Pylon extends Mob {
} }
@Override @Override
public void notice() { public void beckon(int cell) {
//do nothing //do nothing
} }
@ -219,7 +211,6 @@ public class Pylon extends Mob {
immunities.add( Paralysis.class ); immunities.add( Paralysis.class );
immunities.add( Amok.class ); immunities.add( Amok.class );
immunities.add( Sleep.class ); immunities.add( Sleep.class );
immunities.add( ToxicGas.class );
immunities.add( Terror.class ); immunities.add( Terror.class );
immunities.add( Vertigo.class ); immunities.add( Vertigo.class );
} }

View File

@ -52,6 +52,12 @@ public class RotHeart extends Mob {
properties.add(Property.MINIBOSS); properties.add(Property.MINIBOSS);
} }
@Override
protected boolean act() {
alerted = false;
return super.act();
}
@Override @Override
public void damage(int dmg, Object src) { public void damage(int dmg, Object src) {
//TODO: when effect properties are done, change this to FIRE //TODO: when effect properties are done, change this to FIRE