From 8e39728069916dd458e93764d61d9f85a657e687 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 16 Jul 2019 14:19:33 -0400 Subject: [PATCH] v0.7.4: fixed allies in the surface scene not working with mage's staff --- .../shatteredpixeldungeon/scenes/SurfaceScene.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/SurfaceScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/SurfaceScene.java index e2e3773d0..8873c973b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/SurfaceScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/SurfaceScene.java @@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfLivingEarth; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfWarding; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.EarthGuardianSprite; @@ -167,6 +168,15 @@ public class SurfaceScene extends PixelScene { int earthLevel = Dungeon.hero.belongings.getItem(WandOfLivingEarth.class) == null ? 0 : Dungeon.hero.belongings.getItem(WandOfLivingEarth.class).level(); int wardLevel = Dungeon.hero.belongings.getItem(WandOfWarding.class) == null ? 0 : Dungeon.hero.belongings.getItem(WandOfWarding.class).level(); + MagesStaff staff = Dungeon.hero.belongings.getItem(MagesStaff.class); + if (staff != null){ + if (staff.wandClass() == WandOfLivingEarth.class){ + earthLevel = Math.max(earthLevel, staff.level()); + } else if (staff.wandClass() == WandOfWarding.class){ + wardLevel = Math.max(wardLevel, staff.level()); + } + } + if (roseLevel >= 3 && roseLevel >= earthLevel && roseLevel >= wardLevel){ allySprite = new GhostSprite(); if (dayTime) allySprite.alpha(0.4f);