mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-25 01:32:21 +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
|
||||
* TODO: is this sustainable?
|
||||
*/
|
||||
let failedDueToTerrain: boolean = false;
|
||||
if (success) {
|
||||
const passesConditions = move.applyConditions(this.pokemon, targets[0], 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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user