v1.4.0: fixed shadow clone not benefiting from brimstone
This commit is contained in:
@@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AllyBuff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Corruption;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
@@ -38,6 +39,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.MirrorImage;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SmokeParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Brimstone;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.CityLevel;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
@@ -238,6 +240,17 @@ public class ShadowClone extends ArmorAbility {
|
||||
return dr;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isImmune(Class effect) {
|
||||
if (effect == Burning.class
|
||||
&& Random.Int(4) < Dungeon.hero.pointsInTalent(Talent.CLONED_ARMOR)
|
||||
&& Dungeon.hero.belongings.armor() != null
|
||||
&& Dungeon.hero.belongings.armor().hasGlyph(Brimstone.class, this)){
|
||||
return true;
|
||||
}
|
||||
return super.isImmune(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int defenseProc(Char enemy, int damage) {
|
||||
damage = super.defenseProc(enemy, damage);
|
||||
|
||||
@@ -31,7 +31,11 @@ public class Brimstone extends Armor.Glyph {
|
||||
|
||||
@Override
|
||||
public int proc(Armor armor, Char attacker, Char defender, int damage) {
|
||||
//no proc effect, see Hero.isImmune and GhostHero.isImmune and ArmoredStatue.isImmune
|
||||
//no proc effect, see:
|
||||
// Hero.isImmune
|
||||
// GhostHero.isImmune
|
||||
// Shadowclone.isImmune
|
||||
// ArmoredStatue.isImmune
|
||||
return damage;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user