Move all battle state from IPokemon to an ephemeral IBattlePokemon wrapper
This commit is contained in:
@@ -28,11 +28,9 @@ public class LuckyChantTests
|
||||
var sideScripts = Substitute.For<IScriptSet>();
|
||||
var side = Substitute.For<IBattleSide>();
|
||||
side.VolatileScripts.Returns(sideScripts);
|
||||
var battleData = Substitute.For<IPokemonBattleData>();
|
||||
battleData.BattleSide.Returns(side);
|
||||
var user = Substitute.For<IPokemon>();
|
||||
user.BattleData.Returns(battleData);
|
||||
var user = Substitute.For<IBattlePokemon>();
|
||||
user.Volatile.Returns(Substitute.For<IScriptSet>());
|
||||
user.BattleSide.Returns(side);
|
||||
move.User.Returns(user);
|
||||
|
||||
// Act - Lucky Chant targets the user's side; the user itself is one of the targets
|
||||
@@ -55,7 +53,7 @@ public class LuckyChantTests
|
||||
// Arrange
|
||||
var effect = new LuckyChantEffect();
|
||||
var attack = Substitute.For<IExecutingMove>();
|
||||
var target = Substitute.For<IPokemon>();
|
||||
var target = Substitute.For<IBattlePokemon>();
|
||||
var block = false;
|
||||
|
||||
// Act
|
||||
@@ -75,7 +73,7 @@ public class LuckyChantTests
|
||||
{
|
||||
// Arrange
|
||||
var effect = new LuckyChantEffect();
|
||||
var owner = Substitute.For<IPokemon>();
|
||||
var owner = Substitute.For<IBattlePokemon>();
|
||||
owner.GetScripts().Returns(_ => new ScriptIterator(Array.Empty<IEnumerable<ScriptContainer>>()));
|
||||
IScriptSet set = new ScriptSet(owner);
|
||||
set.Add(effect);
|
||||
@@ -96,7 +94,7 @@ public class LuckyChantTests
|
||||
{
|
||||
// Arrange
|
||||
var effect = new LuckyChantEffect();
|
||||
var owner = Substitute.For<IPokemon>();
|
||||
var owner = Substitute.For<IBattlePokemon>();
|
||||
owner.GetScripts().Returns(_ => new ScriptIterator(Array.Empty<IEnumerable<ScriptContainer>>()));
|
||||
IScriptSet set = new ScriptSet(owner);
|
||||
set.Add(effect);
|
||||
|
||||
Reference in New Issue
Block a user