This proposal has been accepted
The development team has discussed the contents of this article and has decided that it should be implemented as described. But the implementation is not finished yet. You can help to bring the features described here into the game.
This article has the following gaps:
- Evaluation of possible balancing issues caused by the Attributes system, Equipment system and Skill system
- Hitting and dodging probability (should maybe be handled in Combat system).
This article is a draft about how damage calculation could be done. It is based on the new Attribute system and the Skill system 2 (although the other skill system proposals Skill system 1 and Skill system 3 should be compatible)
Each hit has the following attributes:
- Type of attack (Physical, magical, hazard or other) determining how the targets defence is calculated
- Element (neutral or one of the 8 Elements)
- Damage value
Physical attacks
Physical attacks are usually the results of normal attacks with melee weapons. In that case the following stats are interesting for calculating attacks:
- Damage rating of attackers weapon (usually between 0 and 100)
- Attackers strength (usually between 1 and 100)
- Attackers skill with the used weapon type (usually between 1 and 100)
- Elemental property of attackers weapon
- Elemental modifier of the target against the elemental property of the weapon (usually 1 but can be a floating point value equal or larger than 0 (immune) and up to 2 (double damage) or more)
Damage is calculated:
damage = weapon_damage + strength + rand(0, weapon_skill)
Special attacks or other situations might use other formulas for calculation. Characters based on strength have more regular results than characters based on skill (strength based characters just hit as hard as they can while skill based characters try to hit a vulnerable spot what doesn't work every time). This makes skill less important than strength for damage calculation, but the skill level should also be important for calculating the hit probability.
The hp loss of the victim of a physical attack is calculated like that:
HP loss = (Damage * element_modifier) - vitality - (equip_defence)
Magical attacks
Magical attacks are usually spells. Their damage is calculated out of:
- Damage rating of the spell (can differ very much)
- Attackers skill with the used magic element (usually between 1 and 100)
- Elemental property of the spell
- Willpower of the target (usually between 1 and 100)
- Elemental damage modifier of the target against the elemental property of the spell (usually 1 but can be a floating point value equal or larger than 0 (immune) and up to 2 (double damage) or more)
damage = spell_damage * willpower + spell_skill
The hp loss of the target is calculated the following:
HP loss = (damage * element_modifier) / (1 + willpower)
When the elemental modifier of the target is 1 and the willpower of the target and the caster are the same the damage will be equal the spell damage multiplied with the casters spell skill.
Hazard attacks
Hazard attacks are attacks that attack the body of the character but damage it from the inside. Examples are poisons, diseases, environmental hazards (heat or cold not caused by magic) and so on. That means that armor won't help. But a high vitality or elemental resistance can help the character to withstand such effects.
HP loss = (Damage * element_modifier) / (1 + vitality)
Other attacks
Other attacks are attacks that cause a fixed hp loss and ignore the usual damage calculation rules. So the hp loss is always equal the damage value.