Jump to content

Armor: Difference between revisions

30 bytes added ,  14 November 2023
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} \gt 0.5\\
& \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>


Anonymous user