v3.3.0: fixed holy ward not applying to bone explosions or chalice
This commit is contained in:
@@ -25,8 +25,11 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AscensionChallenge;
|
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.HeroClass;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
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.actors.hero.spells.ShieldOfLight;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
@@ -95,6 +98,7 @@ public class Skeleton extends Mob {
|
|||||||
damage -= (preDmg - damage); //apply the flat reduction twice
|
damage -= (preDmg - damage); //apply the flat reduction twice
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ch.buff(MagicImmune.class) == null) {
|
||||||
ShieldOfLight.ShieldOfLightTracker shield = ch.buff(ShieldOfLight.ShieldOfLightTracker.class);
|
ShieldOfLight.ShieldOfLightTracker shield = ch.buff(ShieldOfLight.ShieldOfLightTracker.class);
|
||||||
if (shield != null && shield.object == id()) {
|
if (shield != null && shield.object == id()) {
|
||||||
int min = 1 + Dungeon.hero.pointsInTalent(Talent.SHIELD_OF_LIGHT);
|
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)
|
//apply DR twice (with 2 rolls for more consistency)
|
||||||
damage = Math.max( 0, damage - (ch.drRoll() + ch.drRoll()) );
|
damage = Math.max( 0, damage - (ch.drRoll() + ch.drRoll()) );
|
||||||
ch.damage( damage, this );
|
ch.damage( damage, this );
|
||||||
|
|||||||
+5
-1
@@ -27,6 +27,8 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
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.FloatingText;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
@@ -129,7 +131,9 @@ public class ChaliceOfBlood extends Artifact {
|
|||||||
damage = armor.absorb(damage);
|
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);
|
WandOfLivingEarth.RockArmor rockArmor = hero.buff(WandOfLivingEarth.RockArmor.class);
|
||||||
if (rockArmor != null) {
|
if (rockArmor != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user