ravenous-tools/weaponry/src/weaponry_structs.rs

73 lines
2.0 KiB
Rust

// Workspace: weaponry
// File: weaponry/src/weaponry_structs.rs
//! All weaponry intermod structures
#![allow(dead_code)]
/// The inner statistics of the equipement, used across all parts and final weapon
#[derive(Default)]
pub struct InnerStats {}
/// The final equipement, obtained by combining all parts
pub struct Equipement {
/// The inner stats used by the equipement
stats: InnerStats,
}
/// Shape of the equipement, first mandatory part of an equipement
pub struct EqShape {
/// The inner stats of the part
stats: InnerStats,
}
/// Material used for the equipement, all equipements are crafted with 1-2 materials
pub struct EqMaterial {
/// The inner stats of the part
stats: InnerStats,
}
/// Nature of the equipement, some natures are reserved and some can be chained
///
/// Deciding on the combinaison can be tricky an will need an extra field
pub struct EqNature {
/// The inner stats of the part
stats: InnerStats,
/// Which kind of target this nature applies to
target: NatureTarget,
}
/// Finishing touches, since all of them have a cost, they are treated in a special fashion
pub struct EqFinishing {
/// The inner stats of the part
stats: InnerStats,
}
/// The kind of target this nature can apply to
pub enum NatureTarget {
/// Can apply to a weapon and is unique
WeaponUnique,
/// Can apply to a weapon and must be combined with another
WeaponCombined,
/// Can apply to an armor (all armor nature are unique)
Armor,
}
/// Weapon damage types
#[allow(clippy::missing_docs_in_private_items)]
pub enum SingleDamageType {
Blunt,
Slash,
Pierce,
}
/// Weapon damage, signifying wether the damage is pure or [secondary] or [[tertiary]]
#[allow(clippy::missing_docs_in_private_items)]
pub enum DamageMod {
Primary(SingleDamageType),
Secondary(SingleDamageType),
Tertiary(SingleDamageType),
}
/// Damage values, meant to be serialised to tex and deserialized directly from the table
pub struct DamageType(Vec<DamageMod>);