Anonymous user
Armor: Difference between revisions
m
→Protection: Change .99 to .01, hopefully the last math edit
imported>TofuBytes |
imported>FG6 m (→Protection: Change .99 to .01, hopefully the last math edit) |
||
| (9 intermediate revisions by 3 users not shown) | |||
| Line 32: | Line 32: | ||
Damage is calculated using this formula: | Damage is calculated using this formula: | ||
: <math>\mathsf{ | : <math> | ||
\begin{align} | |||
& \mathsf{damageTotal} = \mathsf{damageBase}\times\mathsf{max}\left(1-\frac{\mathsf{protectionType}}{100}, 0.01\right)\\ | |||
& \mathsf{rand} = \mathsf{random}\left(\right)\\ | |||
& \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\\ | |||
\end{cases} | |||
\end{align} | |||
</math> | |||
==Durability== | ==Durability== | ||