Adds a bunch more move scripts
This commit is contained in:
@@ -93,7 +93,14 @@ public interface IPokemon : IScriptSource
|
||||
float WeightInKg { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The height of the Pokemon in meters.
|
||||
/// Sets the weight of the Pokémon in kilograms. Returns whether the weight was changed.
|
||||
/// </summary>
|
||||
/// <param name="weightInKg">The new weight in kilograms</param>
|
||||
/// <returns></returns>
|
||||
public bool ChangeWeightInKgBy(float weightInKg);
|
||||
|
||||
/// <summary>
|
||||
/// The height of the Pokémon in meters.
|
||||
/// </summary>
|
||||
float HeightInMeters { get; set; }
|
||||
|
||||
@@ -543,6 +550,18 @@ public class PokemonImpl : ScriptSource, IPokemon
|
||||
/// <inheritdoc />
|
||||
public float WeightInKg { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool ChangeWeightInKgBy(float weightInKg)
|
||||
{
|
||||
if (WeightInKg <= 0.1f)
|
||||
return false;
|
||||
var newWeight = WeightInKg + weightInKg;
|
||||
if (newWeight <= 0.1f)
|
||||
newWeight = 0.1f;
|
||||
WeightInKg = newWeight;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public float HeightInMeters { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user