[−][src]Struct sulis_state::PStats
Persistent Stats, that are not computed from the base StatList, are saved, and may persist between actions
Implementations
impl PStats
[src]
pub fn new(actor: &Actor) -> PStats
[src]
pub fn load(&mut self, base_class: Rc<Class>)
[src]
pub fn remove_class_stats(&mut self, ability: &Ability)
[src]
pub fn has_required_class_stats(&self, ability: &Ability) -> bool
[src]
pub fn set_disabled(&mut self, disabled: bool)
[src]
pub fn is_disabled(&self) -> bool
[src]
pub fn is_threatened_by(&self, index: usize) -> bool
[src]
Returns true if the parent entity is threatened by the entity with the specified index, false otherwise
pub fn is_threatened(&self) -> bool
[src]
pub fn add_threatening(&mut self, index: usize)
[src]
pub fn remove_threatening(&mut self, index: usize)
[src]
pub fn add_threatener(&mut self, index: usize)
[src]
pub fn remove_threatener(&mut self, index: usize)
[src]
pub fn is_inventory_locked(&self) -> bool
[src]
pub fn set_inventory_locked(&mut self, locked: bool)
[src]
pub fn hp(&self) -> i32
[src]
pub fn ap(&self) -> u32
[src]
pub fn overflow_ap(&self) -> i32
[src]
pub fn has_level_up(&self) -> bool
[src]
pub fn xp(&self) -> u32
[src]
pub fn set_overflow_ap(&mut self, ap: i32)
[src]
pub fn add_ap(&mut self, ap: u32)
[src]
pub fn remove_ap(&mut self, ap: u32)
[src]
pub fn remove_hp(&mut self, hp: u32)
[src]
pub fn add_class_stat(&mut self, stat: &str, amount: u32, max: ExtInt)
[src]
pub fn remove_class_stat(&mut self, stat: &str, amount: u32)
[src]
pub fn add_hp(&mut self, hp: u32, max: i32)
[src]
pub fn add_xp(&mut self, xp: u32, actor: &Rc<Actor>)
[src]
pub fn recompute_level_up(&mut self, actor: &Rc<Actor>)
[src]
pub fn init_day(&mut self, stats: &StatList)
[src]
Called on initialization and at the start of a new in game day - resets hp
as well as end_encounter
, which in turn calls init_turn
pub fn end_encounter(&mut self, stats: &StatList)
[src]
Called once at the end of each combat encounter - does per encounter
actions as well as init_turn
pub fn init_turn(&mut self, stats: &StatList)
[src]
Called each time the entity begins a new turn
pub fn end_turn(&mut self)
[src]
Trait Implementations
impl Clone for PStats
[src]
impl Debug for PStats
[src]
impl<'de> Deserialize<'de> for PStats
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for PStats
[src]
Auto Trait Implementations
impl !RefUnwindSafe for PStats
impl !Send for PStats
impl !Sync for PStats
impl Unpin for PStats
impl !UnwindSafe for PStats
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,