Trait rpgstat::stats::NormalPremade[][src]

pub trait NormalPremade<T: Copy + Default + AddAssign + Add<Output = T> + Div<Output = T> + DivAssign + Mul<Output = T> + MulAssign + Neg<Output = T> + Rem<Output = T> + RemAssign + Sub<Output = T> + SubAssign + PartialOrd + NumCast> {
Show 30 methods fn stat(&self) -> Normal<T>;
fn set_hp(&mut self, amount: T);
fn set_mp(&mut self, amount: T);
fn set_xp(&mut self, amount: T);
fn set_hp_max(&mut self, amount: T);
fn set_mp_max(&mut self, amount: T);
fn set_xp_next(&mut self, amount: T);
fn set_gp(&mut self, amount: T);
fn set_atk(&mut self, amount: T);
fn set_def(&mut self, amount: T);
fn set_m_atk(&mut self, amount: T);
fn set_m_def(&mut self, amount: T); fn id(&self) -> T { ... }
fn hp(&self) -> T { ... }
fn mp(&self) -> T { ... }
fn xp(&self) -> T { ... }
fn hp_max(&self) -> T { ... }
fn mp_max(&self) -> T { ... }
fn xp_next(&self) -> T { ... }
fn level(&self) -> T { ... }
fn speed(&self) -> T { ... }
fn gp(&self) -> T { ... }
fn atk(&self) -> T { ... }
fn def(&self) -> T { ... }
fn m_atk(&self) -> T { ... }
fn m_def(&self) -> T { ... }
fn damage(&mut self, amount: T) { ... }
fn heal(&mut self, amount: T) { ... }
fn attack_stable(&self, other: Normal<T>) -> T { ... }
fn attack(&self, other: Normal<T>) -> T { ... }
}

Required methods

Functions you need to imlement

stat returns the Normal<T> you created

Set the Normal<T> Health Points

Set the Normal<T> Mana Points

Set the Normal<T> Experience Points

Set the Normal<T> Max Health Points

Set the Normal<T> Max Mana Points

Set the Normal<T> Next Experience Points

Set the Normal<T> Gold Points

Set the Normal<T> Attack Points

Set the Normal<T> Defense Points

Set the Normal<T> Mana Attack Points

Set the Normal<T> Mana Defense Points

Provided methods

Predefined functions

Return the Normal<T> id number

Return the Normal<T> Health Points

Return the Normal<T> Mana Points

Return the Normal<T> Experience Points

Return the Normal<T> Max Health Points

Return the Normal<T> Max Mana Points

Return the Normal<T> Next Experience Points

Return the Normal<T> Level

Return the Normal<T> Speed

Return the Normal<T> Gold Points

Return the Normal<T> Attack Points

Return the Normal<T> Defense Points

Return the Normal<T> Mana Attack Points

Return the Normal<T> Mana Defense Points

Damage the character by an amount

Add health to character but not beyond their Max Healh Points

Stable attack forumla attack*(100/(100+defense))

Scalable attack forumla damage = att * att / (att + def)

Implementors