pub struct Character {
Show 13 fields pub name: String, pub size: SizeCategory, pub abilities: AbilityList, pub ac: i32, pub ab: i32, pub base_apr: i32, pub extra_apr: i32, pub concealment: i32, pub defensive_essence: i32, pub physical_immunity: i32, pub physical_dmg_reduction: i32, pub weapon: Weapon, pub feats: Vec<Feat>,
}

Fields§

§name: String§size: SizeCategory§abilities: AbilityList§ac: i32§ab: i32§base_apr: i32§extra_apr: i32§concealment: i32§defensive_essence: i32§physical_immunity: i32§physical_dmg_reduction: i32§weapon: Weapon§feats: Vec<Feat>

Implementations§

source§

impl Character

source

pub fn builder() -> CharacterBuilder

source

pub fn total_apr(&self) -> i32

source

pub fn has_feat(&self, feat: Feat) -> bool

source

pub fn has_blind_fight(&self) -> bool

source

pub fn has_epic_dodge(&self) -> bool

source

pub fn has_bane_of_enemies(&self) -> bool

source

pub fn has_overwhelming_critical(&self) -> bool

source

pub fn has_weapon_spec(&self) -> bool

source

pub fn has_epic_weapon_spec(&self) -> bool

source

pub fn is_dual_wielding(&self) -> bool

source

pub fn is_crit_immune(&self) -> bool

source

pub fn atk_ab(&self, atk_no: i32) -> Option<AttackInfo>

source

pub fn weapon_crit_multiplier(&self) -> i32

source

pub fn weapon_threat_range(&self) -> i32

source

pub fn is_weapon_twohanded(&self) -> bool

source

pub fn damage_immunity(&self, dmg_type: DamageType) -> i32

source

pub fn damage_reduction(&self, dmg_type: DamageType) -> i32

source

pub fn damage_resistance(&self, dmg_type: DamageType) -> i32

source

pub fn weapon_string(&self) -> String

Trait Implementations§

source§

impl Default for Character

source§

fn default() -> Character

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Character

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<Character> for CharacterBuilder

source§

fn from(value: Character) -> Self

Converts to this type from the input type.
source§

impl Serialize for Character

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,