Function compose_max_hp

Source
pub fn compose_max_hp(
    attributes: &EntityAttributes,
    game_config: &GameConfig,
) -> Result<u64>
Expand description

Compose the fight max_hp from an aggregated attribute map the same way combat composes every other stat (fight::get_entity_stat): raw hp, plus additive hp.bonus, times the hp.mod multiplier (+10000 == +1.0, floored at MIN_STAT_MOD_MULT). This keeps hp.mod/hp.bonus grants (class levels, the Endurance talent) real in combat and consistent with the power scalar’s get_attr_from_attrs composition.