This commit is contained in:
@@ -188,12 +188,12 @@ impl MoveData for MoveDataImpl {
|
||||
&self.secondary_effect
|
||||
}
|
||||
|
||||
/// Arbitrary flags that can be applied to the move.
|
||||
/// Checks if the move has a specific flag.
|
||||
fn has_flag(&self, key: &StringKey) -> bool {
|
||||
self.flags.contains::<StringKey>(key)
|
||||
}
|
||||
|
||||
/// Arbitrary flags that can be applied to the move.
|
||||
/// Checks if the move has a specific flag.
|
||||
fn has_flag_by_hash(&self, key_hash: u32) -> bool {
|
||||
self.flags.contains::<u32>(&key_hash)
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ pub struct NatureImpl {
|
||||
}
|
||||
|
||||
impl NatureImpl {
|
||||
/// Instantiates a new statistic.
|
||||
/// Instantiates a new nature.
|
||||
pub fn new(
|
||||
increase_stat: Statistic,
|
||||
decrease_stat: Statistic,
|
||||
|
||||
@@ -26,7 +26,7 @@ pub struct LearnableMovesImpl {
|
||||
}
|
||||
|
||||
impl LearnableMovesImpl {
|
||||
/// Instantiates a new Learnable Moves.
|
||||
/// Instantiates a new object to store the moves a Pokemon can learn.
|
||||
pub fn new(max_level: LevelInt) -> Self {
|
||||
Self {
|
||||
learned_by_level: RwLock::new(vec![Vec::new(); (max_level + 1) as usize]),
|
||||
|
||||
@@ -152,7 +152,7 @@ impl Species for SpeciesImpl {
|
||||
.clone())
|
||||
}
|
||||
|
||||
/// Gets a random gender.
|
||||
/// Gets a random gender, returning a value based on the species gender ratio.
|
||||
fn get_random_gender(&self, rand: &mut Random) -> Gender {
|
||||
if self.gender_rate < 0.0 {
|
||||
Gender::Genderless
|
||||
|
||||
@@ -128,13 +128,12 @@ where
|
||||
}
|
||||
|
||||
/// A collection of statistics that can not be modified after creation.
|
||||
///
|
||||
/// As no modifications happen, this struct does not use atomics.
|
||||
#[derive(Default, Eq, PartialEq, Clone, Debug)]
|
||||
pub struct StaticStatisticSet<T>
|
||||
where
|
||||
T: PrimInt,
|
||||
{
|
||||
// As no modifications happen, this struct does not use atomics.
|
||||
/// The health point stat value.
|
||||
hp: T,
|
||||
/// The physical attack stat value.
|
||||
|
||||
Reference in New Issue
Block a user