Function spend_charge

Source
pub fn spend_charge(entity: &mut Entity, magnitude_key: &str, charges_key: &str)
Expand description

Spends one charge of a (magnitude, charges) pair, clearing the magnitude with the last one so a stale value can never apply for free.