v1.1.0: fixed fadeleaf also not working on boss floors
This commit is contained in:
@@ -75,27 +75,7 @@ public class Fadeleaf extends Plant {
|
|||||||
|
|
||||||
} else if (ch instanceof Mob && !ch.properties().contains(Char.Property.IMMOVABLE)) {
|
} else if (ch instanceof Mob && !ch.properties().contains(Char.Property.IMMOVABLE)) {
|
||||||
|
|
||||||
if (!Dungeon.bossLevel()) {
|
ScrollOfTeleportation.teleportChar(ch);
|
||||||
|
|
||||||
int count = 20;
|
|
||||||
int newPos;
|
|
||||||
do {
|
|
||||||
newPos = Dungeon.level.randomRespawnCell(ch);
|
|
||||||
if (count-- <= 0) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} while (newPos == -1 || Dungeon.level.secret[newPos]);
|
|
||||||
|
|
||||||
if (newPos != -1) {
|
|
||||||
|
|
||||||
ch.pos = newPos;
|
|
||||||
if (((Mob) ch).state == ((Mob) ch).HUNTING)
|
|
||||||
((Mob) ch).state = ((Mob) ch).WANDERING;
|
|
||||||
ch.sprite.place(ch.pos);
|
|
||||||
ch.sprite.visible = Dungeon.level.heroFOV[ch.pos];
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user