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