From 27c0795fb70739ce5609a0f424d80491d4a8c5a1 Mon Sep 17 00:00:00 2001 From: troido Date: Mon, 2 Mar 2020 12:02:54 +0100 Subject: added monster ai --- src/room.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/room.rs') diff --git a/src/room.rs b/src/room.rs index 81b8cd0..03ee9db 100644 --- a/src/room.rs +++ b/src/room.rs @@ -39,7 +39,8 @@ use crate::{ Fight, Heal, Volate, - UpdateCooldowns + UpdateCooldowns, + ControlAI }, components::{ Position, @@ -87,16 +88,17 @@ impl <'a, 'b>Room<'a, 'b> { .with(RegisterNew::default(), "registernew", &[]) .with(UpdateCooldowns, "cool_down", &["registernew"]) .with(ControlInput, "controlinput", &["cool_down"]) - .with(Take, "take", &["controlinput"]) - .with(Use, "use", &["controlinput"]) - .with(Move, "move", &["registernew", "controlinput"]) + .with(ControlAI, "controlai", &["cool_down"]) + .with(Take, "take", &["controlinput", "controlai"]) + .with(Use, "use", &["controlinput", "controlai"]) + .with(Move, "move", &["controlinput", "controlai"]) .with(Trapping, "trapping", &["move"]) - .with(Fight, "fight", &["move", "controlinput"]) + .with(Fight, "fight", &["move"]) .with(Heal, "heal", &["registernew"]) .with(Attacking, "attacking", &["use", "trapping", "fight", "heal"]) .with(View::default(), "view", &["move", "attacking", "volate"]) .with(Migrate, "migrate", &["view"]) - .with(Create, "create", &["view", "controlinput"]) + .with(Create, "create", &["view"]) .with(Remove, "remove", &["view", "move"]) .build(); -- cgit