Further work on static side

This commit is contained in:
2024-07-20 16:12:39 +02:00
parent 3845f91601
commit 1b501dee7e
29 changed files with 670 additions and 155 deletions

View File

@@ -5,23 +5,18 @@ using PkmnLib.Static.Utils;
namespace PkmnLib.Static.Species;
/// <summary>
/// The data belonging to a Pokemon with certain characteristics.
/// The data belonging to a Pokémon with certain characteristics.
/// </summary>
public interface ISpecies
public interface ISpecies : INamedValue
{
/// <summary>
/// The national dex identifier of the Pokemon.
/// The national dex identifier of the Pokémon.
/// </summary>
ushort Id { get; }
/// <summary>
/// The name of the Pokemon.
/// </summary>
StringKey Name { get; }
/// <summary>
/// The chance between 0.0 and 1.0 that a Pokemon is female. 0.0 means always male, 1.0 means always female.
/// If less than 0, the Pokemon is genderless.
/// The chance between 0.0 and 1.0 that a Pokémon is female. 0.0 means always male, 1.0 means always female.
/// If less than 0, the Pokémon is genderless.
/// </summary>
float GenderRate { get; }
@@ -31,23 +26,23 @@ public interface ISpecies
StringKey GrowthRate { get; }
/// <summary>
/// How hard it is to capture a Pokemon. 255 means this will be always caught, 0 means this is
/// How hard it is to capture a Pokémon. 255 means this will be always caught, 0 means this is
/// uncatchable.
/// </summary>
byte CaptureRate { get; }
/// <summary>
/// The base happiness of the Pokemon.
/// The base happiness of the Pokémon.
/// </summary>
byte BaseHappiness { get; }
/// <summary>
/// The forms that belong to this Pokemon.
/// The forms that belong to this Pokémon.
/// </summary>
IReadOnlyDictionary<StringKey, IForm> Forms { get; }
/// <summary>
/// The arbitrary flags that can be set on a Pokemon for script use.
/// The arbitrary flags that can be set on a Pokémon for script use.
/// </summary>
ImmutableHashSet<StringKey> Flags { get; }
@@ -57,7 +52,7 @@ public interface ISpecies
bool TryGetForm(StringKey id, [MaybeNullWhen(false)] out IForm form);
/// <summary>
/// Gets the form the Pokemon will have by default, if no other form is specified.
/// Gets the form the Pokémon will have by default, if no other form is specified.
/// </summary>
IForm GetDefaultForm();
@@ -67,12 +62,12 @@ public interface ISpecies
Gender GetRandomGender(IRandom rand);
/// <summary>
/// Check whether the Pokemon has a specific flag set.
/// Check whether the Pokémon has a specific flag set.
/// </summary>
bool HasFlag(string key);
/// <summary>
/// The data regarding into which Pokemon this species can evolve, and how.
/// The data regarding into which Pokémon this species can evolve, and how.
/// </summary>
IReadOnlyList<IEvolution> EvolutionData { get; }
}