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

@@ -18,12 +18,12 @@ public class IceBallTests
/// Creates a fully mocked test setup for Ice Ball tests. The user gets a real <see cref="ScriptSet"/> as
/// its volatile set, so the effect applied by the move can be inspected.
/// </summary>
private static (IceBall script, IExecutingMove move, IPokemon user, IPokemon target, ScriptSet userVolatile)
CreateTestSetup()
private static (IceBall script, IExecutingMove move, IBattlePokemon user, IBattlePokemon target, ScriptSet
userVolatile) CreateTestSetup()
{
var script = new IceBall();
var move = Substitute.For<IExecutingMove>();
var user = Substitute.For<IPokemon>();
var user = Substitute.For<IBattlePokemon>();
user.GetScripts().Returns(_ => new ScriptIterator(new List<IEnumerable<ScriptContainer>>()));
var userVolatile = new ScriptSet(user);
user.Volatile.Returns(userVolatile);
@@ -31,7 +31,7 @@ public class IceBallTests
var moveData = Substitute.For<PkmnLib.Static.Moves.IMoveData>();
moveData.Name.Returns(new StringKey("ice_ball"));
move.UseMove.Returns(moveData);
var target = Substitute.For<IPokemon>();
var target = Substitute.For<IBattlePokemon>();
return (script, move, user, target, userVolatile);
}