Support for eggmoves
This commit is contained in:
@@ -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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user