From c0d18d2cfdecded726e43b631f6a5fcaae2df008 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 10 Feb 2025 14:08:36 -0500 Subject: [PATCH] v3.0.0: fixed trinity applying enchants to thrown weapons --- .../shatteredpixeldungeon/items/weapon/Weapon.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 e8d085815..bfce3f6ec 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 @@ -64,6 +64,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Projec import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Shocking; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Unstable; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Vampiric; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.RunicBlade; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Scimitar; import com.shatteredpixel.shatteredpixeldungeon.journal.Catalog; @@ -123,9 +124,8 @@ abstract public class Weapon extends KindOfWeapon { boolean becameAlly = false; boolean wasAlly = defender.alignment == Char.Alignment.ALLY; if (attacker.buff(MagicImmune.class) == null) { - //TODO body form Enchantment trinityEnchant = null; - if (Dungeon.hero.buff(BodyForm.BodyFormBuff.class) != null){ + if (Dungeon.hero.buff(BodyForm.BodyFormBuff.class) != null && this instanceof MeleeWeapon){ trinityEnchant = Dungeon.hero.buff(BodyForm.BodyFormBuff.class).enchant(); if (enchantment != null && trinityEnchant != null && trinityEnchant.getClass() == enchantment.getClass()){ trinityEnchant = null;