v0.2.4d: added safety checks to some mod ai state modifiers, fixing some bugs
This commit is contained in:
parent
e4db8ba4e3
commit
d3899871ac
|
@ -93,7 +93,7 @@ public class RogueArmor extends ClassArmor {
|
||||||
for (Mob mob : Dungeon.level.mobs) {
|
for (Mob mob : Dungeon.level.mobs) {
|
||||||
if (Level.fieldOfView[mob.pos]) {
|
if (Level.fieldOfView[mob.pos]) {
|
||||||
Buff.prolong( mob, Blindness.class, 2 );
|
Buff.prolong( mob, Blindness.class, 2 );
|
||||||
mob.state = mob.WANDERING;
|
if (mob.state == mob.HUNTING) mob.state = mob.WANDERING;
|
||||||
mob.sprite.emitter().burst( Speck.factory( Speck.LIGHT ), 4 );
|
mob.sprite.emitter().burst( Speck.factory( Speck.LIGHT ), 4 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class Blindweed extends Plant {
|
||||||
Buff.prolong( ch, Blindness.class, len );
|
Buff.prolong( ch, Blindness.class, len );
|
||||||
Buff.prolong( ch, Cripple.class, len );
|
Buff.prolong( ch, Cripple.class, len );
|
||||||
if (ch instanceof Mob) {
|
if (ch instanceof Mob) {
|
||||||
((Mob)ch).state = ((Mob)ch).WANDERING;
|
if (((Mob)ch).state == ((Mob)ch).HUNTING) ((Mob)ch).state = ((Mob)ch).WANDERING;
|
||||||
((Mob)ch).beckon( Dungeon.level.randomDestination() );
|
((Mob)ch).beckon( Dungeon.level.randomDestination() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user