pub struct Difficulty {
pub edition: Edition,
pub xp: u32,
pub multiplier: f32,
pub thresholds: Vec<(&'static str, u32)>,
pub rating: Option<&'static str>,
}Expand description
How hard an encounter is for a party, under one edition’s rules.
Fields§
§edition: Edition§xp: u32The monsters’ XP as compared with the thresholds: multiplied for their number under the 2014 rules, as is under 2024’s.
multiplier: f32For 2014, the multiplier used; 1 under 2024.
thresholds: Vec<(&'static str, u32)>The party’s thresholds, lowest first, with their names.
rating: Option<&'static str>The highest threshold reached, if any.
Trait Implementations§
Source§impl Clone for Difficulty
impl Clone for Difficulty
Source§fn clone(&self) -> Difficulty
fn clone(&self) -> Difficulty
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Difficulty
impl Debug for Difficulty
Source§impl PartialEq for Difficulty
impl PartialEq for Difficulty
Source§fn eq(&self, other: &Difficulty) -> bool
fn eq(&self, other: &Difficulty) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Difficulty
Auto Trait Implementations§
impl Freeze for Difficulty
impl RefUnwindSafe for Difficulty
impl Send for Difficulty
impl Sync for Difficulty
impl Unpin for Difficulty
impl UnsafeUnpin for Difficulty
impl UnwindSafe for Difficulty
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