pub enum FEGame {
Show 16 variants
FE1,
FE2,
FE3,
FE4,
FE5,
FE6,
FE7,
FE8,
FE9,
FE10,
FE11,
FE12,
FE13,
FE14,
FE15,
SoV,
}Variants§
Implementations§
Source§impl FEGame
impl FEGame
Sourcepub fn true_hit(&self, listed_hit: u32) -> f64
pub fn true_hit(&self, listed_hit: u32) -> f64
Converts listed hit, what the game tells you the hit rate is, to true
hit, the actual hit probability. Most of the games lie to you about
this: the full details are in the rng module.
Sourcepub fn crit_damage(&self, atk: u32, def: u32) -> u32
pub fn crit_damage(&self, atk: u32, def: u32) -> u32
Computes critical damage: this is done by doubling Atk in FE4 and FE5, but done by tripling damage (Atk - Def) in the other games.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FEGame
impl<'de> Deserialize<'de> for FEGame
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
Source§impl IntoEnumIterator for FEGame
impl IntoEnumIterator for FEGame
type Iterator = FEGameIter
fn iter() -> FEGameIter ⓘ
impl Copy for FEGame
impl Eq for FEGame
impl StructuralPartialEq for FEGame
Auto Trait Implementations§
impl Freeze for FEGame
impl RefUnwindSafe for FEGame
impl Send for FEGame
impl Sync for FEGame
impl Unpin for FEGame
impl UnwindSafe for FEGame
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