From 715c9106dbff4524f3fdf5d23f762e5e6518e0cb Mon Sep 17 00:00:00 2001 From: troido Date: Mon, 24 Feb 2020 12:38:23 +0100 Subject: healing works now too, the first time based system --- src/systems/fight.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/systems/fight.rs') diff --git a/src/systems/fight.rs b/src/systems/fight.rs index 4b3c672..d0342b5 100644 --- a/src/systems/fight.rs +++ b/src/systems/fight.rs @@ -13,7 +13,6 @@ use crate::components::{ Controller, Position, Attacked, - add_attack, Fighter, Health }; @@ -42,7 +41,7 @@ impl <'a> System<'a> for Fight { 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 { - add_attack(&mut attacked, *ent, fighter.attack.clone()); + Attacked::add_attack(&mut attacked, *ent, fighter.attack.clone()); break; } } -- cgit