From 95fb84bd7511b7a24f6f515f4ef3a1987b872354 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 2 Jan 2024 23:44:33 -0500 Subject: [PATCH] v2.3.0: fixed mimics not dropping loot if ally buffed from hiding --- .../shatteredpixeldungeon/actors/buffs/AllyBuff.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/AllyBuff.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/AllyBuff.java index fe408ee06..b7126daf1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/AllyBuff.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/AllyBuff.java @@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Statistics; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mimic; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; @@ -50,7 +51,7 @@ public abstract class AllyBuff extends Buff{ //for when applying an ally buff should also cause that enemy to give exp/loot as if they had died //consider that chars with the ally alignment do not drop items or award exp on death public static void affectAndLoot(Mob enemy, Hero hero, Class buffCls){ - boolean wasEnemy = enemy.alignment == Char.Alignment.ENEMY; + boolean wasEnemy = enemy.alignment == Char.Alignment.ENEMY || enemy instanceof Mimic; Buff.affect(enemy, buffCls); if (enemy.buff(buffCls) != null && wasEnemy){