Implements AI Switching
All checks were successful
Build / Build (push) Successful in 58s

This commit is contained in:
2025-07-12 13:03:00 +02:00
parent 364d4b9080
commit bf83b25238
34 changed files with 903 additions and 226 deletions

View File

@@ -1,6 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using PkmnLib.Dynamic.Events;
using PkmnLib.Dynamic.Libraries;
using PkmnLib.Dynamic.Models.Choices;
using PkmnLib.Dynamic.Models.Serialized;
using PkmnLib.Dynamic.ScriptHandling;
using PkmnLib.Static;
@@ -489,6 +490,8 @@ public interface IPokemonBattleData : IDeepCloneable
/// </summary>
uint SwitchInTurn { get; internal set; }
uint TurnsOnField { get; }
/// <summary>
/// The side the Pokémon is on.
/// </summary>
@@ -503,6 +506,11 @@ public interface IPokemonBattleData : IDeepCloneable
/// The form of the Pokémon at the time it was sent out.
/// </summary>
IForm OriginalForm { get; }
/// <summary>
/// The last move choice executed by the Pokémon.
/// </summary>
IMoveChoice? LastMoveChoice { get; internal set; }
}
/// <inheritdoc cref="IPokemon"/>
@@ -1490,6 +1498,9 @@ public class PokemonBattleDataImpl : IPokemonBattleData
/// <inheritdoc />
public uint SwitchInTurn { get; set; }
/// <inheritdoc />
public uint TurnsOnField => Battle.CurrentTurnNumber - SwitchInTurn;
/// <inheritdoc />
public IBattleSide BattleSide => Battle.Sides[SideIndex];
@@ -1498,4 +1509,7 @@ public class PokemonBattleDataImpl : IPokemonBattleData
/// <inheritdoc />
public IForm OriginalForm { get; }
/// <inheritdoc />
public IMoveChoice? LastMoveChoice { get; set; }
}