mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-19 05:49:32 +02:00
update implementation
This commit is contained in:
parent
1bd0bccf0e
commit
1ddbe55c9e
@ -83,6 +83,7 @@ import { SwitchPhase } from "./phases/switch-phase";
|
|||||||
import { TitlePhase } from "./phases/title-phase";
|
import { TitlePhase } from "./phases/title-phase";
|
||||||
import { ToggleDoublePositionPhase } from "./phases/toggle-double-position-phase";
|
import { ToggleDoublePositionPhase } from "./phases/toggle-double-position-phase";
|
||||||
import { TurnInitPhase } from "./phases/turn-init-phase";
|
import { TurnInitPhase } from "./phases/turn-init-phase";
|
||||||
|
import { ShopCursorTarget } from "./enums/shop-cursor-target";
|
||||||
|
|
||||||
export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1";
|
export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1";
|
||||||
|
|
||||||
@ -127,7 +128,7 @@ export default class BattleScene extends SceneBase {
|
|||||||
public gameSpeed: integer = 1;
|
public gameSpeed: integer = 1;
|
||||||
public damageNumbersMode: integer = 0;
|
public damageNumbersMode: integer = 0;
|
||||||
public reroll: boolean = false;
|
public reroll: boolean = false;
|
||||||
public rerollTarget: number = 1;
|
public shopCursorTarget: number = ShopCursorTarget.CHECK_TEAM;
|
||||||
public showMovesetFlyout: boolean = true;
|
public showMovesetFlyout: boolean = true;
|
||||||
public showArenaFlyout: boolean = true;
|
public showArenaFlyout: boolean = true;
|
||||||
public showTimeOfDayWidget: boolean = true;
|
public showTimeOfDayWidget: boolean = true;
|
||||||
|
13
src/enums/shop-cursor-target.ts
Normal file
13
src/enums/shop-cursor-target.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/**
|
||||||
|
* Determines the cursor target when entering the shop phase.
|
||||||
|
*/
|
||||||
|
export enum ShopCursorTarget {
|
||||||
|
/** Cursor points to Reroll */
|
||||||
|
REROLL,
|
||||||
|
/** Cursor points to Items */
|
||||||
|
ITEMS,
|
||||||
|
/** Cursor points to Shop */
|
||||||
|
SHOP,
|
||||||
|
/** Cursor points to Check Team */
|
||||||
|
CHECK_TEAM
|
||||||
|
}
|
@ -97,8 +97,9 @@ export const settings: SimpleTranslationEntries = {
|
|||||||
"gamepadSupport": "Gamepad Support",
|
"gamepadSupport": "Gamepad Support",
|
||||||
"showBgmBar": "Show Music Names",
|
"showBgmBar": "Show Music Names",
|
||||||
"shopOverlayOpacity": "Shop Overlay Opacity",
|
"shopOverlayOpacity": "Shop Overlay Opacity",
|
||||||
"shopRerollTarget": "Shop Post-Reroll Target",
|
"shopCursorTarget": "Shop Cursor Target",
|
||||||
"items": "Items",
|
"items": "Items",
|
||||||
"reroll": "Reroll",
|
"reroll": "Reroll",
|
||||||
"shop": "Shop"
|
"shop": "Shop",
|
||||||
|
"checkTeam": "Check Team"
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -99,8 +99,9 @@ export const settings: SimpleTranslationEntries = {
|
|||||||
"showBgmBar": "Musiknamen anzeigen",
|
"showBgmBar": "Musiknamen anzeigen",
|
||||||
"moveTouchControls": "Bewegung Touch Steuerung",
|
"moveTouchControls": "Bewegung Touch Steuerung",
|
||||||
"shopOverlayOpacity": "Shop Overlay Deckkraft",
|
"shopOverlayOpacity": "Shop Overlay Deckkraft",
|
||||||
"shopRerollTarget": "Shop Post-Reroll Target",
|
"shopCursorTarget": "Shop Cursor Target",
|
||||||
"items": "Items",
|
"items": "Items",
|
||||||
"reroll": "Reroll",
|
"reroll": "Reroll",
|
||||||
"shop": "Shop"
|
"shop": "Shop",
|
||||||
|
"checkTeam": "Check Team"
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -99,8 +99,9 @@ export const settings: SimpleTranslationEntries = {
|
|||||||
"showBgmBar": "Show Music Names",
|
"showBgmBar": "Show Music Names",
|
||||||
"moveTouchControls": "Move Touch Controls",
|
"moveTouchControls": "Move Touch Controls",
|
||||||
"shopOverlayOpacity": "Shop Overlay Opacity",
|
"shopOverlayOpacity": "Shop Overlay Opacity",
|
||||||
"shopRerollTarget": "Shop Post-Reroll Target",
|
"shopCursorTarget": "Shop Cursor Target",
|
||||||
"items": "Items",
|
"items": "Items",
|
||||||
"reroll": "Reroll",
|
"reroll": "Reroll",
|
||||||
"shop": "Shop"
|
"shop": "Shop",
|
||||||
|
"checkTeam": "Check Team"
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -99,8 +99,9 @@ export const settings: SimpleTranslationEntries = {
|
|||||||
"showBgmBar": "Show Music Names",
|
"showBgmBar": "Show Music Names",
|
||||||
"moveTouchControls": "Move Touch Controls",
|
"moveTouchControls": "Move Touch Controls",
|
||||||
"shopOverlayOpacity": "Opacidad de la fase de compra",
|
"shopOverlayOpacity": "Opacidad de la fase de compra",
|
||||||
"shopRerollTarget": "Shop Post-Reroll Target",
|
"shopCursorTarget": "Shop Cursor Target",
|
||||||
"items": "Items",
|
"items": "Items",
|
||||||
"reroll": "Reroll",
|
"reroll": "Reroll",
|
||||||
"shop": "Shop"
|
"shop": "Shop",
|
||||||
|
"checkTeam": "Check Team"
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -99,8 +99,9 @@ export const settings: SimpleTranslationEntries = {
|
|||||||
"showBgmBar": "Titre de la musique",
|
"showBgmBar": "Titre de la musique",
|
||||||
"moveTouchControls": "Déplacer les contrôles tactiles",
|
"moveTouchControls": "Déplacer les contrôles tactiles",
|
||||||
"shopOverlayOpacity": "Opacité boutique",
|
"shopOverlayOpacity": "Opacité boutique",
|
||||||
"shopRerollTarget": "Shop Post-Reroll Target",
|
"shopCursorTarget": "Shop Cursor Target",
|
||||||
"items": "Items",
|
"items": "Items",
|
||||||
"reroll": "Reroll",
|
"reroll": "Reroll",
|
||||||
"shop": "Shop"
|
"shop": "Shop",
|
||||||
|
"checkTeam": "Check Team"
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -99,8 +99,9 @@ export const settings: SimpleTranslationEntries = {
|
|||||||
"showBgmBar": "Mostra Nomi Musica",
|
"showBgmBar": "Mostra Nomi Musica",
|
||||||
"moveTouchControls": "Move Touch Controls",
|
"moveTouchControls": "Move Touch Controls",
|
||||||
"shopOverlayOpacity": "Opacità Finestra Negozio",
|
"shopOverlayOpacity": "Opacità Finestra Negozio",
|
||||||
"shopRerollTarget": "Shop Post-Reroll Target",
|
"shopCursorTarget": "Shop Cursor Target",
|
||||||
"items": "Items",
|
"items": "Items",
|
||||||
"reroll": "Reroll",
|
"reroll": "Reroll",
|
||||||
"shop": "Shop"
|
"shop": "Shop",
|
||||||
|
"checkTeam": "Check Team"
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -98,8 +98,9 @@ export const settings: SimpleTranslationEntries = {
|
|||||||
"gamepadSupport": "コントローラーサポート",
|
"gamepadSupport": "コントローラーサポート",
|
||||||
"showBgmBar": "Show Music Names",
|
"showBgmBar": "Show Music Names",
|
||||||
"shopOverlayOpacity": "Shop Overlay Opacity",
|
"shopOverlayOpacity": "Shop Overlay Opacity",
|
||||||
"shopRerollTarget": "Shop Post-Reroll Target",
|
"shopCursorTarget": "Shop Cursor Target",
|
||||||
"items": "Items",
|
"items": "Items",
|
||||||
"reroll": "Reroll",
|
"reroll": "Reroll",
|
||||||
"shop": "Shop"
|
"shop": "Shop",
|
||||||
|
"checkTeam": "Check Team"
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -99,8 +99,9 @@ export const settings: SimpleTranslationEntries = {
|
|||||||
"showBgmBar": "BGM 제목 보여주기",
|
"showBgmBar": "BGM 제목 보여주기",
|
||||||
"moveTouchControls": "터치 컨트롤 이동",
|
"moveTouchControls": "터치 컨트롤 이동",
|
||||||
"shopOverlayOpacity": "상점 오버레이 투명도",
|
"shopOverlayOpacity": "상점 오버레이 투명도",
|
||||||
"shopRerollTarget": "Shop Post-Reroll Target",
|
"shopCursorTarget": "Shop Cursor Target",
|
||||||
"items": "Items",
|
"items": "Items",
|
||||||
"reroll": "Reroll",
|
"reroll": "Reroll",
|
||||||
"shop": "Shop"
|
"shop": "Shop",
|
||||||
|
"checkTeam": "Check Team"
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -99,8 +99,9 @@ export const settings: SimpleTranslationEntries = {
|
|||||||
"showBgmBar": "Exibir Nomes das Músicas",
|
"showBgmBar": "Exibir Nomes das Músicas",
|
||||||
"moveTouchControls": "Move Touch Controls",
|
"moveTouchControls": "Move Touch Controls",
|
||||||
"shopOverlayOpacity": "Opacidade da Loja",
|
"shopOverlayOpacity": "Opacidade da Loja",
|
||||||
"shopRerollTarget": "Shop Post-Reroll Target",
|
"shopCursorTarget": "Shop Cursor Target",
|
||||||
"items": "Items",
|
"items": "Items",
|
||||||
"reroll": "Reroll",
|
"reroll": "Reroll",
|
||||||
"shop": "Shop"
|
"shop": "Shop",
|
||||||
|
"checkTeam": "Check Team"
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -99,8 +99,9 @@ export const settings: SimpleTranslationEntries = {
|
|||||||
"showBgmBar": "显示音乐名称",
|
"showBgmBar": "显示音乐名称",
|
||||||
"moveTouchControls": "移动触摸控制",
|
"moveTouchControls": "移动触摸控制",
|
||||||
"shopOverlayOpacity": "商店显示不透明度",
|
"shopOverlayOpacity": "商店显示不透明度",
|
||||||
"shopRerollTarget": "Shop Post-Reroll Target",
|
"shopCursorTarget": "Shop Cursor Target",
|
||||||
"items": "Items",
|
"items": "Items",
|
||||||
"reroll": "Reroll",
|
"reroll": "Reroll",
|
||||||
"shop": "Shop"
|
"shop": "Shop",
|
||||||
|
"checkTeam": "Check Team"
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -99,8 +99,9 @@ export const settings: SimpleTranslationEntries = {
|
|||||||
"showBgmBar": "Show Music Names",
|
"showBgmBar": "Show Music Names",
|
||||||
"moveTouchControls": "移動觸控控制",
|
"moveTouchControls": "移動觸控控制",
|
||||||
"shopOverlayOpacity": "Shop Overlay Opacity",
|
"shopOverlayOpacity": "Shop Overlay Opacity",
|
||||||
"shopRerollTarget": "Shop Post-Reroll Target",
|
"shopCursorTarget": "Shop Cursor Target",
|
||||||
"items": "Items",
|
"items": "Items",
|
||||||
"reroll": "Reroll",
|
"reroll": "Reroll",
|
||||||
"shop": "Shop"
|
"shop": "Shop",
|
||||||
|
"checkTeam": "Check Team"
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -9,6 +9,7 @@ import { EaseType } from "#enums/ease-type";
|
|||||||
import { MoneyFormat } from "#enums/money-format";
|
import { MoneyFormat } from "#enums/money-format";
|
||||||
import { PlayerGender } from "#enums/player-gender";
|
import { PlayerGender } from "#enums/player-gender";
|
||||||
import { getIsInitialized, initI18n } from "#app/plugins/i18n.js";
|
import { getIsInitialized, initI18n } from "#app/plugins/i18n.js";
|
||||||
|
import { ShopCursorTarget } from "#app/enums/shop-cursor-target.js";
|
||||||
|
|
||||||
function getTranslation(key: string): string {
|
function getTranslation(key: string): string {
|
||||||
if (!getIsInitialized()) {
|
if (!getIsInitialized()) {
|
||||||
@ -580,7 +581,7 @@ export const Setting: Array<Setting> = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: SettingKeys.Reroll_Target,
|
key: SettingKeys.Reroll_Target,
|
||||||
label: i18next.t("settings:shopRerollTarget"),
|
label: i18next.t("settings:shopCursorTarget"),
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
value:"Reroll",
|
value:"Reroll",
|
||||||
@ -593,9 +594,13 @@ export const Setting: Array<Setting> = [
|
|||||||
{
|
{
|
||||||
value:"Shop",
|
value:"Shop",
|
||||||
label: i18next.t("settings:shop")
|
label: i18next.t("settings:shop")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value:"Check Team",
|
||||||
|
label: i18next.t("settings:checkTeam")
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
default: 1,
|
default: ShopCursorTarget.CHECK_TEAM,
|
||||||
type: SettingType.DISPLAY
|
type: SettingType.DISPLAY
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -731,7 +736,7 @@ export function setSetting(scene: BattleScene, setting: string, value: integer):
|
|||||||
scene.showLevelUpStats = Setting[index].options[value].value === "On";
|
scene.showLevelUpStats = Setting[index].options[value].value === "On";
|
||||||
break;
|
break;
|
||||||
case SettingKeys.Reroll_Target:
|
case SettingKeys.Reroll_Target:
|
||||||
scene.rerollTarget = value;
|
scene.shopCursorTarget = value;
|
||||||
case SettingKeys.EXP_Gains_Speed:
|
case SettingKeys.EXP_Gains_Speed:
|
||||||
scene.expGainsSpeed = value;
|
scene.expGainsSpeed = value;
|
||||||
break;
|
break;
|
||||||
|
@ -12,7 +12,7 @@ import { allMoves } from "../data/move";
|
|||||||
import * as Utils from "./../utils";
|
import * as Utils from "./../utils";
|
||||||
import Overrides from "#app/overrides";
|
import Overrides from "#app/overrides";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { SelectModifierPhase } from "#app/phases/select-modifier-phase";
|
import { ShopCursorTarget } from "#app/enums/shop-cursor-target.js";
|
||||||
|
|
||||||
export const SHOP_OPTIONS_ROW_LIMIT = 6;
|
export const SHOP_OPTIONS_ROW_LIMIT = 6;
|
||||||
|
|
||||||
@ -250,12 +250,22 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler {
|
|||||||
duration: 250
|
duration: 250
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const setCursorTarget = () => {
|
||||||
|
if (this.scene.shopCursorTarget === ShopCursorTarget.CHECK_TEAM) {
|
||||||
|
this.setRowCursor(0);
|
||||||
|
this.setCursor(2);
|
||||||
|
} else {
|
||||||
|
this.setRowCursor(this.scene.shopCursorTarget);
|
||||||
this.setCursor(0);
|
this.setCursor(0);
|
||||||
const phase = this.scene.getCurrentPhase() as SelectModifierPhase;
|
}
|
||||||
phase.getRerollCount() > 0 ? this.setRowCursor(this.scene.rerollTarget) : this.setRowCursor(1);
|
};
|
||||||
|
|
||||||
handleTutorial(this.scene, Tutorial.Select_Item).then(() => {
|
setCursorTarget();
|
||||||
this.setCursor(0);
|
|
||||||
|
handleTutorial(this.scene, Tutorial.Select_Item).then((res) => {
|
||||||
|
if (res) {
|
||||||
|
setCursorTarget();
|
||||||
|
}
|
||||||
this.awaitingActionInput = true;
|
this.awaitingActionInput = true;
|
||||||
this.onActionInput = args[2];
|
this.onActionInput = args[2];
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user