summaryrefslogtreecommitdiff
path: root/src/systems/fight.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-02-24 12:38:23 +0100
committertroido <troido@protonmail.com>2020-02-24 12:38:23 +0100
commit715c9106dbff4524f3fdf5d23f762e5e6518e0cb (patch)
treecf5dc0c5d30fc9ba7e38bdff40907fe4a96261a2 /src/systems/fight.rs
parent4718cfdc7c2bf67d2389ca18ab035fe5a0887ff0 (diff)
healing works now too, the first time based system
Diffstat (limited to 'src/systems/fight.rs')
-rw-r--r--src/systems/fight.rs3
1 files changed, 1 insertions, 2 deletions
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;
}
}