Skip to content

Commit 37dd69b

Browse files
mia-pi-gitZarel
authored andcommitted
Add NPA mode
1 parent a711bf7 commit 37dd69b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: play.pokemonshowdown.com/src/battle-animations.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -568,15 +568,18 @@ export class BattleScene implements BattleSceneStub {
568568
this.gen = gen;
569569
this.activeCount = this.battle.nearSide?.active.length || 1;
570570

571-
const isSPL = (typeof this.battle.rated === 'string' && this.battle.rated.startsWith("Smogon Premier League"));
571+
const rated = this.battle.rated;
572572
let bg: string;
573-
if (isSPL) {
573+
if (typeof rated === 'string' && rated.startsWith("Smogon Premier League")) {
574574
if (gen <= 1) bg = 'fx/bg-gen1-spl.png';
575575
else if (gen <= 2) bg = 'fx/bg-gen2-spl.png';
576576
else if (gen <= 3) bg = 'fx/bg-gen3-spl.png';
577577
else if (gen <= 4) bg = 'fx/bg-gen4-spl.png';
578578
else bg = 'fx/bg-spl.png';
579579
this.setBgm(-101);
580+
} else if (typeof rated === 'string' && rated.startsWith('National Pokemon Association')) {
581+
bg = 'fx/bg-npa.png';
582+
this.setBgm(-101);
580583
} else {
581584
if (gen <= 1) bg = 'fx/bg-gen1.png?';
582585
else if (gen <= 2) bg = 'fx/bg-gen2.png?';
@@ -586,6 +589,7 @@ export class BattleScene implements BattleSceneStub {
586589
else bg = `sprites/gen6bgs/${BattleBackdrops[this.numericId % BattleBackdrops.length]}`;
587590
}
588591

592+
console.log(bg);
589593
this.backdropImage = bg;
590594
if (this.$bg) {
591595
this.$bg.css('background-image', `url(${Dex.resourcePrefix}${this.backdropImage})`);

0 commit comments

Comments
 (0)