Move all battle state from IPokemon to an ephemeral IBattlePokemon wrapper
This commit is contained in:
@@ -15,7 +15,7 @@ public static class MoveTurnExecutor
|
||||
{
|
||||
internal static void ExecuteMoveChoice(IBattle battle, IMoveChoice moveChoice)
|
||||
{
|
||||
moveChoice.User.BattleData!.LastMoveChoice = moveChoice;
|
||||
moveChoice.User.LastMoveChoice = moveChoice;
|
||||
var chosenMove = moveChoice.ChosenMove;
|
||||
var useMove = chosenMove.MoveData;
|
||||
|
||||
@@ -126,7 +126,7 @@ public static class MoveTurnExecutor
|
||||
|
||||
private static readonly ThreadLocal<List<TypeIdentifier>> TypeListCache = new(() => []);
|
||||
|
||||
private static void ExecuteMoveChoiceForTarget(IBattle battle, IExecutingMove executingMove, IPokemon target)
|
||||
private static void ExecuteMoveChoiceForTarget(IBattle battle, IExecutingMove executingMove, IBattlePokemon target)
|
||||
{
|
||||
var failed = false;
|
||||
target.RunScriptHook<IScriptFailIncomingMove>(x => x.FailIncomingMove(executingMove, target, ref failed));
|
||||
|
||||
Reference in New Issue
Block a user