mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-03-21 17:50:29 -05:00
Add NPA mode
This commit is contained in:
parent
a711bf74f8
commit
37dd69b214
|
|
@ -568,15 +568,18 @@ export class BattleScene implements BattleSceneStub {
|
|||
this.gen = gen;
|
||||
this.activeCount = this.battle.nearSide?.active.length || 1;
|
||||
|
||||
const isSPL = (typeof this.battle.rated === 'string' && this.battle.rated.startsWith("Smogon Premier League"));
|
||||
const rated = this.battle.rated;
|
||||
let bg: string;
|
||||
if (isSPL) {
|
||||
if (typeof rated === 'string' && rated.startsWith("Smogon Premier League")) {
|
||||
if (gen <= 1) bg = 'fx/bg-gen1-spl.png';
|
||||
else if (gen <= 2) bg = 'fx/bg-gen2-spl.png';
|
||||
else if (gen <= 3) bg = 'fx/bg-gen3-spl.png';
|
||||
else if (gen <= 4) bg = 'fx/bg-gen4-spl.png';
|
||||
else bg = 'fx/bg-spl.png';
|
||||
this.setBgm(-101);
|
||||
} else if (typeof rated === 'string' && rated.startsWith('National Pokemon Association')) {
|
||||
bg = 'fx/bg-npa.png';
|
||||
this.setBgm(-101);
|
||||
} else {
|
||||
if (gen <= 1) bg = 'fx/bg-gen1.png?';
|
||||
else if (gen <= 2) bg = 'fx/bg-gen2.png?';
|
||||
|
|
@ -586,6 +589,7 @@ export class BattleScene implements BattleSceneStub {
|
|||
else bg = `sprites/gen6bgs/${BattleBackdrops[this.numericId % BattleBackdrops.length]}`;
|
||||
}
|
||||
|
||||
console.log(bg);
|
||||
this.backdropImage = bg;
|
||||
if (this.$bg) {
|
||||
this.$bg.css('background-image', `url(${Dex.resourcePrefix}${this.backdropImage})`);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user