Fixes for comments
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-07-15 14:22:48 +02:00
parent f6df95a824
commit f23fc43405
9 changed files with 31 additions and 23 deletions

View File

@@ -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)
}

View File

@@ -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,

View File

@@ -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]),

View File

@@ -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

View File

@@ -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.