fix melee hit_count increment

This commit is contained in:
swrup 2021-07-09 16:17:51 +00:00 committed by Samuel Keiffer
parent 1c8e47b9b1
commit 02151417f2

View File

@ -161,7 +161,7 @@ impl<'a> System<'a> for Sys {
char_state: read_data.char_states.get(target),
};
melee_attack.attack.apply_attack(
let is_applied = melee_attack.attack.apply_attack(
target_group,
attacker_info,
target_info,
@ -173,7 +173,9 @@ impl<'a> System<'a> for Sys {
|o| outcomes.push(o),
);
melee_attack.hit_count += 1;
if is_applied {
melee_attack.hit_count += 1;
}
}
}
}