v3.0.0: fixed holy weapon and ward overriding curse procs

This commit is contained in:
Evan Debenham
2025-01-30 11:24:47 -05:00
parent decdd7565a
commit 458c98aed4
2 changed files with 4 additions and 2 deletions

View File

@@ -436,7 +436,8 @@ public class Armor extends EquipableItem {
if (defender.buff(MagicImmune.class) == null) {
if (defender instanceof Hero && isEquipped((Hero) defender)
&& defender.buff(HolyWard.HolyArmBuff.class) != null){
if (((Hero) defender).subClass == HeroSubClass.PALADIN && glyph != null){
if (glyph != null &&
(((Hero) defender).subClass == HeroSubClass.PALADIN || hasCurseGlyph())){
damage = glyph.proc( this, attacker, defender, damage );
}
int blocking = ((Hero) defender).subClass == HeroSubClass.PALADIN ? 3 : 1;

View File

@@ -124,7 +124,8 @@ abstract public class Weapon extends KindOfWeapon {
if (attacker.buff(MagicImmune.class) == null) {
if (attacker instanceof Hero && isEquipped((Hero) attacker)
&& attacker.buff(HolyWeapon.HolyWepBuff.class) != null){
if (((Hero) attacker).subClass == HeroSubClass.PALADIN && enchantment != null){
if (enchantment != null &&
(((Hero) attacker).subClass == HeroSubClass.PALADIN || hasCurseEnchant())){
damage = enchantment.proc(this, attacker, defender, damage);
if (defender.alignment == Char.Alignment.ALLY && !wasAlly){
becameAlly = true;