Assist: Fail move if no moves have been found
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Gen7 {
|
||||
}
|
||||
}
|
||||
if (possibleMoves.length == 0){
|
||||
// TODO: Log failure.
|
||||
move.Fail();
|
||||
return;
|
||||
}
|
||||
auto i = battle.Random.Get(possibleMoves.length);
|
||||
|
||||
Reference in New Issue
Block a user