Move all battle state from IPokemon to an ephemeral IBattlePokemon wrapper

This commit is contained in:
2026-08-28 15:20:26 +02:00
parent 942be8eaeb
commit 8a2733a0a9
859 changed files with 4408 additions and 5331 deletions

View File

@@ -4,13 +4,13 @@ namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
public abstract class OutrageLikeEffect : Script, IScriptForceTurnSelection, IScriptOnAfterHits
{
private readonly IPokemon _owner;
private readonly IBattlePokemon _owner;
private int _turns;
private readonly byte _targetSide;
private readonly byte _targetPosition;
private readonly StringKey _move;
public OutrageLikeEffect(IPokemon owner, int turns, byte targetSide, byte targetPosition, StringKey move)
public OutrageLikeEffect(IBattlePokemon owner, int turns, byte targetSide, byte targetPosition, StringKey move)
{
_owner = owner;
_turns = turns;
@@ -26,7 +26,7 @@ public abstract class OutrageLikeEffect : Script, IScriptForceTurnSelection, ISc
}
/// <inheritdoc />
public void OnAfterHits(IExecutingMove move, IPokemon target)
public void OnAfterHits(IExecutingMove move, IBattlePokemon target)
{
_turns--;
if (_turns <= 0)