Assist: Fail move if no moves have been found
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
afe091eefa
commit
67762af0e7
|
@ -655,7 +655,11 @@
|
||||||
"protect",
|
"protect",
|
||||||
"reflectable",
|
"reflectable",
|
||||||
"mirror"
|
"mirror"
|
||||||
]
|
],
|
||||||
|
"effect": {
|
||||||
|
"name": "ChangeTargetAtt",
|
||||||
|
"parameters": [-1]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "baneful_bunker",
|
"name": "baneful_bunker",
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue