v3.3.0: fixed holy ward not applying to bone explosions or chalice

This commit is contained in:
Evan Debenham
2025-10-15 12:57:44 -04:00
parent ffeb28ea55
commit 0087edf62c
2 changed files with 28 additions and 14 deletions
@@ -25,8 +25,11 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AscensionChallenge;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.HolyWard;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.ShieldOfLight;
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
@@ -95,6 +98,7 @@ public class Skeleton extends Mob {
damage -= (preDmg - damage); //apply the flat reduction twice
}
if (ch.buff(MagicImmune.class) == null) {
ShieldOfLight.ShieldOfLightTracker shield = ch.buff(ShieldOfLight.ShieldOfLightTracker.class);
if (shield != null && shield.object == id()) {
int min = 1 + Dungeon.hero.pointsInTalent(Talent.SHIELD_OF_LIGHT);
@@ -111,6 +115,12 @@ public class Skeleton extends Mob {
}
}
if (ch.buff(HolyWard.HolyArmBuff.class) != null){
//doubled
damage -= Dungeon.hero.subClass == HeroSubClass.PALADIN ? 6 : 2;
}
}
//apply DR twice (with 2 rolls for more consistency)
damage = Math.max( 0, damage - (ch.drRoll() + ch.drRoll()) );
ch.damage( damage, this );
@@ -27,6 +27,8 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.HolyWard;
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
@@ -129,7 +131,9 @@ public class ChaliceOfBlood extends Artifact {
damage = armor.absorb(damage);
}
if (hero.buff(MagicImmune.class) != null && hero.buff(HolyWard.HolyArmBuff.class) != null){
damage -= hero.subClass == HeroSubClass.PALADIN ? 3 : 1;
}
WandOfLivingEarth.RockArmor rockArmor = hero.buff(WandOfLivingEarth.RockArmor.class);
if (rockArmor != null) {