From 72f5786e6dea2e2d51911260a463014979052479 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 28 Jul 2025 14:30:55 -0400 Subject: [PATCH] v3.2.0: fixed body form working on all weapon wielders --- .../shatteredpixeldungeon/items/weapon/Weapon.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java index 126d7fc88..bc4339cea 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java @@ -32,9 +32,11 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.cleric.AscendedForm; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.duelist.ElementalStrike; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.rogue.ShadowClone; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.BodyForm; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.HolyWeapon; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.Smite; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.MirrorImage; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.KindOfWeapon; import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag; @@ -128,7 +130,9 @@ abstract public class Weapon extends KindOfWeapon { boolean wasAlly = defender.alignment == Char.Alignment.ALLY; if (attacker.buff(MagicImmune.class) == null) { Enchantment trinityEnchant = null; - if (Dungeon.hero.buff(BodyForm.BodyFormBuff.class) != null && this instanceof MeleeWeapon){ + //only when it's the hero or a char that uses the hero's weapon + if (Dungeon.hero.buff(BodyForm.BodyFormBuff.class) != null && this instanceof MeleeWeapon + && (attacker == Dungeon.hero || attacker instanceof MirrorImage || attacker instanceof ShadowClone.ShadowAlly)){ trinityEnchant = Dungeon.hero.buff(BodyForm.BodyFormBuff.class).enchant(); if (enchantment != null && trinityEnchant != null && trinityEnchant.getClass() == enchantment.getClass()){ trinityEnchant = null;