Support for eggmoves

This commit is contained in:
2024-09-30 14:54:43 +02:00
parent c088386ba3
commit 38e6630c67
3 changed files with 36 additions and 0 deletions

View File

@@ -154,6 +154,11 @@ public interface IPokemon : IScriptSource
/// are null.
/// </summary>
IReadOnlyList<ILearnedMove?> Moves { get; }
/// <summary>
/// Checks whether the Pokemon has a specific move in its current moveset.
/// </summary>
public bool HasMove(StringKey moveName);
/// <summary>
/// Whether or not the Pokemon is allowed to gain experience.
@@ -528,6 +533,9 @@ public class PokemonImpl : ScriptSource, IPokemon
/// <inheritdoc />
public IReadOnlyList<ILearnedMove?> Moves => _learnedMoves;
/// <inheritdoc />
public bool HasMove(StringKey moveName) => Moves.Any(move => move?.MoveData.Name == moveName);
/// <inheritdoc />
public bool AllowedExperience { get; set; }