From 67762af0e78e5a9735749e0e0d888014b3e5ea7f Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Fri, 12 Nov 2021 13:03:18 +0100 Subject: [PATCH] Assist: Fail move if no moves have been found --- Moves.json | 6 +++++- Scripts/Interfaces/MoveTurnChoice.astypedef | 2 ++ Scripts/Moves/Assist.as | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Moves.json b/Moves.json index 1060502..7c24165 100644 --- a/Moves.json +++ b/Moves.json @@ -655,7 +655,11 @@ "protect", "reflectable", "mirror" - ] + ], + "effect": { + "name": "ChangeTargetAtt", + "parameters": [-1] + } }, { "name": "baneful_bunker", diff --git a/Scripts/Interfaces/MoveTurnChoice.astypedef b/Scripts/Interfaces/MoveTurnChoice.astypedef index 0b0f0f7..31183d7 100644 --- a/Scripts/Interfaces/MoveTurnChoice.astypedef +++ b/Scripts/Interfaces/MoveTurnChoice.astypedef @@ -3,5 +3,7 @@ type MoveTurnChoice { Pokemon@ User { get const; }; LearnedMove@ Move { get const; }; int8 Priority { get const; }; + bool HasFailed { get const; }; + void Fail(); BaseTurnChoice@ opImplCast(); } diff --git a/Scripts/Moves/Assist.as b/Scripts/Moves/Assist.as index b0349a8..fff5f6c 100644 --- a/Scripts/Moves/Assist.as +++ b/Scripts/Moves/Assist.as @@ -20,7 +20,7 @@ namespace Gen7 { } } if (possibleMoves.length == 0){ - // TODO: Log failure. + move.Fail(); return; } auto i = battle.Random.Get(possibleMoves.length);