Damage

**Damage** is used to lower Health. Damage is increased by equipment, Strength, status effects, Close combat skill, Ranged combat skill, and Properties. Damage is reduced by Protection, Property Resistance, Endurance, Defensive combat skill, status effects, and Properties.

## Calculate Base Damage

To obtain the total damage the game will do a series of calculations in this order:

1. The game will first calculate a minimum damage and a maximum damage to simulate a damage range so that damage isn't consistent. This means damage can be 20-30, rather than always 20 as an example:
Minimum damage is calculated by:

```
Minimum Damage =  Minimum Damage from equipment + Total Strength + (Combat Skill * 5)
```

Maximum damage is calculated by:

```
Maximum Damage = Maximum Damage from equipment + Total Strength + (Combat Skill * 5)
```
2. Once minimum and maximum damage is determined, a random number is picked between the two numbers and that number will be used for final damage calculation which will now be called Base Damage from this point onward.
3. Base Damage will then be combined by adding in the total Damage from status effects:

```
Base Damage = Base Damage + Damage from status effects
```
4. Then if the player wears a Nameless Bracelet the Base Damage will be multiplied by 20%:

```
Base Damage = Base Damage * 1.2
```
5. Then if the player succeeds on a Critical Rate check the Base Damage is doubled:

```
Base Damage = Base Damage * 2
```

## Calculate Damage reduction

Now the game will do damage reduction calculations to factor in defenses. The game will do a series of calculations in this order:

1. Total Protection is calculated by tallying all sources of Protection and Property Resistances that match the attack Property, then:
	* If the target is not a minion (a target that is not the main enemy you are fighting such as Small Jelly) reduce Damage by Total Protection
	* If the target is a minion, set Total Protection to 0% or in other words, skip Damage Reduction calculation. Minions will take 1-4 less Damage due to Endurance but consider this insignificant.
	* If an arrow was used then apply Diminish Protection which divides Total Protection by 2. This means that Total Protection was reduced by 50%.
2. Damage is then reduced by Total Protection as a percentage:

```
Base damage = Base Damage - (Base Damage * ((Protection + Property Resistance)/100))
```

For example erter
## Modify Damage by Property

1. The Base Damage is then checked against Properties whether the target of the damage will absorb it, is immune, resistant, or weak to it. When used in the formula below *"?"*:
	* 2 if absorb
	* 1 if immune
	* 0.5 if resistant
	* -1 if weak.
	* If the target is a minion, property calculation is skipped.
```
Base damage = Base Damage - (Base Damage * ?)
```
2. The Base Damage will then round to the nearest whole number.
3. Total Damage has now been calculated and will then reduce Health by that amount.

## Summary

So to summarize the order of calculations:

1. Calculate minimum and maximum Damage.
2. Pick a random number within that range.
3. Calculate Base Damage.
4. Calculate Total Protection.
5. Apply Protection modifiers.
6. Reduce Base Damage by Total Protection to obtain Total Damage.
7. Modify Total Damage by the Property system.
8. Total Damage has now been calculated.