diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Invisibility.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Invisibility.java index 01b05a056..f86b3c86d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Invisibility.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Invisibility.java @@ -88,6 +88,8 @@ public class Invisibility extends FlavourBuff { } public static void dispel() { + if (Dungeon.hero == null) return; + for ( Buff invis : Dungeon.hero.buffs( Invisibility.class )){ invis.detach(); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFrost.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFrost.java index 1ae1e15cc..c1a02baaf 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFrost.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFrost.java @@ -72,7 +72,7 @@ public class WandOfFrost extends DamageWand { if (eternalFire != null && eternalFire.volume > 0) { eternalFire.clear( bolt.collisionPos ); //bolt ends 1 tile short of fire, so check next tile too - if (bolt.path.size() > bolt.dist){ + if (bolt.path.size() > bolt.dist+1){ eternalFire.clear( bolt.path.get(bolt.dist+1) ); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AlchemyScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AlchemyScene.java index 3b53fab07..ba1e48ede 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AlchemyScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AlchemyScene.java @@ -397,10 +397,12 @@ public class AlchemyScene extends PixelScene { private void combine( int slot ){ ArrayList ingredients = filterInput(Item.class); - if (ingredients.isEmpty()) return; - Recipe recipe = Recipe.findRecipes(ingredients).get(slot); + ArrayList recipes = Recipe.findRecipes(ingredients); + if (recipes.size() <= slot) return; + + Recipe recipe = recipes.get(slot); Item result = null; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java index 3899c5fe8..fcc85399a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java @@ -1168,9 +1168,8 @@ public class GameScene extends PixelScene { public static void afterObserve() { if (scene != null) { - for (Mob mob : Dungeon.level.mobs) { - if (mob.sprite != null) - mob.sprite.visible = Dungeon.level.heroFOV[mob.pos]; + for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0])) { + if (mob.sprite != null) mob.sprite.visible = Dungeon.level.heroFOV[mob.pos]; } } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GhoulSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GhoulSprite.java index 19f6b3b9b..188c43982 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GhoulSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GhoulSprite.java @@ -59,16 +59,6 @@ public class GhoulSprite extends MobSprite { play(crumple); } - @Override - public void move(int from, int to) { - if (parent == null){ - //TODO this should be fixed as of v1.2.2, monitor for more reports and remove if we're clear - Game.reportException(new RuntimeException("ghoul sprite tried to move with null parent! ghoul HP: " + ch.HP)); - return; - } - super.move(from, to); - } - @Override public void die() { if (curAnim == crumple){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ActionIndicator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ActionIndicator.java index 09aaff615..08fecaa3e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ActionIndicator.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ActionIndicator.java @@ -105,7 +105,7 @@ public class ActionIndicator extends Tag { @Override protected String hoverText() { - String text = action.actionName(); + String text = (action == null ? null : action.actionName()); if (text != null){ return Messages.titleCase(text); } else {