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/defaultencyclopedia.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/defaultencyclopedia.rs') 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() } -- cgit