use std::collections::HashMap; use ::serde::Deserialize; use super::item_structs::Renderable; #[derive(Deserialize, Debug)] pub struct Mob { pub name: String, pub renderable: Option, pub blocks_tile: bool, pub vision_range: i32, pub movement: String, pub quips: Option>, pub attributes: MobAttributes, pub skills: Option>, pub level: Option, pub hp: Option, pub mana: Option, pub equipped: Option>, pub natural: Option, pub loot_table: Option, pub light: Option, pub faction: Option, pub gold: Option, pub vendor: Option>, pub abilities: Option>, } #[derive(Deserialize, Debug)] pub struct MobAbility { pub spell: String, pub chance: f32, pub range: f32, pub min_range: f32, } #[derive(Deserialize, Debug)] pub struct MobLight { pub range: i32, pub color: String, } #[derive(Deserialize, Debug)] pub struct MobAttributes { pub might: Option, pub fitness: Option, pub quickness: Option, pub intelligence: Option, } #[derive(Deserialize, Debug)] pub struct MobNatural { pub armor_class: Option, pub attacks: Option>, } #[derive(Deserialize, Debug)] pub struct NaturalAttack { pub name: String, pub hit_bonus: i32, pub damage: String, }