pub struct Fighter {Show 15 fields
pub ident: FighterIdent,
pub name: Arc<str>,
pub class: Class,
pub level: u16,
pub attributes: EnumMap<AttributeType, u32>,
pub max_health: f64,
pub armor: u32,
pub first_weapon: Option<Weapon>,
pub second_weapon: Option<Weapon>,
pub has_reaction_enchant: bool,
pub crit_dmg_multi: f64,
pub resistances: EnumMap<Element, i32>,
pub portal_dmg_bonus: f64,
pub is_companion: bool,
pub gladiator_lvl: u32,
}Expand description
Contains all information, that is necessary for battles to be simulated.
It is derived by converting any of the things that can fight (player,
companion, etc.) to a fighter through the Fromsimulate_battle function.
Fields§
§ident: FighterIdent§name: Arc<str>The name, or alternative identification of this fighter. Only used for display purposes, does not affect combat.
class: ClassThe class of the fighter (e.g., Warrior, Mage).
level: u16The level of the fighter.
attributes: EnumMap<AttributeType, u32>The attributes of the fighter
max_health: f64The health the fighter has before going into battle.
armor: u32The armor value that reduces incoming damage. Sum of all equipment.
first_weapon: Option<Weapon>The fighter’s first weapon, if equipped.
second_weapon: Option<Weapon>The fighter’s second weapon, if the fighter is an assassin. Shields are not tracked
has_reaction_enchant: boolCheck if this fighter has the enchantment to take the first action
crit_dmg_multi: f64The critical hit multiplier for the fighter.
resistances: EnumMap<Element, i32>The resistances of the fighter to various elements from runes.
portal_dmg_bonus: f64The damage bonus the fighter receives from guild portal.
is_companion: boolIndicates whether the fighter is a companion.
gladiator_lvl: u32The level of the gladiator building in the underworld.