combat system overhaul - d20/hack-like

This commit is contained in:
Llywelwyn 2023-07-28 06:29:59 +01:00
parent 32044dbb6a
commit c169a1eae6
20 changed files with 762 additions and 292 deletions

View file

@ -1,5 +1,6 @@
use super::Renderable;
use serde::Deserialize;
use std::collections::HashMap;
#[derive(Deserialize, Debug)]
pub struct Mob {
@ -7,16 +8,28 @@ pub struct Mob {
pub name: String,
pub renderable: Option<Renderable>,
pub flags: Option<Vec<String>>,
pub stats: MobStats,
pub level: Option<i32>,
pub bac: Option<i32>,
pub attacks: Option<Vec<NaturalAttack>>,
pub attributes: Option<MobAttributes>,
pub skills: Option<HashMap<String, i32>>,
pub vision_range: i32,
pub ai: String,
pub quips: Option<Vec<String>>,
}
#[derive(Deserialize, Debug)]
pub struct MobStats {
pub max_hp: i32,
pub hp: i32,
pub power: i32,
pub defence: i32,
pub struct MobAttributes {
pub str: Option<i32>,
pub dex: Option<i32>,
pub con: Option<i32>,
pub int: Option<i32>,
pub wis: Option<i32>,
pub cha: Option<i32>,
}
#[derive(Deserialize, Debug)]
pub struct NaturalAttack {
pub name: String,
pub hit_bonus: i32,
pub damage: String,
}