Trait rpgstat::stats::AdvancedPremade[][src]

pub trait AdvancedPremade<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 37 methods fn stat(&self) -> Advanced<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 atk(&self) -> T { ... }
fn def(&self) -> T { ... }
fn m_atk(&self) -> T { ... }
fn m_def(&self) -> T { ... }
fn gp(&self) -> T { ... }
fn agi(&self) -> T { ... }
fn str(&self) -> T { ... }
fn dex(&self) -> T { ... }
fn con(&self) -> T { ... }
fn char(&self) -> T { ... }
fn wis(&self) -> T { ... }
fn age(&self) -> T { ... }
fn damage(&mut self, amount: T) { ... }
fn heal(&mut self, amount: T) { ... }
fn attack_stable(&self, other: Advanced<T>) -> T { ... }
fn attack(&self, other: Advanced<T>) -> T { ... }
}

Required methods

Functions you need to imlement

stat returns the Advanced<T> you created

Set the Advanced<T> Health Points

Set the Advanced<T> Mana Points

Set the Advanced<T> Experience Points

Set the Advanced<T> Max Health Points

Set the Advanced<T> Max Mana Points

Set the Advanced<T> Next Experience Points

Set the Advanced<T> Gold Points

Set the Advanced<T> Attack Points

Set the Advanced<T> Defense Points

Set the Advanced<T> Mana Attack Points

Set the Advanced<T> Mana Defense Points

Provided methods

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