Move all battle state from IPokemon to an ephemeral IBattlePokemon wrapper
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user