Jump to content

Armor: Difference between revisions

194 bytes added ,  14 November 2023
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)
 
(11 intermediate revisions by 4 users not shown)
Line 10: Line 10:
Armor can be found in loot chests of generated structures such as the [[dungeons]] or [[Labyrinth|labyrinths]]. Chainmail armor being one of the only armors obtainable through loot chests.
Armor can be found in loot chests of generated structures such as the [[dungeons]] or [[Labyrinth|labyrinths]]. Chainmail armor being one of the only armors obtainable through loot chests.


===Repairing===
== Repairing ==
 
Chainmail armor can only be found in [[dungeons]] or [[Labyrinth|labyrinths]]. Chainmail armor can be repaired using [[chainlinks]]. The more chainlinks used to repair the armor, the more durability it receives.{{Crafting table
Chainmail armor can only be found in [[dungeons]] or [[Labyrinth|labyrinths]]. Chainmail armor can be repaired using [[chainlinks]]. The more chainlinks used to repair the armor, the more durability it receives.{{Crafting table
|type=workbench
|type=workbench
Line 31: Line 32:


Damage is calculated using this formula:
Damage is calculated using this formula:
: <math>\mathsf{damageTaken} = \mathsf{damageBase}\times \left(\mathsf{Max}\left(\frac{\mathsf{protectionType}}{100}\right)0.01\right)</math>
: <math>
 
\begin{align}
Note that at maximum protection value, you will always have a 50% chance to take {{Hp|1}} damage.
& \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==
Anonymous user