diff --git a/src/battle-scene.ts b/src/battle-scene.ts index cbf363f689a..ca728614d79 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -119,6 +119,7 @@ export default class BattleScene extends SceneBase { public experimentalSprites: boolean = false; public moveAnimations: boolean = true; public expGainsSpeed: integer = 0; + public expParty: integer = 0; public hpBarSpeed: integer = 0; public fusionPaletteSwaps: boolean = true; public gamepadSupport: boolean = true; diff --git a/src/phases.ts b/src/phases.ts index a3b66edf01c..a7e5f3a77de 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -3646,16 +3646,25 @@ export class ShowPartyExpBarPhase extends PlayerPartyMemberPokemonPhase { let newLevel: integer; pokemon.addExp(exp.value); newLevel = pokemon.level; - if (newLevel > lastLevel) - this.scene.unshiftPhase(new LevelUpPhase(this.scene, this.partyMemberIndex, lastLevel, newLevel)); + const isLevelUp = newLevel > lastLevel; + if (this.scene.expParty === 0 && isLevelUp) { + this.scene.unshiftPhase(new LevelUpPhase(this.scene, this.partyMemberIndex, lastLevel)); + } this.scene.unshiftPhase(new HidePartyExpBarPhase(this.scene)); pokemon.updateInfo(); - if (this.scene.expGainsSpeed < 3) { - this.scene.partyExpBar.showPokemonExp(pokemon, exp.value).then(() => { - if (newLevel > lastLevel) - this.end(); - else + if (this.scene.expParty === 2) { + this.end(); + } else if (this.scene.expParty === 1) { + if (isLevelUp) { + this.scene.partyExpBar.showPokemonExp(pokemon, exp.value, isLevelUp, this.scene.expParty === 1).then(() => { + setTimeout(() => this.end(), 200 / Math.pow(2, this.scene.expGainsSpeed)); + }); + } else { + this.end(); + } + } else if (this.scene.expGainsSpeed < 3) { + this.scene.partyExpBar.showPokemonExp(pokemon, exp.value, isLevelUp, this.scene.expParty === 1).then(() => { setTimeout(() => this.end(), 500 / Math.pow(2, this.scene.expGainsSpeed)); }); } else { diff --git a/src/system/settings.ts b/src/system/settings.ts index df4f894c949..cc94960fa15 100644 --- a/src/system/settings.ts +++ b/src/system/settings.ts @@ -21,6 +21,7 @@ export enum Setting { Move_Animations = "MOVE_ANIMATIONS", Show_Stats_on_Level_Up = "SHOW_LEVEL_UP_STATS", EXP_Gains_Speed = "EXP_GAINS_SPEED", + EXP_Party = "EXP_PARTY", HP_Bar_Speed = "HP_BAR_SPEED", Fusion_Palette_Swaps = "FUSION_PALETTE_SWAPS", Player_Gender = "PLAYER_GENDER", @@ -52,6 +53,7 @@ export const settingOptions: SettingOptions = { [Setting.Move_Animations]: [ 'Off', 'On' ], [Setting.Show_Stats_on_Level_Up]: [ 'Off', 'On' ], [Setting.EXP_Gains_Speed]: [ 'Normal', 'Fast', 'Faster', 'Skip' ], + [Setting.EXP_Party]: [ 'Normal', 'Only Up', 'Skip' ], [Setting.HP_Bar_Speed]: [ 'Normal', 'Fast', 'Faster', 'Instant' ], [Setting.Fusion_Palette_Swaps]: [ 'Off', 'On' ], [Setting.Player_Gender]: [ 'Boy', 'Girl' ], @@ -75,6 +77,7 @@ export const settingDefaults: SettingDefaults = { [Setting.Move_Animations]: 1, [Setting.Show_Stats_on_Level_Up]: 1, [Setting.EXP_Gains_Speed]: 0, + [Setting.EXP_Party]: 0, [Setting.HP_Bar_Speed]: 0, [Setting.Fusion_Palette_Swaps]: 1, [Setting.Player_Gender]: 0, @@ -131,6 +134,9 @@ export function setSetting(scene: BattleScene, setting: Setting, value: integer) case Setting.EXP_Gains_Speed: scene.expGainsSpeed = value; break; + case Setting.EXP_Party: + scene.expParty = value; + break; case Setting.HP_Bar_Speed: scene.hpBarSpeed = value; break; diff --git a/src/ui/party-exp-bar.ts b/src/ui/party-exp-bar.ts index a5451c5f27a..374ebfa7427 100644 --- a/src/ui/party-exp-bar.ts +++ b/src/ui/party-exp-bar.ts @@ -29,7 +29,7 @@ export default class PartyExpBar extends Phaser.GameObjects.Container { this.shown = false; } - showPokemonExp(pokemon: Pokemon, expValue: integer): Promise { + showPokemonExp(pokemon: Pokemon, expValue: integer, isLevelUp: boolean, showOnlyLevelUp: boolean): Promise { return new Promise(resolve => { if (this.shown) return resolve(); @@ -39,7 +39,11 @@ export default class PartyExpBar extends Phaser.GameObjects.Container { this.add(this.pokemonIcon); - this.expText.setText(`+${expValue.toString()}`); + if (showOnlyLevelUp) { + this.expText.setText(`Lv. UP`); + } else { + this.expText.setText(`+${expValue.toString()}`); + } this.bg.width = this.expText.displayWidth + 28;