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,15 +18,15 @@ public class HexTests
{
/// <summary>
/// Creates a fully mocked test setup where the target has the given (or no) non-volatile status in its
/// <see cref="IPokemon.StatusScript"/>.
/// <see cref="IBattlePokemon.StatusScript"/>.
/// </summary>
private static (Hex hex, IExecutingMove move, IPokemon target) CreateTestSetup(Script? status)
private static (Hex hex, IExecutingMove move, IBattlePokemon target) CreateTestSetup(Script? status)
{
var hex = new Hex();
var move = Substitute.For<IExecutingMove>();
var target = Substitute.For<IPokemon>();
var target = Substitute.For<IBattlePokemon>();
target.StatusScript.Returns(status == null ? new ScriptContainer() : new ScriptContainer(status));
move.User.Returns(Substitute.For<IPokemon>());
move.User.Returns(Substitute.For<IBattlePokemon>());
return (hex, move, target);
}
@@ -81,7 +81,7 @@ public class HexTests
/// <summary>
/// Bulbapedia (Comatose ability page, Gen VII): "The Pokémon with this Ability takes double damage from Hex" —
/// a target with <see cref="IPokemon.ActiveAbility"/> Comatose gets the doubled base power even without a
/// a target with <see cref="IBattlePokemon.ActiveAbility"/> Comatose gets the doubled base power even without a
/// status condition.
/// </summary>
[Test]