diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java index 2ea14aea8..d54bb1925 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java @@ -31,10 +31,12 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Thief; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle; import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Brimstone; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass; import com.shatteredpixel.shatteredpixeldungeon.items.food.ChargrilledMeat; import com.shatteredpixel.shatteredpixeldungeon.items.food.FrozenCarpaccio; import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat; +import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfArcana; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; @@ -170,6 +172,23 @@ public class Burning extends Buff implements Hero.Doom { } public void reignite( Char ch, float duration ) { + if (ch.isImmune(Burning.class)){ + //TODO this only works for the hero, not others who can have brimstone+arcana effect + // e.g. prismatic image, shadow clone + if (ch instanceof Hero + && ((Hero) ch).belongings.armor() != null + && ((Hero) ch).belongings.armor().hasGlyph(Brimstone.class, ch)){ + //has a 2*boost/50% chance to generate 1 shield per turn, to a max of 4x boost + float shieldChance = 2*(RingOfArcana.enchantPowerMultiplier(ch) - 1f); + int shieldCap = Math.round(shieldChance*4f); + if (shieldCap > 0 && Random.Float() < shieldChance){ + Barrier barrier = Buff.affect(ch, Barrier.class); + if (barrier.shielding() < shieldCap){ + barrier.incShield(1); + } + } + } + } left = duration; }