added settings to set battle style, either shift or set

This commit is contained in:
Greenlamp 2024-05-05 16:08:59 +02:00
parent 3ed7649ce5
commit 5127d73d4f
3 changed files with 12 additions and 0 deletions

View File

@ -119,6 +119,7 @@ export default class BattleScene extends SceneBase {
public experimentalSprites: boolean = false; public experimentalSprites: boolean = false;
public moveAnimations: boolean = true; public moveAnimations: boolean = true;
public expGainsSpeed: integer = 0; public expGainsSpeed: integer = 0;
public battleStyle: 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

@ -1559,6 +1559,11 @@ export class CheckSwitchPhase extends BattlePhase {
return; return;
} }
if (this.scene.battleStyle === 1) {
super.end();
return;
}
this.scene.ui.showText(i18next.t('battle:switchQuestion', { pokemonName: this.useName ? pokemon.name : i18next.t('battle:pokemon') }), null, () => { this.scene.ui.showText(i18next.t('battle:switchQuestion', { pokemonName: this.useName ? pokemon.name : i18next.t('battle:pokemon') }), null, () => {
this.scene.ui.setMode(Mode.CONFIRM, () => { this.scene.ui.setMode(Mode.CONFIRM, () => {
this.scene.ui.setMode(Mode.MESSAGE); this.scene.ui.setMode(Mode.MESSAGE);

View File

@ -21,6 +21,7 @@ export enum Setting {
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",
EXP_Gains_Speed = "EXP_GAINS_SPEED", EXP_Gains_Speed = "EXP_GAINS_SPEED",
Battle_Style = "BATTLE_STYLE",
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",
@ -53,6 +54,7 @@ export const settingOptions: SettingOptions = {
[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.EXP_Gains_Speed]: [ 'Normal', 'Fast', 'Faster', 'Skip' ], [Setting.EXP_Gains_Speed]: [ 'Normal', 'Fast', 'Faster', 'Skip' ],
[Setting.Battle_Style]: [ 'Shift', 'Set' ],
[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' ],
@ -77,6 +79,7 @@ export const settingDefaults: SettingDefaults = {
[Setting.Move_Animations]: 1, [Setting.Move_Animations]: 1,
[Setting.Show_Stats_on_Level_Up]: 1, [Setting.Show_Stats_on_Level_Up]: 1,
[Setting.EXP_Gains_Speed]: 0, [Setting.EXP_Gains_Speed]: 0,
[Setting.Battle_Style]: 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,
@ -134,6 +137,9 @@ export function setSetting(scene: BattleScene, setting: Setting, value: integer)
case Setting.EXP_Gains_Speed: case Setting.EXP_Gains_Speed:
scene.expGainsSpeed = value; scene.expGainsSpeed = value;
break; break;
case Setting.Battle_Style:
scene.battleStyle = value;
break;
case Setting.HP_Bar_Speed: case Setting.HP_Bar_Speed:
scene.hpBarSpeed = value; scene.hpBarSpeed = value;
break; break;