Struct parthia_lib::simple_calc::Outcome [−][src]
The outcome of combat, with associated probability.
Fields
prob: f64
atk_hp: u32
def_hp: u32
Implementations
impl Outcome
[src]
pub fn collect(outcomes: Vec<Outcome>) -> Vec<Outcome>
[src]
Combines the probabilities of identical outcomes in the list of outcomes and removes impossible outcomes, returning a new list with the same total probabilities.
pub fn add_into(&self, outcomes: Vec<Outcome>) -> Vec<Outcome>
[src]
Adds the outcome to the list of outcomes, adding it to the probabliity of an existing outcome if it's identical.
pub fn switch(&self) -> Outcome
[src]
Switches attacker and defender.
Trait Implementations
impl Clone for Outcome
[src]
impl Copy for Outcome
[src]
impl Debug for Outcome
[src]
impl<'de> Deserialize<'de> for Outcome
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl PartialEq<Outcome> for Outcome
[src]
impl Serialize for Outcome
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Outcome
[src]
Auto Trait Implementations
impl RefUnwindSafe for Outcome
[src]
impl Send for Outcome
[src]
impl Sync for Outcome
[src]
impl Unpin for Outcome
[src]
impl UnwindSafe for Outcome
[src]
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>,