overhaul: data-driven architecture
This commit is contained in:
parent
062d36f640
commit
f53b767376
19 changed files with 680 additions and 727 deletions
20
src/raws/mob_structs.rs
Normal file
20
src/raws/mob_structs.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
use super::Renderable;
|
||||
use serde::Deserialize;
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
pub struct Mob {
|
||||
pub id: String,
|
||||
pub name: String,
|
||||
pub renderable: Option<Renderable>,
|
||||
pub flags: Option<Vec<String>>,
|
||||
pub stats: MobStats,
|
||||
pub vision_range: i32,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
pub struct MobStats {
|
||||
pub max_hp: i32,
|
||||
pub hp: i32,
|
||||
pub power: i32,
|
||||
pub defence: i32,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue