Formulae

There are many different formulae and calculations and interesting data in Tibia. For example how much experience you need for a level, how much mana you need for a magic level, how long time it takes to advance in different skills, how long time a day in Tibia is counted in real life time, etc etc.
= Character Statistics =
== Experience ==
For the amount of experience needed to reach a certain level:
\frac{50lvl^{3}}{3} - {100lvl^{2}} + \frac{850lvl}{3} - 200
= \frac{50\left(lvl-1\right)^{3} - 150\left(lvl-1\right)^{2} + 400\left(lvl-1\right)}{3}
For the amount of experience needed to reach the next level:
50lvl^{2} - 150lvl + 200
: For details about the Level Formula, visit this page.
== Skills ==
All the skills advance using the same base formula with different parameters. Skill advance is based on skill points, which are mana points used for Magic Level, hits for Melee, Distance Fighting and Shielding and attempts for Fishing. The general formulae are:
Points required to advance to next skill level:
P = A \cdot b^{skill - c}
Total points at a certain skill level:
Tp = A \frac{b^{skill - c}-1}{b-1}
Skill level given a certain amount of skill points:
Skill = log_{b}\left(Tp \cdot \frac{b - 1}{A} + 1\right) + c
where,
* A = skill constant,
* b = vocation constant,
* c = skill offset;
* Tp = total skill points;
* Skill = skill level;
The skill offset (c) is the starting skill. It's 0 for Magic Level and 10 for all other skills. 
The skill constants are the same for all vocations. They are as follows:
 Skill Constants (A)
Skill 	Constant
Magic Level 	1600
Melee skills 	50
Distance Fighting	30
Shielding 	100
Fishing 	20
Since a character can block up to two creatures using a Shield at a time, in ideal training scenarios the Shielding constant is the same as the Melee constants. For Offline Training, however, it does make Shielding training half the rate of Melee training. 
The vocation constants change for each vocation and each skill. The higher the constant, the higher the amount of points needed to advance to the next skill level. They are as follows:
 Vocation Constants (b)
