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/trapping.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/systems/trapping.rs') diff --git a/src/systems/trapping.rs b/src/systems/trapping.rs index 5e0921e..d6902a8 100644 --- a/src/systems/trapping.rs +++ b/src/systems/trapping.rs @@ -9,7 +9,7 @@ use specs::{ }; use crate::{ - components::{Health, Attacked, add_attack, Moved, Entered, Trap, Position}, + components::{Health, Attacked, Moved, Entered, Trap, Position}, resources::Ground }; @@ -31,7 +31,7 @@ impl <'a> System<'a> for Trapping { for (entity, _entered, trap, position) in (&entities, &entereds, &traps, &positions).join() { for ent in ground.cells.get(&position.pos).unwrap(){ if ent != &entity && moves.contains(*ent) && healths.contains(*ent) { - add_attack(&mut victims, *ent, trap.attack.clone()); + Attacked::add_attack(&mut victims, *ent, trap.attack.clone()); } } } -- cgit