Anonymous user
Armor: Difference between revisions
Fix LaTeX
imported>FG6 (→Protection: Fix/add to damage formula to more accurately reflect the current game code) |
imported>FG6 (Fix LaTeX) |
||
Line 33: | Line 33: | ||
Damage is calculated using this formula: | Damage is calculated using this formula: | ||
: <math> | : <math> | ||
\mathsf{damageTotal} = \mathsf{damageBase}\times\mathsf{max}\left(1-\frac{\mathsf{protectionType}}{100}, 0.99\right)\\ | \begin{align} | ||
\mathsf{rand} = \mathsf{random}\left(\right)\\ | & \mathsf{damageTotal} = \mathsf{damageBase}\times\mathsf{max}\left(1-\frac{\mathsf{protectionType}}{100}, 0.99\right)\\ | ||
\mathsf{damageTaken} = \begin{cases} | & \mathsf{rand} = \mathsf{random}\left(\right)\\ | ||
\mathsf{floor}\left(\mathsf{damageTotal}\right)\text{ if } \mathsf{rand} | & \mathsf{damageTaken} = \begin{cases} | ||
\mathsf{floor}\left(\mathsf{damageTotal}\right)\text{ if } \mathsf{rand} > 0.5\\ | |||
\mathsf{ceil}\left(\mathsf{damageTotal}\right)\text{ if } \mathsf{rand} \leq 0.5\\ | \mathsf{ceil}\left(\mathsf{damageTotal}\right)\text{ if } \mathsf{rand} \leq 0.5\\ | ||
\end{cases} | \end{cases} | ||
\end{align} | |||
</math> | </math> | ||