Add more exp gains options

pull/178/head
Flashfyre 2024-04-18 00:49:44 -04:00 committed by Samuel H
parent 0948295a98
commit eab38a5ad4
4 changed files with 9 additions and 9 deletions

View File

@ -120,13 +120,13 @@ export default class BattleScene extends SceneBase {
public gameSpeed: integer = 1; public gameSpeed: integer = 1;
public damageNumbersMode: integer = 0; public damageNumbersMode: integer = 0;
public showLevelUpStats: boolean = true; public showLevelUpStats: boolean = true;
public showExpGains: boolean = true;
public enableTutorials: boolean = import.meta.env.VITE_BYPASS_TUTORIAL === "1"; public enableTutorials: boolean = import.meta.env.VITE_BYPASS_TUTORIAL === "1";
public enableRetries: boolean = false; public enableRetries: boolean = false;
public uiTheme: UiTheme = UiTheme.DEFAULT; public uiTheme: UiTheme = UiTheme.DEFAULT;
public windowType: integer = 0; public windowType: integer = 0;
public experimentalSprites: boolean = false; public experimentalSprites: boolean = false;
public moveAnimations: boolean = true; public moveAnimations: boolean = true;
public expGainsSpeed: integer = 0;
public hpBarSpeed: integer = 0; public hpBarSpeed: integer = 0;
public fusionPaletteSwaps: boolean = true; public fusionPaletteSwaps: boolean = true;
public gamepadSupport: boolean = true; public gamepadSupport: boolean = true;

View File

@ -3543,12 +3543,12 @@ export class ShowPartyExpBarPhase extends PlayerPartyMemberPokemonPhase {
this.scene.unshiftPhase(new HidePartyExpBarPhase(this.scene)); this.scene.unshiftPhase(new HidePartyExpBarPhase(this.scene));
pokemon.updateInfo(); pokemon.updateInfo();
if (this.scene.showExpGains) { if (this.scene.expGainsSpeed < 3) {
this.scene.partyExpBar.showPokemonExp(pokemon, exp.value).then(() => { this.scene.partyExpBar.showPokemonExp(pokemon, exp.value).then(() => {
if (newLevel > lastLevel) if (newLevel > lastLevel)
this.end(); this.end();
else else
setTimeout(() => this.end(), 500); setTimeout(() => this.end(), 500 / Math.pow(2, this.scene.expGainsSpeed));
}); });
} else { } else {
this.end(); this.end();

View File

@ -16,7 +16,7 @@ export enum Setting {
Sprite_Set = "SPRITE_SET", Sprite_Set = "SPRITE_SET",
Move_Animations = "MOVE_ANIMATIONS", Move_Animations = "MOVE_ANIMATIONS",
Show_Stats_on_Level_Up = "SHOW_LEVEL_UP_STATS", Show_Stats_on_Level_Up = "SHOW_LEVEL_UP_STATS",
Show_EXP_Gains = "SHOW_EXP_GAINS", EXP_Gains_Speed = "EXP_GAINS_SPEED",
HP_Bar_Speed = "HP_BAR_SPEED", HP_Bar_Speed = "HP_BAR_SPEED",
Fusion_Palette_Swaps = "FUSION_PALETTE_SWAPS", Fusion_Palette_Swaps = "FUSION_PALETTE_SWAPS",
Player_Gender = "PLAYER_GENDER", Player_Gender = "PLAYER_GENDER",
@ -46,7 +46,7 @@ export const settingOptions: SettingOptions = {
[Setting.Sprite_Set]: [ 'Consistent', 'Prioritize Animation' ], [Setting.Sprite_Set]: [ 'Consistent', 'Prioritize Animation' ],
[Setting.Move_Animations]: [ 'Off', 'On' ], [Setting.Move_Animations]: [ 'Off', 'On' ],
[Setting.Show_Stats_on_Level_Up]: [ 'Off', 'On' ], [Setting.Show_Stats_on_Level_Up]: [ 'Off', 'On' ],
[Setting.Show_EXP_Gains]: [ 'Off', 'On' ], [Setting.EXP_Gains_Speed]: [ 'Normal', 'Fast', 'Faster', 'Skip' ],
[Setting.HP_Bar_Speed]: [ 'Normal', 'Fast', 'Faster', 'Instant' ], [Setting.HP_Bar_Speed]: [ 'Normal', 'Fast', 'Faster', 'Instant' ],
[Setting.Fusion_Palette_Swaps]: [ 'Off', 'On' ], [Setting.Fusion_Palette_Swaps]: [ 'Off', 'On' ],
[Setting.Player_Gender]: [ 'Boy', 'Girl' ], [Setting.Player_Gender]: [ 'Boy', 'Girl' ],
@ -68,7 +68,7 @@ export const settingDefaults: SettingDefaults = {
[Setting.Sprite_Set]: 0, [Setting.Sprite_Set]: 0,
[Setting.Move_Animations]: 1, [Setting.Move_Animations]: 1,
[Setting.Show_Stats_on_Level_Up]: 1, [Setting.Show_Stats_on_Level_Up]: 1,
[Setting.Show_EXP_Gains]: 1, [Setting.EXP_Gains_Speed]: 0,
[Setting.HP_Bar_Speed]: 0, [Setting.HP_Bar_Speed]: 0,
[Setting.Fusion_Palette_Swaps]: 1, [Setting.Fusion_Palette_Swaps]: 1,
[Setting.Player_Gender]: 0, [Setting.Player_Gender]: 0,
@ -122,8 +122,8 @@ export function setSetting(scene: BattleScene, setting: Setting, value: integer)
case Setting.Show_Stats_on_Level_Up: case Setting.Show_Stats_on_Level_Up:
scene.showLevelUpStats = settingOptions[setting][value] === 'On'; scene.showLevelUpStats = settingOptions[setting][value] === 'On';
break; break;
case Setting.Show_EXP_Gains: case Setting.EXP_Gains_Speed:
scene.showExpGains = settingOptions[setting][value] === 'On'; scene.expGainsSpeed = value;
break; break;
case Setting.HP_Bar_Speed: case Setting.HP_Bar_Speed:
scene.hpBarSpeed = value; scene.hpBarSpeed = value;

View File

@ -51,7 +51,7 @@ export default class PartyExpBar extends Phaser.GameObjects.Container {
this.tween = this.scene.tweens.add({ this.tween = this.scene.tweens.add({
targets: this, targets: this,
x: (this.scene.game.canvas.width / 6) - (this.bg.width - 5), x: (this.scene.game.canvas.width / 6) - (this.bg.width - 5),
duration: 500, duration: 500 / Math.pow(2, pokemon.scene.expGainsSpeed),
ease: 'Sine.easeOut', ease: 'Sine.easeOut',
onComplete: () => { onComplete: () => {
this.tween = null; this.tween = null;