Health: Difference between revisions

Math: rewrite math section, will likely condense the previous sections into this one soon-ish
Line 89: Line 89:


== Math ==
== Math ==
The formula for max health is: <math>HP_{max} = \left\lceil \left ( [(HP_{STARTING} + lvl * PI) * (1 + \sum_{i=1}^n \text{Shop Bonus})] + \sum_{i=1}^n \text{BonusHealth} + \sum_{i=1}^n \text{Golden Statues} + PUB + Rejuv \right ) * GC \right\rceil</math><br/>
The formula for max health <math>HP_{Max}</math> is:
where:<br/>
 
<math>
<math>
\begin{align}
HP_{Max} = \left( HP_0 + N_{PI} \times PI_{HP} \right) \times (1 + \textstyle\sum HP_{Shop} ) + \textstyle\sum HP_{Bonus}
  HP_{max} &= \text{Max Health,} \\
  HP_{STARTING} &= \text{Starting Health,} \\
  lvl &= \text{Level,} \\
  PI &= \text{Power Increase,} \\
  Shop Bonus &= \text{Increase based on the tier,} \\
  BonusHealth &= \text{Increase from item,} \\
  Golden Statues &= \text{Increase from Golden Statues,} \\
  PUB &= \text{400 Bonus Health from Powerup Buff,} \\
  Rejuv &= \text{200 Bonus Health from Rejuvenation Credit,} \\
  GC &=  -15% \text{Max Health from Glass Cannon} \\
\end{align}
</math>
</math>


=== Example ===
where <math>HP_0</math> is hero-specific starting health, <math>N_{PI}</math> is the number of [[Level|Power Increases]] earned, <math>PI_{HP}</math> is hero-specific added base health from each power increase, <math>HP_{Shop}</math> are the implicit base health percent increases from [[Vitality]] items, and <math>HP_{Bonus}</math> are the miscellaneous bonus health flat increases from items, [[Golden Statue|Golden Statues]], [[Powerup Buff|Survival Powerups]], the [[Rejuvenator]], etc.
[[Kelvin]] begins the game with 600 Base HP. If Kelvin picks up [[Extra Health]] and [[Extra Stamina]], and then earns a [[Level#Power Increases|power increase]], the HP increase may be broken down the following way: 
 
600 Base HP, 600 Max HP + (Extra Health: (600 * 0.11) + 160) = 


600 Base HP, 826 Max HP + (Extra Stamina: (600 * 0.11)) = 
With the purchase of [[Glass Cannon]], the player's max health is reduced by 15% after the above calculations.


600 Base HP, 892 Max HP 
Note that the max health presented in-game is rounded to the nearest integer.


If we add to the 600 Base HP another 50 Base HP from the first power increase and recalculate the item formulas:
===Example===
[[Kelvin]] begins the game with 600 Base HP. If Kelvin purchases the tier 1 vitality items [[Extra Health]] and [[Extra Stamina]], the first of which also grants 160 bonus health, his max health becomes:


(Extra Health: (650 * 0.11) + 160) =
<math>HP_{Max} = 600 \times (1 + (0.11 + 0.11)) + 160 = 892</math>


650 Base HP, 881.5 Max HP + (Extra Stamina: (650 * 0.11)) = 
If Kelvin then earns a power increase, his base health increases by 50, and his max health becomes:


650 Base HP, 953 Max HP
<math>HP_{Max} = (600 + 50) \times (1 + (0.11 + 0.11)) + 160 = 953</math>


== Health Bars ==
== Health Bars ==