pub struct Fighter {
pub typ: FighterTyp,
pub id: i64,
pub name: Option<String>,
pub level: u32,
pub life: u32,
pub attributes: EnumMap<AttributeType, u32>,
pub class: Class,
}Expand description
A participant in a fight. Can be anything, that shows up in the battle screen from the player to a fortress Wall
Fields§
§typ: FighterTypThe type of the fighter
id: i64The raw id of the fighter. This is <= 0 for monsters & companions and equivalent to the player id for players (>0)
name: Option<String>The name of the fighter, if it is a player
level: u32The level of the fighter
life: u32The amount of hp this fighter has at the start of a battle
attributes: EnumMap<AttributeType, u32>The total attributes this fighter has
class: ClassThe class of the fighter
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Fighter
impl<'de> Deserialize<'de> for Fighter
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Fighter
impl RefUnwindSafe for Fighter
impl Send for Fighter
impl Sync for Fighter
impl Unpin for Fighter
impl UnwindSafe for Fighter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more