[Bug] Fix Clear terrains upon Trainer Battle (#2027)

* Clear terrains upon Trainer Battle

* Adjusted comment
This commit is contained in:
Arxalc 2024-07-13 14:09:33 -04:00 committed by GitHub
parent 0c0de4103b
commit 4a399465d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -1127,7 +1127,7 @@ export default class BattleScene extends SceneBase {
this.arena.updatePoolsForTimeOfDay();
}
if (resetArenaState) {
this.arena.removeAllTags();
this.arena.resetArenaEffects();
playerField.forEach((_, p) => this.unshiftPhase(new ReturnPhase(this, p)));
for (const pokemon of this.getParty()) {

View File

@ -638,6 +638,12 @@ export class Arena {
}
}
/** Clears terrain and arena tags when entering new biome or trainer battle. */
resetArenaEffects(): void {
this.trySetTerrain(TerrainType.NONE, false, true);
this.removeAllTags();
}
preloadBgm(): void {
this.scene.loadBgm(this.bgm);
}