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/defaultencyclopedia.rs | |
| parent | d246537a28a7a71dfb2487d31d6fac3ccab5053d (diff) | |
added monster ai
Diffstat (limited to 'src/defaultencyclopedia.rs')
| -rw-r--r-- | src/defaultencyclopedia.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/defaultencyclopedia.rs b/src/defaultencyclopedia.rs index c7e947e..0234c54 100644 --- a/src/defaultencyclopedia.rs +++ b/src/defaultencyclopedia.rs @@ -142,6 +142,20 @@ pub fn default_encyclopedia() -> Encyclopedia { "sprite": "wound", "height": 0.25, "components": [["Volatile", {"delay": ["int", 4]}]] + }, + "rat": { + "sprite": "rat", + "height": 1, + "components": [ + ["MonsterAI", { + "view_distance": ["int", 3], + "move_chance": ["float", 0.08], + "homesickness": ["float", 0.1] + }], + ["Health", {"health": ["int", 8], "maxhealth": ["int", 8]}], + ["Fighter", {"damage": ["int", 2], "cooldown": ["int", 6]}], + ["Movable", {"cooldown": ["int", 3]}] + ] } })).unwrap() } |
