User:Sixorish/Page

Armor
Note that:
 * Armor reduction will only apply when damage crosses the shield.
 * The damage armor needs to reduce may be lower than original damage because of the shield reduction.
 * If you get a negative number as armor reduction, it means 0.
 * Floor function is used here, basically it means that we remove decimals.
 * Ceil function is used here, basically it means that we round up numbers with decimals to next integer.

Variables:
 * R_min = minimum armor reduction
 * R_max = maximum armor reduction
 * t = total armor
 * d = damage (after the shield)
 * p = percentage reduction of item

Armor Reduction
$$R_{min} = \left \lfloor \frac{t}{2} \right \rfloor = \begin{cases} \frac{t}{2}, & \mbox{if }t\mbox{ is even} \\ \frac{t - 1}{2}, & \mbox{if }t\mbox{ is odd} \\ \end{cases}$$

$$R_{max} = \begin{cases} t, & \mbox{if }t < 2 \\ t - 1, & \mbox{if }t\mbox{ is even} \\ t - 2, & \mbox{if }t\mbox{ is odd} \\ \end{cases}$$

Percentage Reduction
This formula have to be applied for every single item that has percentage reduction.

$$d = \left \lfloor \frac{100-p}{100} \cdot d \right \rfloor$$

Example
You get a hit with original value of 200 wearing only Zaoan Helmet and Protection Amulet
 * t = total armor = 9
 * $$R_{min} = \left \lfloor \frac{9}{2} \right \rfloor = 4$$

or equivalently since 9 is an odd number,
 * $$R_{min} = \frac{9-1}{2} = 4$$

Thus 4 health is the minimum the armor will protect for.


 * $$R_{max} = \left \lfloor \frac{9}{2} \right \rfloor \cdot 2 - 1 = 7$$

or
 * $$R_{max} = 9-2 = 7$$

Now we calculate the % reduction that Zaoan Helmet has (p=5):
 * $$d = \left \lfloor \frac{100-5}{100} \cdot 200 \right \rfloor = 190$$

Finally we calculate the % reduction that a Protection Amulet has (p=6):
 * $$d = \left \lfloor \frac{100-6}{100} \cdot 190 \right \rfloor = 178$$

For this example, damage becomes 178, minimum armor reduction will be 4 and maximum armor reduction will be 7, so the hit will hit you from 171 to 174.