Vocation	Magic	Axe/Club/Sword	Fist	Distance	Shielding	Fishing
None 	3.0 	2.0 	1.5 	2.0 	1.5 	1.1
Knight 	3.0 	1.1 	1.1 	1.4 	1.1 	1.1
Paladin 	1.4 	1.2 	1.2 	1.1 	1.1 	1.1
Sorcerer	1.1 	2.0 	1.5 	2.0 	1.5 	1.1
Druid 	1.1 	1.8 	1.5 	1.8 	1.5 	1.1
For example, this is the mana spent required for a Druid or Sorcerer to advance to the next Magic Level:
P = 1600 \cdot 1.1^{mlvl-0}
And the total mana used at a certain Magic Level:
Tp = 1600 \frac{1.1^{mlvl-0}-1}{1.1-1}
Similarly, for a Knight training a Melee skill, we have:
P = 50 \cdot 1.1^{skill-10}
Tp = 50 \frac{1.1^{skill-10}-1}{1.1-1}
== Base Damage and Healing ==
Prior to (patch 13.05.12657), damage and healing increased at a rate of 1 per 5 levels, with the first increase happening at level 5. After this patch the scaling was reduced, and now is determined like so:
* Until level 500: no change, damage and healing +1 every 5 levels
* As of level 501-1100: damage and healing +1 every 6 levels
* As of level 1101-1800: damage and healing +1 every 7 levels
* As of level 1801-2600: damage and healing +1 every 8 levels
* As of level 2601-3500: damage and healing +1 every 9 levels
* Above level 3500 it continues with the same logic (steps of 500, 600, 700, etc.)
The step size S, or how many levels it takes to gain 1 base damage and healing, is calculated as follows, based on your level L:
S = \left\lfloor \frac{\sqrt{2L + 2025} + 5}{10} \right\rfloor
The total base damage and healing B as a function of your level L is calculated as follows, using S from above:
B = \left\lfloor \frac{L + 1000}{S} - 50S \right\rfloor + 100S - 450
== Mana Training Time ==
This formula enables you to calculate how much time is needed to increase a Magic Level.
y = a \cdot b^x \cdot z
y is the time needed to increase a Magic Level, in hours;
x is the current Magic Level;
z is the percent you have left to go to the next Magic Level in decimal form (i.e. 47% = 0.47).
a is the Vocation factor, depending on Mana regeneration:
a = \frac{1600}{\left(\text{MP per second}\right) \cdot 3600} = \frac{4}{9} \cdot \frac{1}{\left(\text{MP per second}\right)}
* Mages: a = \frac{2}{3}
* Promoted Mages: a = \frac{4}{9}
* Knights and Elite Knights: a = \frac{4}{3}
* Paladins: a = \frac{8}{9}
* Royal Paladins: a = \frac{2}{3}
== Magic Power ==
\max\left(1,\frac{lvl+4 \cdot mlvl}{100}\right)
Usually displayed as percent.
== Hitpoints, Mana and Capacity ==
Vocation 	Hitpoints	Hitpoints 	Mana 	Mana 	Capacity 	Capacity
Vocation 	Per Level	Total 	Per level	Total 	Per level	Total
Paladins 	10 	5\left(2lvl + 21\right)	15 	5\left(3lvl - 6\right) 	20 	10\left(2lvl + 31\right)
Knights 	15 	5\left(3lvl + 13\right)	5 	5\left(lvl + 10\right) 	25 	5\left(5lvl + 54\right)
Sorcerers and Druids	5 	5\left(lvl + 29\right) 	30 	5\left(6lvl - 30\right)	10 	10\left(lvl + 39\right)
Rookies 	5 	5\left(lvl + 29\right) 	5 	5\left(lvl + 10\right) 	10 	10\left(lvl + 39\right)
What is worth noting, Rookies gain the lowest possible values per level among all vocations.
HP + MP + Cap = 5\left(9lvl + 77\right)
The sum of HP, MP and Cap does not depend on vocation, providing balance between them (assuming, of course, they are each desired equally, which is often not the case).
== Speed ==
: For details about the equipment increasing speed, visit this page.
Note that spells like Haste and Strong Haste increase your base speed without items and mount, you have to add the speed of the extra items and mount only after calculate your base speed with the spells.
Your speed helps determine how fast you walk in the game. The base speed for a level 1 player is 110. 
The type of surface you walk on reduces your speed (i.e. you walk faster on pavement than you do on grass or mud). Below are the formulae for determining your speed in different states.
=== Base Speed ===
A character's base speed is determined by
BaseSpeed = 109 + Level
The modifiable speed value, however, is equal to
BaseSpeed-40
This is important when dealing with multiplicative buffs and debuffs such as speed spells.
=== Speed breakpoints ===
This formula tells you the required speed to reach a particular speed breakpoint. Note that the result, S, refers to the speed as displayed in your skills window, which takes into account your level, equipment and buffs.
For example, if you want to know what speed you need in order to reach the "GM speed" in depots, you would plug in the values F=100, B=50, and the result would be 2382. And if you want to know what speed you need in order to reach the second from last breakpoint in the secret library, you would plug in the values F=150, B=100, and the result would be 1258.
S=\left\lceil \exp \Biggl( \frac{\left\lfloor \frac{1000F}{B+1} \right\rfloor+0.5+c}{a}\Biggr)-b\right\rceil
Where:
* F = tile friction. See Speed Breakpoints for examples.
* B = desired tile movement speed in milliseconds. This must be a multiple of 50, because all movement speeds in Tibia are multiples of 50 ms. Again, see Speed Breakpoints for examples.
* S = speed required for the breakpoint.
* a = 857.36
* b = 261.29
* c = 4795.009
=== Haste ===
Speed = 1.3 \cdot (BaseSpeed-40) + 40
This determines someone's speed after casting Haste. It replaces any other haste buff.
=== Strong Haste ===
Speed = 1.7 \cdot (BaseSpeed-40) + 40
This determines someone's speed after casting Strong Haste. It replaces any other haste buff.
=== Swift Foot ===
Speed = 1.8 \cdot (BaseSpeed-40) + 40
This determines a paladin's speed after casting Swift Foot. It replaces any other haste buff.
=== Charge ===
Speed = 1.9 \cdot (BaseSpeed-40) + 40
This determines a knight's speed after casting Charge. It replaces any other haste buff.
=== Adrenaline Burst ===
Speed = 2.5 \cdot (BaseSpeed-40) + 40
This determines someone's speed after the Adrenaline Burst charm is triggered. It replaces any other haste buff.
== Prey System ==
=== Timer Deductions ===
All bonuses have specific triggers upon which time is deducted from the remaining time of a prey bonus. Much like stamina, time is deducted based on the recent activity of the player. The amount of time deducted is equal to:
:D(currentTime,\ lastTriggerTime) =min(currentTime\ -\ lastTriggerTime,\ 2\ minutes)
Where:
:currentTime is the current system time. This is used to compute time relative to the last trigger time.
:lastTriggerTime is the system time of the last relevant trigger event. The lists of relevant trigger events for each bonus type are listed below.
The triggers that are used to deduct time depend on the specific bonus. For example, when the user takes damage, the timer for damage reduction will be affected, but not the timer for experience gain. These triggers act on any event of the specified type, not just ones that would be affected. If an increased loot bonus is active for killing Rats, killing a Spider will affect the timer even though Spiders do not provide bonus loot. The triggers for each type of bonus are as follows:
Damage Reduction - time is deducted when:
* the user takes damage, whether PvP or PvE.
* the user gains experience from a slain creature.
* [NOT TESTED]: gaining experience from a quest or other non-combat event.
Damage Increase - time is deducted when:
* the user gains experience from a slain creature.
Loot Increase - time is deducted when:
* the user gains experience from a slain creature, irrespective of whether or not that creature has a corpse.
* [NOT TESTED]: gaining experience from a quest or other non-combat event.
Bonus Experience - time is deducted when:
* the user gains experience from a slain creature.
* [NOT TESTED]: gaining experience from a quest or other non-combat event.
=== Value and Effect ===
When bonuses are determined, two values are generated: the bonus type (damage increase, damage reduction, etc.) and bonus value. The effect of a bonus is a function of its value according to the following functions.
Damage Increase:
:E(value) = (5 + 2 \cdot value)\%
Damage Reduction:
:E(value) = (10 + 2 \cdot value)\%
Bonus Experience:
:E(value) = (10 + 3 \cdot value)\%
Improved Loot:
:E(value) = (10 + 3 \cdot value)\%
 
 Bonus
 Minimum
 Step
 
 
 Damage Increase (%)
 5
 2
 
 
 Damage Reduction (%)
 10
 2
 
 
 Bonus Experience (%)
 10
 3
 
 
 Improved Loot (%)
 10
 3
 
