mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-13 20:02:19 +02:00
Compare commits
8 Commits
fb26b6d501
...
4b8c9c87c3
Author | SHA1 | Date | |
---|---|---|---|
|
4b8c9c87c3 | ||
|
b058e10713 | ||
|
0d80a045fd | ||
|
99835c27c8 | ||
|
17e4edeb8d | ||
|
970e335fab | ||
|
f64e9e4a0d | ||
|
f957994fe4 |
@ -56,6 +56,7 @@ import { Localizable } from "./plugins/i18n";
|
||||
import * as Overrides from "./overrides";
|
||||
import {InputsController} from "./inputs-controller";
|
||||
import {UiInputs} from "./ui-inputs";
|
||||
import { MoneyFormat } from "./enums/money-format";
|
||||
import { NewArenaEvent } from "./battle-scene-events";
|
||||
|
||||
export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1";
|
||||
@ -92,6 +93,7 @@ export default class BattleScene extends SceneBase {
|
||||
public showLevelUpStats: boolean = true;
|
||||
public enableTutorials: boolean = import.meta.env.VITE_BYPASS_TUTORIAL === "1";
|
||||
public enableRetries: boolean = false;
|
||||
public moneyFormat: MoneyFormat = MoneyFormat.NORMAL;
|
||||
public uiTheme: UiTheme = UiTheme.DEFAULT;
|
||||
public windowType: integer = 0;
|
||||
public experimentalSprites: boolean = false;
|
||||
@ -1263,9 +1265,16 @@ export default class BattleScene extends SceneBase {
|
||||
this.biomeWaveText.setVisible(true);
|
||||
}
|
||||
|
||||
updateMoneyText(): void {
|
||||
this.moneyText.setText(`₽${Utils.formatFancyLargeNumber(this.money, 3)}`);
|
||||
this.moneyText.setVisible(true);
|
||||
updateMoneyText(forceVisible: boolean = true): void {
|
||||
if (this.money === undefined) {
|
||||
return;
|
||||
}
|
||||
const formattedMoney =
|
||||
this.moneyFormat === MoneyFormat.ABBREVIATED ? Utils.formatFancyLargeNumber(this.money, 3) : this.money.toLocaleString();
|
||||
this.moneyText.setText(`₽${formattedMoney}`);
|
||||
if (forceVisible) {
|
||||
this.moneyText.setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
updateScoreText(): void {
|
||||
@ -1284,7 +1293,7 @@ export default class BattleScene extends SceneBase {
|
||||
if (luckValue < 14) {
|
||||
this.luckText.setTint(getLuckTextTint(luckValue));
|
||||
} else {
|
||||
this.luckText.setTint(0x83a55a, 0xee384a, 0x5271cd, 0x7b487b);
|
||||
this.luckText.setTint(0xffef5c, 0x47ff69, 0x6b6bff, 0xff6969);
|
||||
}
|
||||
this.luckLabelText.setX((this.game.canvas.width / 6) - 2 - (this.luckText.displayWidth + 2));
|
||||
this.tweens.add({
|
||||
|
@ -4052,12 +4052,14 @@ export function initAbilities() {
|
||||
new Ability(Abilities.GRIM_NEIGH, 8)
|
||||
.attr(PostVictoryStatChangeAbAttr, BattleStat.SPATK, 1),
|
||||
new Ability(Abilities.AS_ONE_GLASTRIER, 8)
|
||||
.attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => getPokemonMessage(pokemon, " has two Abilities!"))
|
||||
.attr(PreventBerryUseAbAttr)
|
||||
.attr(PostVictoryStatChangeAbAttr, BattleStat.ATK, 1)
|
||||
.attr(UncopiableAbilityAbAttr)
|
||||
.attr(UnswappableAbilityAbAttr)
|
||||
.attr(UnsuppressableAbilityAbAttr),
|
||||
new Ability(Abilities.AS_ONE_SPECTRIER, 8)
|
||||
.attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => getPokemonMessage(pokemon, " has two Abilities!"))
|
||||
.attr(PreventBerryUseAbAttr)
|
||||
.attr(PostVictoryStatChangeAbAttr, BattleStat.SPATK, 1)
|
||||
.attr(UncopiableAbilityAbAttr)
|
||||
|
@ -8448,8 +8448,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
|
||||
[ 72, Moves.LUNAR_BLESSING ],
|
||||
],
|
||||
[Species.PHIONE]: [
|
||||
[ 1, Moves.BUBBLE ],
|
||||
[ 1, Moves.WATER_SPORT ],
|
||||
[ 1, Moves.WATER_GUN ],
|
||||
[ 9, Moves.CHARM ],
|
||||
[ 16, Moves.SUPERSONIC ],
|
||||
[ 24, Moves.BUBBLE_BEAM ],
|
||||
@ -8459,11 +8458,12 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
|
||||
[ 54, Moves.AQUA_RING ],
|
||||
[ 61, Moves.DIVE ],
|
||||
[ 69, Moves.RAIN_DANCE ],
|
||||
[ 75, Moves.TAKE_HEART ],
|
||||
],
|
||||
[Species.MANAPHY]: [
|
||||
[ 1, Moves.BUBBLE ],
|
||||
[ 1, Moves.HEART_SWAP ],
|
||||
[ 1, Moves.TAIL_GLOW ],
|
||||
[ 1, Moves.WATER_SPORT ],
|
||||
[ 1, Moves.WATER_GUN ],
|
||||
[ 9, Moves.CHARM ],
|
||||
[ 16, Moves.SUPERSONIC ],
|
||||
[ 24, Moves.BUBBLE_BEAM ],
|
||||
@ -8473,7 +8473,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
|
||||
[ 54, Moves.AQUA_RING ],
|
||||
[ 61, Moves.DIVE ],
|
||||
[ 69, Moves.RAIN_DANCE ],
|
||||
[ 76, Moves.HEART_SWAP ],
|
||||
[ 76, Moves.TAKE_HEART ],
|
||||
],
|
||||
[Species.DARKRAI]: [
|
||||
[ 1, Moves.DISABLE ],
|
||||
|
4
src/enums/money-format.ts
Normal file
4
src/enums/money-format.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export enum MoneyFormat {
|
||||
NORMAL,
|
||||
ABBREVIATED
|
||||
}
|
@ -2316,6 +2316,8 @@ export const PGMmiscDialogue: SimpleTranslationEntries = {
|
||||
$@c{smile_wave_wink}Just kidding!@d{64} @c{smile}I'd never forget.@d{32}\nYour legend will live on in our hearts.
|
||||
$@c{smile_wave}Anyway,@d{64} it's getting late…@d{96} I think?\nIt's hard to tell in this place.
|
||||
$Let's go home. @c{smile_wave_wink}Maybe tomorrow, we can have another battle, for old time's sake?`,
|
||||
"ending_endless": "Congratulations on reaching the current end!\nMore content is coming soon.",
|
||||
"ending_name": "Devs"
|
||||
};
|
||||
// Dialogue that does not fit into any other category (e.g. tutorial messages, or the end of the game). For when the player character is female. For languages that do not have gendered pronouns, this can be set to PGMmiscDialogue.
|
||||
export const PGFmiscDialogue: SimpleTranslationEntries = PGMmiscDialogue;
|
||||
|
@ -5,36 +5,36 @@ export const biome: SimpleTranslationEntries = {
|
||||
"TOWN": "城镇",
|
||||
"PLAINS": "平原",
|
||||
"GRASS": "草地",
|
||||
"TALL_GRASS": "高草",
|
||||
"METROPOLIS": "都市",
|
||||
"TALL_GRASS": "高草丛",
|
||||
"METROPOLIS": "城市",
|
||||
"FOREST": "森林",
|
||||
"SEA": "海洋",
|
||||
"SWAMP": "湿地",
|
||||
"SWAMP": "沼泽",
|
||||
"BEACH": "沙滩",
|
||||
"LAKE": "湖泊",
|
||||
"SEABED": "海底",
|
||||
"MOUNTAIN": "山脉",
|
||||
"BADLANDS": "荒地",
|
||||
"BADLANDS": "不毛之地",
|
||||
"CAVE": "洞窟",
|
||||
"DESERT": "沙漠",
|
||||
"ICE_CAVE": "冰窟",
|
||||
"MEADOW": "草原",
|
||||
"ICE_CAVE": "寒冰洞窟",
|
||||
"MEADOW": "花丛",
|
||||
"POWER_PLANT": "发电厂",
|
||||
"VOLCANO": "火山",
|
||||
"GRAVEYARD": "墓地",
|
||||
"DOJO": "道场",
|
||||
"FACTORY": "工厂",
|
||||
"RUINS": "遗迹",
|
||||
"WASTELAND": "荒地",
|
||||
"ABYSS": "深穴",
|
||||
"WASTELAND": "荒地龙巢",
|
||||
"ABYSS": "幽谷深渊",
|
||||
"SPACE": "太空",
|
||||
"CONSTRUCTION_SITE": "工地",
|
||||
"JUNGLE": "丛林",
|
||||
"FAIRY_CAVE": "仙洞",
|
||||
"TEMPLE": "寺庙",
|
||||
"FAIRY_CAVE": "妖精洞窟",
|
||||
"TEMPLE": "神殿",
|
||||
"SLUM": "陋巷",
|
||||
"SNOWY_FOREST": "雪原",
|
||||
"SNOWY_FOREST": "冰雪森林",
|
||||
"ISLAND": "岛屿",
|
||||
"LABORATORY": "实验室",
|
||||
"LABORATORY": "研究所",
|
||||
"END": "???",
|
||||
} as const;
|
||||
|
@ -12,7 +12,7 @@ import { Stat } from "./data/pokemon-stat";
|
||||
import { PokeballCounts } from "./battle-scene";
|
||||
import { PokeballType } from "./data/pokeball";
|
||||
import {TimeOfDay} from "#app/data/enums/time-of-day";
|
||||
import {Gender} from "pokenode-ts";
|
||||
import { Gender } from "./data/gender";
|
||||
|
||||
/**
|
||||
* Overrides for testing different in game situations
|
||||
|
@ -2315,6 +2315,12 @@ export class BattleEndPhase extends BattlePhase {
|
||||
this.scene.gameData.gameStats.highestEndlessWave = this.scene.currentBattle.waveIndex + 1;
|
||||
}
|
||||
|
||||
// Endless graceful end
|
||||
if (this.scene.gameMode.isEndless && this.scene.currentBattle.waveIndex >= 5850) {
|
||||
this.scene.clearPhaseQueue();
|
||||
this.scene.unshiftPhase(new GameOverPhase(this.scene, true));
|
||||
}
|
||||
|
||||
for (const pokemon of this.scene.getField()) {
|
||||
if (pokemon) {
|
||||
pokemon.resetBattleSummonData();
|
||||
@ -3887,7 +3893,9 @@ export class GameOverPhase extends BattlePhase {
|
||||
this.victory = true;
|
||||
}
|
||||
|
||||
if (this.victory || !this.scene.enableRetries) {
|
||||
if (this.victory && this.scene.gameMode.isEndless) {
|
||||
this.scene.ui.showDialogue(i18next.t("PGMmiscDialogue:ending_endless"), i18next.t("PGMmiscDialogue:ending_name"), 0, () => this.handleGameOver());
|
||||
} else if (this.victory || !this.scene.enableRetries) {
|
||||
this.handleGameOver();
|
||||
} else {
|
||||
this.scene.ui.showText("Would you like to retry from the start of the battle?", null, () => {
|
||||
|
@ -5,6 +5,7 @@ import BattleScene from "../battle-scene";
|
||||
import { hasTouchscreen } from "../touch-controls";
|
||||
import { updateWindowType } from "../ui/ui-theme";
|
||||
import { PlayerGender } from "./game-data";
|
||||
import { MoneyFormat } from "../enums/money-format";
|
||||
|
||||
export enum Setting {
|
||||
Game_Speed = "GAME_SPEED",
|
||||
@ -17,6 +18,7 @@ export enum Setting {
|
||||
Window_Type = "WINDOW_TYPE",
|
||||
Tutorials = "TUTORIALS",
|
||||
Enable_Retries = "ENABLE_RETRIES",
|
||||
Money_Format = "MONEY_FORMAT",
|
||||
Sprite_Set = "SPRITE_SET",
|
||||
Move_Animations = "MOVE_ANIMATIONS",
|
||||
Show_Stats_on_Level_Up = "SHOW_LEVEL_UP_STATS",
|
||||
@ -50,6 +52,7 @@ export const settingOptions: SettingOptions = {
|
||||
[Setting.Window_Type]: new Array(5).fill(null).map((_, i) => (i + 1).toString()),
|
||||
[Setting.Tutorials]: ["Off", "On"],
|
||||
[Setting.Enable_Retries]: ["Off", "On"],
|
||||
[Setting.Money_Format]: ["Normal", "Abbreviated"],
|
||||
[Setting.Sprite_Set]: ["Consistent", "Mixed Animated"],
|
||||
[Setting.Move_Animations]: ["Off", "On"],
|
||||
[Setting.Show_Stats_on_Level_Up]: ["Off", "On"],
|
||||
@ -75,6 +78,7 @@ export const settingDefaults: SettingDefaults = {
|
||||
[Setting.Window_Type]: 0,
|
||||
[Setting.Tutorials]: 1,
|
||||
[Setting.Enable_Retries]: 0,
|
||||
[Setting.Money_Format]: 0,
|
||||
[Setting.Sprite_Set]: 0,
|
||||
[Setting.Move_Animations]: 1,
|
||||
[Setting.Show_Stats_on_Level_Up]: 1,
|
||||
@ -123,6 +127,17 @@ export function setSetting(scene: BattleScene, setting: Setting, value: integer)
|
||||
case Setting.Enable_Retries:
|
||||
scene.enableRetries = settingOptions[setting][value] === "On";
|
||||
break;
|
||||
case Setting.Money_Format:
|
||||
switch (settingOptions[setting][value]) {
|
||||
case "Normal":
|
||||
scene.moneyFormat = MoneyFormat.NORMAL;
|
||||
break;
|
||||
case "Abbreviated":
|
||||
scene.moneyFormat = MoneyFormat.ABBREVIATED;
|
||||
break;
|
||||
}
|
||||
scene.updateMoneyText(false);
|
||||
break;
|
||||
case Setting.Sprite_Set:
|
||||
scene.experimentalSprites = !!value;
|
||||
if (value) {
|
||||
|
Loading…
Reference in New Issue
Block a user