From fdbcb877d74815b1b3c9ee24b2a83243a51c8652 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sun, 22 Sep 2024 17:45:08 -0400 Subject: [PATCH] v2.5.3: vampiric no longer triggers on allies or neutral characters --- .../items/weapon/enchantments/Vampiric.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Vampiric.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Vampiric.java index ec94c9899..010ce4268 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Vampiric.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Vampiric.java @@ -22,6 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mimic; import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; @@ -42,7 +43,9 @@ public class Vampiric extends Weapon.Enchantment { healChance *= procChanceMultiplier(attacker); - if (Random.Float() < healChance){ + if (Random.Float() < healChance + && attacker.alignment != defender.alignment + && (defender.alignment != Char.Alignment.NEUTRAL || defender instanceof Mimic)){ float powerMulti = Math.max(1f, healChance);