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

@@ -9,13 +9,8 @@ namespace PkmnLib.Static.Species;
/// A form is a variant of a specific species. A species always has at least one form, but can have
/// many more.
/// </summary>
public interface IForm
public interface IForm : INamedValue
{
/// <summary>
/// The name of the form.
/// </summary>
StringKey Name { get; }
/// <summary>
/// The height of the form in meters.
/// </summary>
@@ -27,32 +22,32 @@ public interface IForm
float Weight { get; }
/// <summary>
/// The base amount of experience that is gained when beating a Pokemon with this form.
/// The base amount of experience that is gained when beating a Pokémon with this form.
/// </summary>
uint BaseExperience { get; }
/// <summary>
/// The normal types a Pokemon with this form has.
/// The normal types a Pokémon with this form has.
/// </summary>
IReadOnlyList<TypeIdentifier> Types { get; }
/// <summary>
/// The inherent values of a form of species that are used for the stats of a Pokemon.
/// The inherent values of a form of species that are used for the stats of a Pokémon.
/// </summary>
StaticStatisticSet<ushort> BaseStats { get; }
ImmutableStatisticSet<ushort> BaseStats { get; }
/// <summary>
/// The possible abilities a Pokemon with this form can have.
/// The possible abilities a Pokémon with this form can have.
/// </summary>
IReadOnlyList<StringKey> Abilities { get; }
/// <summary>
/// The possible hidden abilities a Pokemon with this form can have.
/// The possible hidden abilities a Pokémon with this form can have.
/// </summary>
IReadOnlyList<StringKey> HiddenAbilities { get; }
/// <summary>
/// The moves a Pokemon with this form can learn.
/// The moves a Pokémon with this form can learn.
/// </summary>
ILearnableMoves Moves { get; }
@@ -102,7 +97,7 @@ public class FormImpl : IForm
{
/// <inheritdoc cref="FormImpl" />
public FormImpl(StringKey name, float height, float weight, uint baseExperience,
IEnumerable<TypeIdentifier> types, StaticStatisticSet<ushort> baseStats, IEnumerable<StringKey> abilities,
IEnumerable<TypeIdentifier> types, ImmutableStatisticSet<ushort> baseStats, IEnumerable<StringKey> abilities,
IEnumerable<StringKey> hiddenAbilities, ILearnableMoves moves, ImmutableHashSet<StringKey> flags)
{
Name = name;
@@ -140,7 +135,7 @@ public class FormImpl : IForm
public IReadOnlyList<TypeIdentifier> Types { get; }
/// <inheritdoc />
public StaticStatisticSet<ushort> BaseStats { get; }
public ImmutableStatisticSet<ushort> BaseStats { get; }
/// <inheritdoc />
public IReadOnlyList<StringKey> Abilities { get; }