Attack and Defense

## Types of attack and armor

There are three types of attack and armor or defense: Physical, psycho and metaphysical.

* Physical techniques and abilities are the most common: They cause physical damage, most weapons, shields and clothes have this kind of attack and armor: Most Add damge, Animal, Blood, Nature, Shadow and Shapeshifting abilities have this kind of attack.
* Psycho techniques and abilities are relate to the mind: They attack creature's conscience and mental stability. Psycho abilities have always this kind of attack.
* Metaphysical techniques and abilities are the less common and their damage is related to creature's soul. They're very effective, though don't work over soulless creatures. Metaphysical abilities have this attack, as well as most of demonic abilities.

When damage is calculated, it is used base attack and armor/defense of the same type.

## Player's attack

The player's attack is calculated upon many factors, being the most critical technique base attack, strength and critical damage probability. The calculation occurs as is instructed here:

1. The strenght multiplier is calculated by adding a unit to the strength multiplied by the tool trigger and divided by 1000.
2. It is calculated a ground factor.
3. The base attack is multiplied by the ground factor and the strength multiplier.
4. Finally, it is multiplied by the critical damage factor.

This is the total attack. It is rounded to the previous integer

C
×

G

f

×
A
×

(

1
S

/

1000

)

{\displaystyle C\times G\_{f}\times A\times \left(1+S/1000\right)}

### Tool trigger

The tool trigger is a value that modifies the effect of strength over a technique's.For example:

0 is for powder weapons (as guns, rifles), bows etc, and non-direct attacks (as fire techniques)

0,3 is for throwing weapons (as axes, honda)

1 is for physical attacks such as claws or fangs and short distance weapons (as knifes)

1,2 is for mid distace weapons (as swords, spears, axes)

### Ground factor

The ground factor takes into account the effect of height diferences, weather and terrain over technique's attack.The ground factor is specially important with throwing weapons and indirect attacks. The ground factor is attached to each technique.

### Critical damage factor

Once an attack is made, the computer generates a random number. The number is compared to the critical damage probability and if it falls into positive critical damge, the attack increases three times.

Critical damage probability is a value modified by agility, abilities and the technique itself. The base value is 3%. As the agility increases, the probability is calculated by Agility level over 4 and rounded to the upper integer. It means that critical damage probability at full agility is 16%.

## AI's attack

AI's creatures attack is calculated using creature's level, ground factor, technique's base attack and critical damage probability. It means that level replaces Strength in the formula (which is now divided by 100).

C
×

G

f

×
A
×

(

1
L

/

100

)

{\displaystyle C\times G\_{f}\times A\times \left(1+L/100\right)}

## Player's defense

Despite player's attack, which is based on the technique used by him. Defense is an attribute modified by certain abilities and objects. Each creature (inlcuding player) has a base defense according to the specie. For example, vampires (except primival vampires) have 5 defensive points. The total defense of the player is calculated as follows if he isn't defending.

1. A raw defense is calculated by adding base defense and clothe's defense.
2. The raw defense is multiplied by a random number between 0.8 and 1.2

If the player is defending, a raw defense is calculated using object defense. If the player is covering himself, the raw defense is the raw defense calculated as in the previous case, multiplied always by 0,8. The player do not receive any direct damage.

## AI's defense

The total defense for an AI's creature is always the creature base defense multiplied by a random factor between 0,8 and 1,2. If the creature covers himself, the same algorithm for players is used.

## Total damage

Total damage is calculated using the attack and defense. Each time an attack hits, the following algorithm is applied.

1. A raw direct damage is calculated as the difference between total attack and total defense.
2. If the difference is equal or less than zero, a random integer between 1 and 100 is generated. The total damage is then calculated as follows:
	* 95-100 then damage is equal to 3 HP
	* 85-94 then damage is equal to 2 HP
	* 70-84 then damage is equal to 1 HP
	* 1-69 then there is no damage.
3. If the total attack is greater than total defense, the difference is multiplied by an effectivity factor, related with technique type and specie.

The total damage calculated inhere do not include that caused by states as poisoned or burned.