Assist: Fail move if no moves have been found
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2021-11-12 13:03:18 +01:00
parent afe091eefa
commit 67762af0e7
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
3 changed files with 8 additions and 2 deletions

View File

@ -655,7 +655,11 @@
"protect", "protect",
"reflectable", "reflectable",
"mirror" "mirror"
] ],
"effect": {
"name": "ChangeTargetAtt",
"parameters": [-1]
}
}, },
{ {
"name": "baneful_bunker", "name": "baneful_bunker",

View File

@ -3,5 +3,7 @@ type MoveTurnChoice {
Pokemon@ User { get const; }; Pokemon@ User { get const; };
LearnedMove@ Move { get const; }; LearnedMove@ Move { get const; };
int8 Priority { get const; }; int8 Priority { get const; };
bool HasFailed { get const; };
void Fail();
BaseTurnChoice@ opImplCast(); BaseTurnChoice@ opImplCast();
} }

View File

@ -20,7 +20,7 @@ namespace Gen7 {
} }
} }
if (possibleMoves.length == 0){ if (possibleMoves.length == 0){
// TODO: Log failure. move.Fail();
return; return;
} }
auto i = battle.Random.Get(possibleMoves.length); auto i = battle.Random.Get(possibleMoves.length);