summaryrefslogtreecommitdiff
path: root/src/room.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-03-02 12:02:54 +0100
committertroido <troido@protonmail.com>2020-03-02 12:02:54 +0100
commit27c0795fb70739ce5609a0f424d80491d4a8c5a1 (patch)
tree1a6ab802edb717a42ca67a8d997cf960d7f4f5ed /src/room.rs
parentd246537a28a7a71dfb2487d31d6fac3ccab5053d (diff)
added monster ai
Diffstat (limited to 'src/room.rs')
-rw-r--r--src/room.rs14
1 files changed, 8 insertions, 6 deletions
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();