mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-20 07:12:32 +02:00
Compare commits
3 Commits
2c782ddf55
...
2b61e72b2d
Author | SHA1 | Date | |
---|---|---|---|
|
2b61e72b2d | ||
|
2d98e1fc3e | ||
|
fc30d07709 |
@ -163,9 +163,9 @@ export default class BattleScene extends SceneBase {
|
|||||||
public skipSeenDialogues: boolean = false;
|
public skipSeenDialogues: boolean = false;
|
||||||
/**
|
/**
|
||||||
* Determines if the egg hatching animation should be skipped
|
* Determines if the egg hatching animation should be skipped
|
||||||
* - 0 = Never
|
* - 0 = Never (never skip animation)
|
||||||
* - 1 = Always
|
* - 1 = Ask (ask to skip animation when hatching 2 or more eggs)
|
||||||
* - 2 = Ask
|
* - 2 = Always (automatically skip animation when hatching 2 or more eggs)
|
||||||
*/
|
*/
|
||||||
public eggSkipPreference: number = 0;
|
public eggSkipPreference: number = 0;
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ import { EggHatchData } from "#app/data/egg-hatch-data";
|
|||||||
export class EggLapsePhase extends Phase {
|
export class EggLapsePhase extends Phase {
|
||||||
|
|
||||||
private eggHatchData: EggHatchData[] = [];
|
private eggHatchData: EggHatchData[] = [];
|
||||||
private readonly minEggsToPromptSkip: number = 5;
|
private readonly minEggsToSkip: number = 2;
|
||||||
constructor(scene: BattleScene) {
|
constructor(scene: BattleScene) {
|
||||||
super(scene);
|
super(scene);
|
||||||
}
|
}
|
||||||
@ -31,7 +31,7 @@ export class EggLapsePhase extends Phase {
|
|||||||
this.eggHatchData= [];
|
this.eggHatchData= [];
|
||||||
|
|
||||||
if (eggsToHatchCount > 0) {
|
if (eggsToHatchCount > 0) {
|
||||||
if (eggsToHatchCount >= this.minEggsToPromptSkip && this.scene.eggSkipPreference === 2) {
|
if (eggsToHatchCount >= this.minEggsToSkip && this.scene.eggSkipPreference === 1) {
|
||||||
this.scene.ui.showText(i18next.t("battle:eggHatching"), 0, () => {
|
this.scene.ui.showText(i18next.t("battle:eggHatching"), 0, () => {
|
||||||
// show prompt for skip
|
// show prompt for skip
|
||||||
this.scene.ui.showText(i18next.t("battle:eggSkipPrompt"), 0);
|
this.scene.ui.showText(i18next.t("battle:eggSkipPrompt"), 0);
|
||||||
@ -44,7 +44,7 @@ export class EggLapsePhase extends Phase {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
}, 100, true);
|
}, 100, true);
|
||||||
} else if (eggsToHatchCount >= this.minEggsToPromptSkip && this.scene.eggSkipPreference === 1) {
|
} else if (eggsToHatchCount >= this.minEggsToSkip && this.scene.eggSkipPreference === 2) {
|
||||||
this.scene.queueMessage(i18next.t("battle:eggHatching"));
|
this.scene.queueMessage(i18next.t("battle:eggHatching"));
|
||||||
this.hatchEggsSkipped(eggsToHatch);
|
this.hatchEggsSkipped(eggsToHatch);
|
||||||
this.showSummary();
|
this.showSummary();
|
||||||
|
@ -290,16 +290,16 @@ export const Setting: Array<Setting> = [
|
|||||||
value: "Never",
|
value: "Never",
|
||||||
label: i18next.t("settings:never")
|
label: i18next.t("settings:never")
|
||||||
},
|
},
|
||||||
{
|
|
||||||
value: "Always",
|
|
||||||
label: i18next.t("settings:always")
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
value: "Ask",
|
value: "Ask",
|
||||||
label: i18next.t("settings:ask")
|
label: i18next.t("settings:ask")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "Always",
|
||||||
|
label: i18next.t("settings:always")
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
default: 2,
|
default: 1,
|
||||||
type: SettingType.GENERAL
|
type: SettingType.GENERAL
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user