Trait overworld_affinity::Affinity
source · pub trait Affinity {
// Required method
fn weak_against(&self, other: &Self) -> bool;
// Provided methods
fn strong_against(&self, other: &Self) -> bool { ... }
fn multiplier(&self, other: &Self) -> f32 { ... }
fn calculate(&self, amount: f64, other: &Self) -> f64 { ... }
}
Required Methods§
sourcefn weak_against(&self, other: &Self) -> bool
fn weak_against(&self, other: &Self) -> bool
Check if the affinity is weak to another
Provided Methods§
sourcefn strong_against(&self, other: &Self) -> bool
fn strong_against(&self, other: &Self) -> bool
Check if the affinity is strong to another
sourcefn multiplier(&self, other: &Self) -> f32
fn multiplier(&self, other: &Self) -> f32
Default implementation for a multiplier
Object Safety§
This trait is not object safe.