v2.4.0: fixed brimstone arcana effect capping at +50%
This commit is contained in:
@@ -178,10 +178,12 @@ public class Burning extends Buff implements Hero.Doom {
|
||||
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
|
||||
//generate avg of 1 shield per turn per 50% boost, to a max of 4x boost
|
||||
float shieldChance = 2*(Armor.Glyph.genericProcChanceMultiplier(ch) - 1f);
|
||||
int shieldCap = Math.round(shieldChance*4f);
|
||||
if (shieldCap > 0 && Random.Float() < shieldChance){
|
||||
int shieldGain = (int)shieldChance;
|
||||
if (Random.Float() < shieldChance%1) shieldGain++;
|
||||
if (shieldCap > 0 && shieldGain > 0){
|
||||
Barrier barrier = Buff.affect(ch, Barrier.class);
|
||||
if (barrier.shielding() < shieldCap){
|
||||
barrier.incShield(1);
|
||||
|
||||
Reference in New Issue
Block a user