Adds a lot more move effects
This commit is contained in:
@@ -313,6 +313,10 @@ public interface IPokemon : IScriptSource, IDeepCloneable
|
||||
/// </summary>
|
||||
void LearnMove(StringKey moveName, MoveLearnMethod method, byte index);
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether the Pokémon has a specific non-volatile status.
|
||||
/// </summary>
|
||||
bool HasStatus(StringKey status);
|
||||
/// <summary>
|
||||
/// Adds a non-volatile status to the Pokemon.
|
||||
/// </summary>
|
||||
@@ -347,6 +351,17 @@ public interface IPokemon : IScriptSource, IDeepCloneable
|
||||
/// Marks a Pokemon as seen in the battle.
|
||||
/// </summary>
|
||||
void MarkOpponentAsSeen(IPokemon pokemon);
|
||||
|
||||
/// <summary>
|
||||
/// Removes a type from the Pokémon. Returns whether the type was removed.
|
||||
/// </summary>
|
||||
bool RemoveType(TypeIdentifier type);
|
||||
|
||||
/// <summary>
|
||||
/// Adds a type to the Pokémon. Returns whether the type was added. It will not add the type if
|
||||
/// the Pokémon already has it.
|
||||
/// </summary>
|
||||
bool AddType(TypeIdentifier type);
|
||||
|
||||
/// <summary>
|
||||
/// Converts the data structure to a serializable format.
|
||||
@@ -639,8 +654,10 @@ public class PokemonImpl : ScriptSource, IPokemon
|
||||
/// <inheritdoc />
|
||||
public bool AllowedExperience { get; set; }
|
||||
|
||||
private List<TypeIdentifier> _types = new();
|
||||
|
||||
/// <inheritdoc />
|
||||
public IReadOnlyList<TypeIdentifier> Types { get; private set; }
|
||||
public IReadOnlyList<TypeIdentifier> Types { get => _types; private set => _types = value.ToList(); }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsEgg { get; private set; }
|
||||
@@ -940,6 +957,9 @@ public class PokemonImpl : ScriptSource, IPokemon
|
||||
_learnedMoves[index] = new LearnedMoveImpl(move, method);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool HasStatus(StringKey status) => StatusScript.Script?.Name == status;
|
||||
|
||||
/// <inheritdoc />
|
||||
public void SetStatus(StringKey status)
|
||||
{
|
||||
@@ -1000,6 +1020,18 @@ public class PokemonImpl : ScriptSource, IPokemon
|
||||
/// <inheritdoc />
|
||||
public void MarkOpponentAsSeen(IPokemon pokemon) => BattleData?.MarkOpponentAsSeen(pokemon);
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool RemoveType(TypeIdentifier type) => _types.Remove(type);
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool AddType(TypeIdentifier type)
|
||||
{
|
||||
if (_types.Contains(type))
|
||||
return false;
|
||||
_types.Add(type);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public SerializedPokemon Serialize() => new(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user