|
User Documentation Developer Documentation
ToDo
Other |
Doc /
ArmorRulesThis page intends to describe the rules used by FreedroidRPG related to the armor. IntroductionPlayer armorThis system is the result of many tries along the years, and is simple yet effective and realistic. The general idea is that the stronger your armor, the less damage you will take when you are hit. The armor strength is indicated by a unitless value called "armor class". The armor class is fed through a mathematical function that computes the damage reduction based on the armor class. The law we use is the following (armor.c):
Enemy armorArmor for enemies is handled in a very simple way: they have no armor at all. No armor and more health points is equivalent to having armor, so for the sake of simplicity we do not use armor for enemies. Summary table
BulletsBullets are fired by ranged weapons. A bullet can hit the player, or robots, or any obstacle. Bullets hitting playerWhen a bullet hits the player, its "damage" value is multiplied by the damage reduction factor computed from the player armor class, and this is removed from the player's health points. Bullets hitting robotsRobots currently have no armor class. As a result, the full damage of the bullet is applied to them whenever a bullet hits. Melee strikesA melee strike is the data structure that is created when a melee weapon is used ingame. A melee strike has a damage value, and a chance to hit. Striking the playerThe chance to hit the player is fixed (it is the melee strike's chance to hit).
If the strike does not hit, no damage is dealt. If the strike hits, the damage dealt is the melee strike's damage multiplied by the damage factor (hence reduced by the armor). Striking robotsThe chance to hit a robot is the melee strike's chance to hit, but reduced by the "monster_level" of the robot.
BlastsA blast is an explosion. Exterminator bullets create blasts when they explode, for example. A blast is characterized by an area of effect and a damage-per-second value. Blasts on playerBlasts on robotsBlasts on player and robots do the full damage-per-second with no reduction whatsoever. |