Combat/Damage Formulas

Main
This page will list all formulas used in the damage calculation for the Crimson Keep series. Formulas used in older games can be found under collapsible elements.

This formula is the final formula that gives you the damage of an attack.

$$ \text{Damage } = T_{c} \cdot E \cdot M_{c} \cdot M_{d} \cdot B_{p} \cdot \left \lceil B_{a} \cdot (M_{l} + ((1 - M_{l}) \cdot \text{random} \in \left [ 0, 1 \right ] ) ) \right \rceil $$

Where:
 * $$T_{c}$$ is the type constant. Assumes a value of 0.1 for Physical and Magical attacks and 0.5 for Tempt based attacks. For enemy attacks, the constant is 1
 * $$E$$ is the sum of bonus modifiers.
 * $$M_{c}$$ is the critical attack modifier. Normally assumes a value of 1.5 if the attack is a critical hit, and is 1 otherwise.
 * $$M_{d}$$ is the defense modifier.
 * $$B_{p}$$ is the base power of the attack.
 * $$B_{a}$$ is the corresponding attack value.
 * $$M_{l}$$ is the mastery modifier.

Effectiveness
$$E = E_{a} \cdot E_{b} \cdot E_{m}$$

Where:
 * $$E_{a}$$ is the attribute modifier
 * $$E_{a} = 1 + 0.5 W $$ where $$W$$ is the number of times the target is weak to the attacking attribute.
 * $$E_{a} = 1 \div R $$ where $$R$$ is 1 plus the number of times the target resists the attacking attribute.
 * $$E_{m}$$ is the sum of other modifiers (multiplicative)
 * $$E_{b}$$ is the body type modifier when applicable, defaults to 1
 * Body Type only affects physical moves

Old
Chapter 3 $$E_{a} = 1 + W $$

Where:
 * $$W$$ is the number of times the target is weak to the attacking attribute.

Critical Hit
Critical hits can only be performed by Soriel.

Critical Damage
$$M_{c} = 1.5 + B$$

Where:
 * $$B$$ is any bonuses to critical damage.

Critical Hit Rate
$$C_{r} = 0.03 + B$$

Where:
 * $$B$$ is any bonuses to critical rate.

Defense
This is the formula for the $$M_{d}$$ value

For Physical and Magical attacks:

$$ M_{d} = \begin{cases} (5 \cdot L_{i} + A_{i}) \div (5 \cdot L_{d} + D) \text{ if } (5 \cdot L_{i} + A_{i}) \div (5 \cdot L_{d} + D) < 1 \\ \text{Otherwise } M_{d} = 1 \end{cases} $$

Where:
 * $$L_{i}$$ is the level of the attacker
 * $$A_{i}$$ is the corresponding attack value
 * $$L_{d}$$ is the level of the target
 * $$D$$ is the corresponding defense value

For Tempt based attacks:

Chapter 5
 * Defense mod for tempt based attacks is 1

Chapter 4

$$ M_{d} = \begin{cases} (5 \cdot L_{i} + T) \div (6 \cdot L_{d}) \text{ if } (5 \cdot L_{i} + T) \div (6 \cdot L_{d}) < 1 \\ \text{Otherwise } M_{d} = 1 \end{cases} $$

Where:
 * $$L_{i}$$ is the level of the attacker
 * $$T$$ is the tempt value
 * $$L_{d}$$ is the level of the target

Old
Chapter 3 For Physical and Magical attacks:

$$ M_{d} = \begin{cases} (100 + A_{i})\div(100 + D) \text{ if } (100 + A_{i})\div(100 + D) < 1 \\ \text{Otherwise } M_{d} = 1 \end{cases} $$

Where:
 * $$A_{i}$$ is the corresponding attacking stat
 * $$D$$ is the target's defense

For Tempt based attacks:

$$ M_{d} = \begin{cases} (100 + T)\div(100 + L_{e}) \text{ if } (100 + T)\div(100 + L_{e}) < 1 \\ \text{Otherwise } M_{d} = 1 \end{cases} $$

Where:
 * $$T$$ is the tempt stat
 * $$L_{e}$$ is the level of the target

Base Power
$$B_{p}$$ is the displayed power of the move converted into decimal form (450 = 4.5)

Attack Value
$$B_{a} = \left \lceil 20 + (150 + A_{i}^{1.8})\div 3 \right \rceil $$

Where:
 * $$A_{i}$$ is the respective attacking stat (Physical attack, Magic attack, Tempt.)

Enemy Attack Value
$$B_{a} = \left \lceil 3 + (150 + A_{i}^{1.8})\div 90 \right \rceil $$

Where:
 * $$A_{i}$$ is the respective attacking stat (Physical attack, Magic attack, Tempt.)

Mastery
$$ M_{l} = 0.6 + 0.4 \left ( \frac{L}{99} \right ) $$

Where:
 * $$L$$ is the level of the attacker