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