diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java index 96c3816dc..209279620 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java @@ -372,7 +372,7 @@ public class Dungeon { Actor respawner = level.respawner(); if (respawner != null) { - Actor.add( level.respawner() ); + Actor.addDelayed( respawner, level.respawnTime() ); } hero.pos = pos; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Piranha.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Piranha.java index a0db96148..0e33ed910 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Piranha.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Piranha.java @@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Statistics; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo; import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat; import com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room; @@ -130,6 +131,7 @@ public class Piranha extends Mob { { immunities.add( Burning.class ); + immunities.add( Vertigo.class ); } private class Hunting extends Mob.Hunting{ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Imp.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Imp.java index a825c0031..9f4974273 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Imp.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Imp.java @@ -188,6 +188,7 @@ public class Imp extends NPC { } while ( npc.pos == -1 || level.heaps.get( npc.pos ) != null || + level.traps.get( npc.pos) != null || level.findMob( npc.pos ) != null || //The imp doesn't move, so he cannot obstruct a passageway !(level.passable[npc.pos + PathFinder.CIRCLE4[0]] && level.passable[npc.pos + PathFinder.CIRCLE4[2]]) || diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfPrismaticLight.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfPrismaticLight.java index 0c0683e26..b0cc9936d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfPrismaticLight.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfPrismaticLight.java @@ -66,13 +66,8 @@ public class WandOfPrismaticLight extends DamageWand { @Override protected void onZap(Ballistica beam) { - Char ch = Actor.findChar(beam.collisionPos); - if (ch != null){ - processSoulMark(ch, chargesPerCast()); - affectTarget(ch); - } affectMap(beam); - + if (Dungeon.level.viewDistance < 6 ){ if (Dungeon.isChallenged(Challenges.DARKNESS)){ Buff.prolong( curUser, Light.class, 2f + level()); @@ -80,6 +75,12 @@ public class WandOfPrismaticLight extends DamageWand { Buff.prolong( curUser, Light.class, 10f+level()*5); } } + + Char ch = Actor.findChar(beam.collisionPos); + if (ch != null){ + processSoulMark(ch, chargesPerCast()); + affectTarget(ch); + } } private void affectTarget(Char ch){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java index 80bfbfe07..062c52626 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java @@ -490,18 +490,22 @@ public abstract class Level implements Bundlable { } } } - if (Statistics.amuletObtained){ - spend(TIME_TO_RESPAWN/2f); - } else if (Dungeon.level.feeling == Feeling.DARK){ - spend(2*TIME_TO_RESPAWN/3f); - } else { - spend(TIME_TO_RESPAWN); - } + spend(respawnTime()); return true; } }; } + public float respawnTime(){ + if (Statistics.amuletObtained){ + return TIME_TO_RESPAWN/2f; + } else if (Dungeon.level.feeling == Feeling.DARK){ + return 2*TIME_TO_RESPAWN/3f; + } else { + return TIME_TO_RESPAWN; + } + } + public int randomRespawnCell() { int cell; do {