v2.4.0: fixed brimstone arcana effect capping at +50%
This commit is contained in:
+4
-2
@@ -178,10 +178,12 @@ public class Burning extends Buff implements Hero.Doom {
|
|||||||
if (ch instanceof Hero
|
if (ch instanceof Hero
|
||||||
&& ((Hero) ch).belongings.armor() != null
|
&& ((Hero) ch).belongings.armor() != null
|
||||||
&& ((Hero) ch).belongings.armor().hasGlyph(Brimstone.class, ch)){
|
&& ((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);
|
float shieldChance = 2*(Armor.Glyph.genericProcChanceMultiplier(ch) - 1f);
|
||||||
int shieldCap = Math.round(shieldChance*4f);
|
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);
|
Barrier barrier = Buff.affect(ch, Barrier.class);
|
||||||
if (barrier.shielding() < shieldCap){
|
if (barrier.shielding() < shieldCap){
|
||||||
barrier.incShield(1);
|
barrier.incShield(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user