mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-26 02:02:20 +02:00
Fix failedToTerrain being undefined
This commit is contained in:
parent
6ac2594694
commit
df7e6fdce3
@ -329,10 +329,11 @@ export class MovePhase extends BattlePhase {
|
|||||||
* Move conditions assume the move has a single target
|
* Move conditions assume the move has a single target
|
||||||
* TODO: is this sustainable?
|
* TODO: is this sustainable?
|
||||||
*/
|
*/
|
||||||
|
let failedDueToTerrain: boolean = false;
|
||||||
if (success) {
|
if (success) {
|
||||||
const passesConditions = move.applyConditions(this.pokemon, targets[0], move);
|
const passesConditions = move.applyConditions(this.pokemon, targets[0], move);
|
||||||
const failedDueToWeather: boolean = globalScene.arena.isMoveWeatherCancelled(this.pokemon, move);
|
const failedDueToWeather: boolean = globalScene.arena.isMoveWeatherCancelled(this.pokemon, move);
|
||||||
const failedDueToTerrain: boolean = globalScene.arena.isMoveTerrainCancelled(this.pokemon, this.targets, move);
|
failedDueToTerrain = globalScene.arena.isMoveTerrainCancelled(this.pokemon, this.targets, move);
|
||||||
success = passesConditions && !failedDueToWeather && !failedDueToTerrain;
|
success = passesConditions && !failedDueToWeather && !failedDueToTerrain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user