Function received_damage_attribute

Source
pub fn received_damage_attribute() -> Attribute
Expand description

The received_damage attribute, deliberately NOT part of the default test config.

It is the ×10000 incoming multiplier every landed hit is scaled by, and mechanics::fight::damage_entity deals NO damage at all while it has no base value (has_attribute_base). Adding it to the shared fixture therefore turns real damage on for every attack in the workspace at once — arena outcomes, flip thresholds and fight lengths all move. A test that needs a swing to land pushes this onto its own config copy instead:

let mut config = load_config();
config.attributes.push(received_damage_attribute());