diff options
| author | troido <troido@protonmail.com> | 2020-03-02 12:02:54 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-03-02 12:02:54 +0100 |
| commit | 27c0795fb70739ce5609a0f424d80491d4a8c5a1 (patch) | |
| tree | 1a6ab802edb717a42ca67a8d997cf960d7f4f5ed /src/componentwrapper.rs | |
| parent | d246537a28a7a71dfb2487d31d6fac3ccab5053d (diff) | |
added monster ai
Diffstat (limited to 'src/componentwrapper.rs')
| -rw-r--r-- | src/componentwrapper.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/componentwrapper.rs b/src/componentwrapper.rs index 54c0daa..29bf39d 100644 --- a/src/componentwrapper.rs +++ b/src/componentwrapper.rs @@ -23,7 +23,8 @@ use crate::{ Healing, Volatile, AttackMessage, - Autofight + Autofight, + MonsterAI }, parameter::{Parameter, ParameterType} }; @@ -132,10 +133,11 @@ components!( } }; Trap (damage: Int) {Trap{attack: AttackMessage::new(damage)}}; - Fighter (damage: Int, cooldown: Int) {Fighter{attack: AttackMessage::new(damage), cooldown}}; + Fighter (damage: Int, cooldown: Int) {Fighter{attack: AttackMessage::new(damage), cooldown, range: 1}}; Healing (delay: Int, health: Int) {Healing{delay, health, next_heal: None}}; Volatile (delay: Int) {Volatile{delay, end_time: None}}; Autofight () {Autofight::default()}; + MonsterAI (move_chance: Float, homesickness: Float, view_distance: Int) {MonsterAI{move_chance, homesickness, view_distance}}; ); |
