## Fighting Formulas

### Important Terms

- MaxHP - This is the maximum amount of health your character/monster can have.
- CurHP - The current amount of health the character has.
- Attack (atk) - This is the attack strength as reported under the health and magic in the battle screen.
- Defense (def) - This is the defense strength as reported under the health and magic in the battle screen.
- Effective Attack (eAtk) - This is a calculated value based on buffs.
- Effective Defense (eDef) - This is a calculated value based on buffs.
- DamMAX - The maximum amount of damage that can be inflicted by an attack.

### Effective Attack

Effective Attack for the sake of the other equations on this page only consists of multiplying atk by 1.5 if the Power Up has been cast. Otherwise it is the same as atk.

### Effective Defense

Effective Defense for the sake of the other equations on this page only consists of multiplying def by 1.5 if the Defense Up has been cast. Otherwise it is the same as def.

### Damage Calculation (Estimate)

Due to rounding errors and possible randomness the actual damage will differ from the calculated value. Use the eAtk of the attacker and the eDef of the defender.

`(CurHP / MaxHP * eAtk) / (CurHP / MaxHP * eDef) * DamMAX`

NOTE: Some spells (Annihilation, Oblivion) simply do a percentage of damage. This is calculated against CurHP of the defender.

### Damage Calculation (Actual)

Ryan Bettens' treatise on the matter

## Other Formulas

### Sell Values

`(Cost of Item) * .75 = (Sell value of Item)`

This is integer math so round down to nearest integer. Keys cannot be sold.