TheDarklingWolf/Cataclysm-DDA — pull request #1063 by origamiwolf (2013-05-17 13:35:56+00:00)
Title: WIP: Attempt at making armour more useful

This is a first draft of a new armour damage absorption code.

Like the melee code, the current player::absorb code had a mix of floats and integers, leading to all sorts of problems in the calculation.

This new code changes everything to integers, as well as changing the logic.

Basically there is now a material resistance matrix in itype.h, which lists the resistance for each type of material against each type of damage. This is used as a multiplicative factor in player::absorb to determine the overall resistance of the armour to damage. The overall resistance is then compared against the monster damage to determine if the armour is damaged, as well as how many points of damage is absorbed by the armour.

This now probably causes a lot of balance issues, since the current protection values for armour itypes probably already considers the material.