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 = minimum armor reduction
- R = maximum armor reduction
- t = total armor
- d = damage (after the shield)
- p = percentage reduction of item
Armor Reduction


where
denotes floor function (rounding down).
Percentage Reduction
This formula have to be applied for every single item that has percentage reduction.

Example
You get a hit with original value of 200 wearing only Zaoan Helmet and Protection Amulet
t = total armor = 9

r = 4

R = 7
Now we calculate the % reduction that Zaoan Helmet has
p = 5

d = 190
Now we calculate the % reduction that Protection Amulet has
p = 6

d = 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.
Armor and Defense
Min:

Max:

(Let's supose that a creature has a max damage of 500. The attack of creature will be a random number from 1 to 500)
- Defense = b (Defense value of your shield plus your weapon modifier or defense value of your two handed weapon)
- Total Armor = c (Make a sum of all your set arm value)
- Shielding = d
- Defense factor = e
Full Attack: 5
Balanced: 7
Defensive: 10
Now use this formula:

NOTICE: The max damage of a creature could be higher than the max damage in creatures page.
The rest of formulas you can find them on this link:
https://tibia.fandom.com/wiki/Formulae