v0.4.3b: fixed distortion traps rendering the dried rose unusuable
This commit is contained in:
parent
fd37d1b776
commit
4704b30166
|
@ -22,7 +22,9 @@ package com.shatteredpixel.shatteredpixeldungeon.levels.traps;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Belongings;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Belongings;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.LloydsBeacon;
|
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.LloydsBeacon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
|
||||||
import com.watabou.noosa.Game;
|
import com.watabou.noosa.Game;
|
||||||
|
@ -44,6 +46,10 @@ public class DistortionTrap extends Trap{
|
||||||
if (i instanceof LloydsBeacon && ((LloydsBeacon) i).returnDepth == Dungeon.depth)
|
if (i instanceof LloydsBeacon && ((LloydsBeacon) i).returnDepth == Dungeon.depth)
|
||||||
((LloydsBeacon) i).returnDepth = -1;
|
((LloydsBeacon) i).returnDepth = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] ))
|
||||||
|
if (mob instanceof DriedRose.GhostHero) mob.destroy();
|
||||||
|
|
||||||
InterlevelScene.mode = InterlevelScene.Mode.RESET;
|
InterlevelScene.mode = InterlevelScene.Mode.RESET;
|
||||||
Game.switchScene(InterlevelScene.class);
|
Game.switchScene(InterlevelScene.class);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user