Combining these formulas provides a generalized formula:
:E(value) = (minimum + step \cdot value)\%
Where:
: minimum is the theoretical effect at value = 0 (equal to E(1) - step).
: step is the effect's step. For each value, the effect increases step percent.
== Imbuing ==
=== Mana Leech ===
When one of the Void imbuements is triggered by area attacks, the mana leeched is not the same as it would be for one creature multiplied by the number of creatures, otherwise this imbuement would be too powerful. There are a few ways to calculate the actual mana gained. One way of looking at it is to consider that 100% of the leech is applied to one creature, and 10% of it to the other creatures, though this does not allow for an accurate calculation when different resistances are involved. 
In reality, for each creature the mana leeched is the following:
ManaLeeched = \frac{Dmg \times Leech \times (0.1N+0.9)}{N},
where N is the number of creatures attacked and Leech is the Leech % depending on the level of the imbuement (Basic, Intricate or Powerful). Furthermore, the result is always rounded up. For N = 1, this simplifies to:
ManaLeeched = Dmg \times Leech,
as one would expect. 
Notes:
* Since the value is always calculated independently for each creature and rounded up, simply multiplying the first formula by N and consider the total damage dealt does not result in the total mana leeched and will underestimate the real value.
* Damage preys do not influence the mana/health leech amount, but Critical Hits do increase the leech.
* "Overkill" damage dealt above maximum health/current health of a monster still counts for leech.
== Magic Shield ==
The Magic Shield caused by the Magic Shield Spell or the Magic Shield Potion only absorbs a limited amount of damage before breaking. When this mana is depleted the spell effect disappears. The amount of mana it absorbs depends on the character's Level and Magic Level, including equipment and skill boosts active at the moment the spell is cast, according to this formula (rounded up to the next whole number), where L is your level and M is your magic level:
Magic Shield Capacity = 7M + 7.6L + \max\{300, 0.4L \}
If you have unlocked the Enhanced Magic Shield Conviction Perk on the Sorcerers' Wheel of Destiny, then the formula is:
Magic Shield Capacity = 8M + 8.6L + \max\{300, 0.4L \}
== Bosstiary ==
Equipment Loot Bonus as a function of boss points P is calculated according to this formula:
\text{Bonus} = \begin{cases}
\left \lfloor 25 + \frac{P}{10} \right \rfloor , & \text{if }0 \geq P > 250 \\
\left \lfloor 37.5 + \frac{P}{20} \right \rfloor , & \text{if }250 \geq P > 1250 \\
\left \lfloor 100 + \frac{1}{2} \left ( \sqrt{8 \frac{P-1250}{5}+81} - 9 \right ) \right \rfloor , & \text{if }P \geq 1250
\end{cases}
= Tibian Environment =
== Time ==
* 2.5 seconds = 1 Tibian minute
* 30 minutes = 12 Tibian hours
* 1 hour = 24 Tibian hours
== House Rent ==
The following section refers to the house rent formula used up to .
The formula for determining house rent is:
:rent = 100\left(\max\left(b, 1\right) - 1\right) + r \cdot s + f
Where:
* f is furnishing value. Most houses do not have one (f = 0), but some houses such as House of Recreation have one (in this case f = 5000).
* b is the number of beds.
* r is rate, the gp/sqm rate. Usually this is an increment of 5 gp/sqm.
* s is size, the amount of tiles in the house.
Example 1:
Darashia 5, Flat 01 - 25 sqm, 1 bed, 0 furnishing value.
:rent = 100\left(1 - 1\right) + 25r + 0
:rent = 25r
To find the other value, use either the rent or the rate. Since the rent is readily available:
:1000 = 25r
:r = 40
Thus the rate is 40 gp/sqm.
Example 2:
Rathleton Plaza 2 - 56 sqm, 2 beds, 0 furnishing value.
:rent = 100\left(2 - 1\right) + 56r + 0
:rent = 100 + 56r
To find the rent, you can also plug in the rate (if known), which is 45 gp/sqm.
:rent = 100 + 56 \cdot 45
:rent = 2620
= Combat =
== Spell/Rune Damage/Healing ==
NOTE: These formulae are based upon observed values. Since the latest Vocation Adjustments Update in 2020, they are no longer correct.
All the spells have the same basic formula: \lfloor lvl \cdot 0.2 \rfloor + \left(mlvl \cdot x\right)+y, where x is a decimal number and y is an integer.
For PvP damage, just divide the final result by 2.
Healing spells:
Light Healing
Max healing: x = 1.795, y = 11
Min healing: x = 1.4, y = 8
Intense Healing
Max healing: x = 5.59, y = 35
Min healing: x = 3.184, y = 20
Wound Cleansing
Max healing: x = 7.95, y = 51
Min healing: x = 4, y = 25
Fair Wound Cleansing
Max healing: x = 21.04, y = 134
Min healing: x = 15.373, y = 93
Mass Healing
Max healing: x = 10.43, y = 62
Min healing: x = 5.7, y = 26
Ultimate Healing
Max healing: x = 12.79, y = 79
Min healing: x = 7.22, y = 44
Instant attack spells
Strike spells
Max damage: x = 2.203, y = 13
Min damage: x = 1.403, y = 8
Divine Missile
Max damage: x = 3, y = 18
Min damage: x = 1.79, y = 11
Ice Wave
Max damage: x = 2, y = 12
Min damage: x = 0.81, y = 4
Fire Wave
Max damage: x = 2, y = 12
Min damage: x = 1.25, y = 4
Rune attack spells
Light Magic Missile
Max damage: x = 0.81, y = 4
Min damage: x = 0.4, y = 2
Heavy Magic Missile/Stalagmite
Max damage: x = 1.59, y = 10
Min damage: x = 0.81, y = 4
Icicle/Fireball
Max damage: x = 3, y = 18
Min damage: x = 1.81, y = 10
Holy Missile
Max damage: x = 3.75, y = 24
Min damage: x = 1.79, y = 11
Sudden Death
Max damage: x = 7.395, y = 46
Min damage: x = 4.605, y = 28
Thunderstorm/Stone Shower
Max damage: x = 2.6, y = 16
Min damage: x = 1, y = 6
Avalanche/Great Fireball
Max damage: x = 2.8, y = 17
Min damage: x = 1.2, y = 7
----
These spells have not been tested by me (yet) so I'll leave the old formulae here.
NOTICE: These formulae are based upon observed values with c calculated to one tenth with fair certainty
min: \frac{lvl}{5} + mlvl \cdot c
max: \frac{lvl}{5} + mlvl \cdot d
avg: \frac{max+min}{2} = \frac{lvl}{5} + \frac{mlvl(c+d)}{2}
* c = Multiplier for min of the desired attack spell/rune
* d = Multiplier for max of the desired attack spell/rune
The c values are roughly:
c value	spell
0 	Explosion [adevo mas hur] (note: the min damage of this spell is 0).
2.5 	Energy Beam [exevo vis lux]
4 	Great Energy Beam [exevo gran vis lux]
4 	Divine Caldera [exevo mas san]
3.5 	Terra Wave [exevo tera hur]
4.5 	Energy Wave [exevo vis hur]
10 	Heal Friend [exura sio]
5 	Rage of the Skies [exevo gran mas vis]
7 	Hell's Core [exevo gran mas flam]
5 	Wrath of Nature [exevo gran mas tera]
6 	Eternal Winter [exevo gran mas frigo]
18.5 	Divine Healing [exura san]
The d values are roughly:
d value	spell
4.8 	Explosion [adevo mas hur]
4 	Energy Beam [exevo vis lux]
7 	Great Energy Beam [exevo gran vis lux]
6 	Divine Caldera [exevo mas san]
7 	Terra Wave [exevo tera hur]
9 	Energy Wave [exevo vis hur]
14 	Heal Friend [exura sio]
12 	Rage of the Skies [exevo gran mas vis]
14 	Hell's Core [exevo gran mas flam]
10 	Wrath of Nature [exevo gran mas tera]
12 	Eternal Winter [exevo gran mas frigo]
25 	Divine Healing [exura san]
==Melee==
===Attack Value===
Attack value can be found in the Combat Stats section of the Cyclopedia and is described as follows:
This is your character's basic attack power whenever you enter a fight with a weapon or your fists. It does not apply to any spells you cast. The attack value is calculated from the weapon's attack value, the corresponding weapon skill, combat tactics and the player's level. The value represents the average damage you would inflict on a creature which had no kind of defense or protection.
The formula for attack value is as follows:
B = base attack damage, W = weapon attack, S = skill.
Offensive Mode: B + \left\lfloor \left\lfloor \frac{6}{5}W \right\rfloor \times \frac{S + 4}{28} \right\rfloor
Balanced Mode: B + \left\lfloor W \times \frac{S + 4}{28} \right\rfloor
Defensive Mode: B + \left\lfloor \left\lceil \frac{3}{5}W \right\rceil \times \frac{S + 4}{28} \right\rfloor
Note that the defensive mode formula has a ceiling function rather than a floor function for the weapon damage part.
The formula for minimum and maximum damage is not currently known.
===Defense Value===
Defense value can be found in the Combat Stats section of the Cyclopedia and is described as follows:
This is your protection against all physical attacks in close combat as well as all distance physical attacks. The higher the defense value, the less damage you will take from melee physical hits. The defense value is calculated from your shield and/or weapon defense and the corresponding skill. Careful! Your defense value protects you only from hits of two creatures in a single round.
The formula for defense value is as follows:
D = shield or weapon defense, S = skill.
If you are wearing a shield, the value of D is the Def value of your shield plus any defense modifier on your weapon. The value of S is your shielding skill.
If you are not wearing a shield, the value of D is the Def value of your weapon (ignoring the defense modifier on it). The value of S is the melee skill that corresponds to your weapon.
Offensive Mode: \left\lfloor \left\lceil \frac{7}{10}D \right\rceil \times \frac{S + 10}{40 } \right\rfloor
Balanced Mode: \left\lfloor D \times \frac{S + 10}{40 } \right\rfloor
Defensive Mode: \left\lfloor \left\lfloor \frac{8}{5}D \right\rfloor \times \frac{S + 10}{40 } \right\rfloor
=== Melee-Based Spells===
NOTE: These formulae are based upon observed values. Since the latest Vocation Adjustments Update in 2020, they are no longer correct.
*atk = Weapon's attack
*Whirlwind Throw:
min: \frac{skill+atk}{3} + \frac{lvl}{5} 
max: skill + atk + \frac{lvl}{5}
avg: \frac{max+min}{2} = \frac{2}{3}(skill + atk) + \frac{lvl}{5}
*Groundshaker:
min: 0.5\left(skill + atk\right) + \frac{lvl}{5}
max: 1.1\left(skill + atk\right) + \frac{lvl}{5}
avg: \frac{max+min}{2} = 0.8\left(skill + atk\right) + \frac{lvl}{5}
*Berserk:
min: 0.5\left(skill + atk\right) + \frac{lvl}{5}
max: 1.5\left(skill + atk\right) + \frac{lvl}{5}
avg: \frac{max+min}{2} = skill + atk + \frac{lvl}{5} 
*Fierce Berserk:
min: 1.1\left(skill + 2 \cdot atk\right) + \frac{lvl}{5}
max: 3\left(skill + 2 \cdot atk\right) + \frac{lvl}{5}
avg: \frac{max+min}{2} = 2.05\left(skill + 2 \cdot atk\right) + \frac{lvl}{5} 
Note: As usual, damage is reduced by armor but none of these abilities can be blocked by shielding. Also note, this doesn't take into account monsters weakness or strength to physical damage and if you use blood rage, you'll have to use the appropriate skills in place of your normal skills.
==Distance==
NOTE: These formulae are based upon observed values. Since the latest Vocation Adjustments Update in 2020, they are no longer correct. 
*Minimum Damage:
Minimum Damage = \frac{lvl}{5}
*Maximum Damage:
Maximum Damage = 0.09 \cdot d \cdot skill \cdot atk + Minimum Damage 
*atk = Weapon's attack
*d = Damage Factor:
** Full Attack: 1
**Balanced: 0.75
**Full Defence: 0.5
To calculate your damage in PvP, divide the result by 2.
Note that armor of the target will reduce your damage. 
*Chance to hit (without weapon hit chance modifier)
Distance	1H weapon (throwing) 	2H weapon (any bow or crossbow) 	Any bow + Sniper Arrows
1 	\min\left(75,\left(DistSkill + 1\right)\right)\% 	\min\left(90,\left(1.2\cdot DistSkill + 1\right)\right)\%	\min\left(100,\left(1.35 \cdot DistSkill + 1\right)\right)\%
2 	\min\left(75,\left(2.4\cdot DistSkill + 8\right)\right)\% 	\min\left(90,\left(3.2\cdot DistSkill\right)\right)\% 	\min\left(100,\left(3.2\cdot DistSkill + 5\right)\right)\%
3 	\min\left(75,\left(1.55 \cdot DistSkill + 6\right)\right)\%	\min\left(90,\left(2\cdot DistSkill\right)\right)\% 	\min\left(100,\left(2.25 \cdot DistSkill + 2\right)\right)\%
4 	\min\left(75,\left(1.25 \cdot DistSkill + 3\right)\right)\%	\min\left(90,\left(1.55 \cdot DistSkill\right)\right)\% 	\min\left(100,\left(1.5\cdot DistSkill + 2\right)\right)\%
5 	\min\left(75,\left(DistSkill + 1\right)\right)\% 	\min\left(90,\left(1.2\cdot DistSkill + 1\right)\right)\%	\min\left(100,\left(1.35 \cdot DistSkill + 1\right)\right)\%
6 	\min\left(75,\left(0.8\cdot DistSkill + 3\right)\right)\% 	\min\left(90,\left(DistSkill\right)\right)\% 	\min\left(100,\left(1.2\cdot DistSkill - 4\right)\right)\%
7 	\min\left(75,\left(0.7\cdot DistSkill + 2\right)\right)\% 	 	
===Distance-Based Spells===
NOTICE: This formula is based upon observed values.
*Ethereal Spear:
min: \frac{skill + 25}{3} + \frac{lvl}{5} 
max: skill + 25 + \frac{lvl}{5}
avg: \frac{max+min}{2} = \frac{2}{3}\left(skill + 25\right) + \frac{lvl}{5}
==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===
r = \left \lfloor \frac{t}{2} \right \rfloor
R = \left \lfloor \frac{t}{2} \right \rfloor \cdot 2 - 1
:where \left \lfloor x \right \rfloor denotes floor function (rounding down).
===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 = \left \lfloor \frac{9}{2} \right \rfloor
:: r = 4
:R = r \cdot 2 - 1
::R = 7
Now we calculate the % reduction that Zaoan Helmet has
:p = 5
::d = \left \lfloor \frac{100 - 5}{100} \cdot 200 \right \rfloor
::d = 190
Now we calculate the % reduction that Protection Amulet has
:p = 6
::d = \left \lfloor \frac{100 - 6}{100} \cdot 190 \right \rfloor
::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==
*Damage reduction
Min:
totalArmor \cdot 0.475
Max:
totalArmor \cdot 0.95 -1 
*Attack of Creature = a
(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 the following equations:
dmgReducedByDef = a - b \cdot d \cdot \frac{e}{100}
averageDmg = \frac{dmgReducedByDef}{100} \cdot c
NOTICE: The max damage of a creature could be higher than the max damage in creatures page.
Category:Formulas