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