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.

# Damage

T

c

⋅
E
⋅

M

c

⋅

M

d

⋅

B

p

⋅

⌈

B

a

⋅
(

M

l

(
(
1
−

M

l

)
⋅
random
∈

[

0
,
1

]

)
)

⌉

{\displaystyle
\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

{\displaystyle 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

{\displaystyle E}

 is the sum of bonus modifiers.
* M
c

{\displaystyle 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

{\displaystyle M\_d }

 is the defense modifier.
* B

p

{\displaystyle B\_{p}}

 is the base power of the attack.
* B

a

{\displaystyle B\_{a}}

 is the corresponding attack value.
* M

l

{\displaystyle M\_{l}}

 is the mastery modifier.

# E

E

a

⋅

E

b

⋅

E

m

{\displaystyle E = E\_{a} \cdot E\_{b} \cdot E\_{m}}

Where:

* E
a

{\displaystyle E\_a}

 is the attribute modifier
	+ E

	a

	=
	1
	0.5
	W

	{\displaystyle E\_{a} = 1 + 0.5 W }

	 where

	W

	{\displaystyle W}

	 is the number of times the target is weak to the attacking attribute.
	+ E

	a

	=
	1
	÷
	R

	{\displaystyle E\_{a} = 1 \div R }

	 where

	R

	{\displaystyle R}

	 is 1 plus the number of times the target resists the attacking attribute.
* E

m

{\displaystyle E\_{m}}

 is the sum of other modifiers (multiplicative)
* E

b

{\displaystyle E\_{b}}

 is the body type modifier when applicable, defaults to 1
	+ Body Type only affects physical moves

 Armored | 0.5

### Old

**Chapter 3**

E

a

=
1
W

{\displaystyle E\_{a} = 1 + W }

Where:

* W

{\displaystyle 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

{\displaystyle M\_{c} = 1.5 + B}

Where:

* B

{\displaystyle B}

 is any bonuses to critical damage.

### Critical Hit Rate

C

r

=
0.03
B

{\displaystyle C\_{r} = 0.03 + B}

Where:

* B

{\displaystyle B}

 is any bonuses to critical rate.

## Defense

This is the formula for the

M
d

{\displaystyle M\_d }

 value

**For Physical and Magical attacks:**

M

d

=

{

(
5
⋅

L

i

A

i

)
÷
(
5
⋅

L

d

D
)
 if
(
5
⋅

L

i

A

i

)
÷
(
5
⋅

L

d

D
)
<
1

Otherwise

M

d

=
1

{\displaystyle
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

{\displaystyle L\_i}

 is the level of the attacker
* A
i

{\displaystyle A\_i}

 is the corresponding attack value
* L

d

{\displaystyle L\_{d}}

 is the level of the target
* D

{\displaystyle D}

 is the corresponding defense value

**For Tempt based attacks:**

**Chapter 5**

* Defense mod for tempt based attacks is 1

**Chapter 4**

M

d

=

{

(
5
⋅

L

i

T
)
÷
(
6
⋅

L

d

)
 if
(
5
⋅

L

i

T
)
÷
(
6
⋅

L

d

)
<
1

Otherwise

M

d

=
1

{\displaystyle
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

{\displaystyle L\_i}

 is the level of the attacker
* T

{\displaystyle T}

 is the tempt value
* L

d

{\displaystyle L\_{d}}

 is the level of the target

### Old

**Chapter 3**
**For Physical and Magical attacks:**

M

d

=

{

(
100

A

i

)
÷
(
100
D
)
 if
(
100

A

i

)
÷
(
100
D
)
<
1

Otherwise

M

d

=
1

{\displaystyle
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

{\displaystyle A\_i}

 is the corresponding attacking stat
* D

{\displaystyle D}

 is the target's defense

**For Tempt based attacks:**

M

d

=

{

(
100
T
)
÷
(
100

L

e

)
 if
(
100
T
)
÷
(
100

L

e

)
<
1

Otherwise

M

d

=
1

{\displaystyle
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

{\displaystyle T}

 is the tempt stat
* L

e

{\displaystyle L\_{e}}

 is the level of the target

## Attack Modifiers

### Base Power

B

p

{\displaystyle B\_{p}}

 is the displayed power of the move converted into decimal form (450 = 4.5)

### Attack Value

B

a

=

⌈

20
(
150

A

i

1.8

)
÷
3

⌉

{\displaystyle B\_{a} = \left \lceil 20 + (150 + A\_{i}^{1.8})\div 3 \right \rceil }

Where:

* A
i

{\displaystyle A\_i}

 is the respective attacking stat (Physical attack, Magic attack, Tempt.)

### Enemy Attack Value

B

a

=

⌈

3
(
150

A

i

1.8

)
÷
90

⌉

{\displaystyle B\_{a} = \left \lceil 3 + (150 + A\_{i}^{1.8})\div 90 \right \rceil }

Where:

* A
i

{\displaystyle A\_i}

 is the respective attacking stat (Physical attack, Magic attack, Tempt.)

### Mastery

M

l

=
0.6
0.4

(

L
99

)

{\displaystyle
M\_{l} = 0.6 + 0.4 \left ( \frac{L}{99} \right )
}

Where:

* L

{\displaystyle L}

 is the level of the attacker