diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/systems/fight.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systems/fight.rs b/src/systems/fight.rs index 42a7543..2a663e3 100644 --- a/src/systems/fight.rs +++ b/src/systems/fight.rs @@ -40,12 +40,12 @@ impl <'a> System<'a> for Fight { for (entity, controller, position, fighter) in (&entities, &controllers, &positions, &fighters).join(){ match &controller.control { Control::Attack(directions) => { - for direction in directions { + 'targets: for direction in directions { for ent in ground.cells.get(&(position.pos + direction.to_position())).unwrap_or(&HashSet::new()) { if healths.contains(*ent) && *ent != entity { AttackInbox::add_message(&mut attacked, *ent, fighter.attack.clone()); cooldowns.insert(entity, ControlCooldown{amount: fighter.cooldown}).unwrap(); - break; + break 'targets; } } } |
