roguelike-game/src/raws/mob_structs.rs

32 lines
666 B
Rust
Raw Normal View History

2021-12-24 10:38:44 -05:00
use ::serde::Deserialize;
use super::item_structs::Renderable;
#[derive(Deserialize, Debug)]
pub struct Mob {
pub name: String,
pub renderable: Option<Renderable>,
pub blocks_tile: bool,
pub stats: MobStats,
pub vision_range: i32,
pub ai: String,
2022-01-03 10:49:12 -05:00
pub quips: Option<Vec<String>>,
2022-01-03 15:21:12 -05:00
pub attributes: MobAttributes,
}
#[derive(Deserialize, Debug)]
pub struct MobStats {
pub max_hp: i32,
pub hp: i32,
pub power: i32,
pub defense: i32,
}
2022-01-03 15:21:12 -05:00
#[derive(Deserialize, Debug)]
pub struct MobAttributes {
pub might: Option<i32>,
pub fitness: Option<i32>,
pub quickness: Option<i32>,
pub intelligence: Option<i32>,
}