#ifndef WH_DAMAGE_H_15ae2a53_ #define WH_DAMAGE_H_15ae2a53_ #include "structs.h" /* * Add two DAMAGEs together. */ extern DAMAGE damage_add(DAMAGE, DAMAGE); /* * Subtract one DAMAGE from another. It is a panic()-level error for * any of the components to go below 0. */ extern DAMAGE damage_sub(DAMAGE, DAMAGE); /* * Create and return a DAMAGE whose components add up to the second * argument and which are in (approximate) proportion to the first * argument's components. * * Thinking of DAMAGEs as vectors in 3-space, this takes the first arg * and scales it to have magnitude equal to the second arg * (approximately, of course, because everything is integers). */ extern DAMAGE damage_proportion(DAMAGE, int); #endif