Compare commits

..

No commits in common. "4b8c9c87c35e0b86686a0c83faca8d2d3e1bd2da" and "fb26b6d501e4a300b4e80f77c8c57726c4352242" have entirely different histories.

9 changed files with 23 additions and 63 deletions

View File

@ -56,7 +56,6 @@ import { Localizable } from "./plugins/i18n";
import * as Overrides from "./overrides"; import * as Overrides from "./overrides";
import {InputsController} from "./inputs-controller"; import {InputsController} from "./inputs-controller";
import {UiInputs} from "./ui-inputs"; import {UiInputs} from "./ui-inputs";
import { MoneyFormat } from "./enums/money-format";
import { NewArenaEvent } from "./battle-scene-events"; import { NewArenaEvent } from "./battle-scene-events";
export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1"; export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1";
@ -93,7 +92,6 @@ export default class BattleScene extends SceneBase {
public showLevelUpStats: boolean = true; public showLevelUpStats: boolean = true;
public enableTutorials: boolean = import.meta.env.VITE_BYPASS_TUTORIAL === "1"; public enableTutorials: boolean = import.meta.env.VITE_BYPASS_TUTORIAL === "1";
public enableRetries: boolean = false; public enableRetries: boolean = false;
public moneyFormat: MoneyFormat = MoneyFormat.NORMAL;
public uiTheme: UiTheme = UiTheme.DEFAULT; public uiTheme: UiTheme = UiTheme.DEFAULT;
public windowType: integer = 0; public windowType: integer = 0;
public experimentalSprites: boolean = false; public experimentalSprites: boolean = false;
@ -1265,17 +1263,10 @@ export default class BattleScene extends SceneBase {
this.biomeWaveText.setVisible(true); this.biomeWaveText.setVisible(true);
} }
updateMoneyText(forceVisible: boolean = true): void { updateMoneyText(): void {
if (this.money === undefined) { this.moneyText.setText(`${Utils.formatFancyLargeNumber(this.money, 3)}`);
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); this.moneyText.setVisible(true);
} }
}
updateScoreText(): void { updateScoreText(): void {
this.scoreText.setText(`Score: ${this.score.toString()}`); this.scoreText.setText(`Score: ${this.score.toString()}`);
@ -1293,7 +1284,7 @@ export default class BattleScene extends SceneBase {
if (luckValue < 14) { if (luckValue < 14) {
this.luckText.setTint(getLuckTextTint(luckValue)); this.luckText.setTint(getLuckTextTint(luckValue));
} else { } else {
this.luckText.setTint(0xffef5c, 0x47ff69, 0x6b6bff, 0xff6969); this.luckText.setTint(0x83a55a, 0xee384a, 0x5271cd, 0x7b487b);
} }
this.luckLabelText.setX((this.game.canvas.width / 6) - 2 - (this.luckText.displayWidth + 2)); this.luckLabelText.setX((this.game.canvas.width / 6) - 2 - (this.luckText.displayWidth + 2));
this.tweens.add({ this.tweens.add({

View File

@ -4052,14 +4052,12 @@ export function initAbilities() {
new Ability(Abilities.GRIM_NEIGH, 8) new Ability(Abilities.GRIM_NEIGH, 8)
.attr(PostVictoryStatChangeAbAttr, BattleStat.SPATK, 1), .attr(PostVictoryStatChangeAbAttr, BattleStat.SPATK, 1),
new Ability(Abilities.AS_ONE_GLASTRIER, 8) new Ability(Abilities.AS_ONE_GLASTRIER, 8)
.attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => getPokemonMessage(pokemon, " has two Abilities!"))
.attr(PreventBerryUseAbAttr) .attr(PreventBerryUseAbAttr)
.attr(PostVictoryStatChangeAbAttr, BattleStat.ATK, 1) .attr(PostVictoryStatChangeAbAttr, BattleStat.ATK, 1)
.attr(UncopiableAbilityAbAttr) .attr(UncopiableAbilityAbAttr)
.attr(UnswappableAbilityAbAttr) .attr(UnswappableAbilityAbAttr)
.attr(UnsuppressableAbilityAbAttr), .attr(UnsuppressableAbilityAbAttr),
new Ability(Abilities.AS_ONE_SPECTRIER, 8) new Ability(Abilities.AS_ONE_SPECTRIER, 8)
.attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => getPokemonMessage(pokemon, " has two Abilities!"))
.attr(PreventBerryUseAbAttr) .attr(PreventBerryUseAbAttr)
.attr(PostVictoryStatChangeAbAttr, BattleStat.SPATK, 1) .attr(PostVictoryStatChangeAbAttr, BattleStat.SPATK, 1)
.attr(UncopiableAbilityAbAttr) .attr(UncopiableAbilityAbAttr)

View File

@ -8448,7 +8448,8 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 72, Moves.LUNAR_BLESSING ], [ 72, Moves.LUNAR_BLESSING ],
], ],
[Species.PHIONE]: [ [Species.PHIONE]: [
[ 1, Moves.WATER_GUN ], [ 1, Moves.BUBBLE ],
[ 1, Moves.WATER_SPORT ],
[ 9, Moves.CHARM ], [ 9, Moves.CHARM ],
[ 16, Moves.SUPERSONIC ], [ 16, Moves.SUPERSONIC ],
[ 24, Moves.BUBBLE_BEAM ], [ 24, Moves.BUBBLE_BEAM ],
@ -8458,12 +8459,11 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 54, Moves.AQUA_RING ], [ 54, Moves.AQUA_RING ],
[ 61, Moves.DIVE ], [ 61, Moves.DIVE ],
[ 69, Moves.RAIN_DANCE ], [ 69, Moves.RAIN_DANCE ],
[ 75, Moves.TAKE_HEART ],
], ],
[Species.MANAPHY]: [ [Species.MANAPHY]: [
[ 1, Moves.HEART_SWAP ], [ 1, Moves.BUBBLE ],
[ 1, Moves.TAIL_GLOW ], [ 1, Moves.TAIL_GLOW ],
[ 1, Moves.WATER_GUN ], [ 1, Moves.WATER_SPORT ],
[ 9, Moves.CHARM ], [ 9, Moves.CHARM ],
[ 16, Moves.SUPERSONIC ], [ 16, Moves.SUPERSONIC ],
[ 24, Moves.BUBBLE_BEAM ], [ 24, Moves.BUBBLE_BEAM ],
@ -8473,7 +8473,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 54, Moves.AQUA_RING ], [ 54, Moves.AQUA_RING ],
[ 61, Moves.DIVE ], [ 61, Moves.DIVE ],
[ 69, Moves.RAIN_DANCE ], [ 69, Moves.RAIN_DANCE ],
[ 76, Moves.TAKE_HEART ], [ 76, Moves.HEART_SWAP ],
], ],
[Species.DARKRAI]: [ [Species.DARKRAI]: [
[ 1, Moves.DISABLE ], [ 1, Moves.DISABLE ],

View File

@ -1,4 +0,0 @@
export enum MoneyFormat {
NORMAL,
ABBREVIATED
}

View File

@ -2316,8 +2316,6 @@ 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_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. $@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?`, $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. // 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; export const PGFmiscDialogue: SimpleTranslationEntries = PGMmiscDialogue;

View File

@ -5,36 +5,36 @@ export const biome: SimpleTranslationEntries = {
"TOWN": "城镇", "TOWN": "城镇",
"PLAINS": "平原", "PLAINS": "平原",
"GRASS": "草地", "GRASS": "草地",
"TALL_GRASS": "高草", "TALL_GRASS": "高草",
"METROPOLIS": "市", "METROPOLIS": "市",
"FOREST": "森林", "FOREST": "森林",
"SEA": "海洋", "SEA": "海洋",
"SWAMP": "沼泽", "SWAMP": "湿地",
"BEACH": "沙滩", "BEACH": "沙滩",
"LAKE": "湖泊", "LAKE": "湖泊",
"SEABED": "海底", "SEABED": "海底",
"MOUNTAIN": "山脉", "MOUNTAIN": "山脉",
"BADLANDS": "不毛之地", "BADLANDS": "地",
"CAVE": "洞窟", "CAVE": "洞窟",
"DESERT": "沙漠", "DESERT": "沙漠",
"ICE_CAVE": "窟", "ICE_CAVE": "冰窟",
"MEADOW": "花丛", "MEADOW": "草原",
"POWER_PLANT": "发电厂", "POWER_PLANT": "发电厂",
"VOLCANO": "火山", "VOLCANO": "火山",
"GRAVEYARD": "墓地", "GRAVEYARD": "墓地",
"DOJO": "道场", "DOJO": "道场",
"FACTORY": "工厂", "FACTORY": "工厂",
"RUINS": "遗迹", "RUINS": "遗迹",
"WASTELAND": "荒地龙巢", "WASTELAND": "荒地",
"ABYSS": "幽谷深渊", "ABYSS": "深穴",
"SPACE": "太空", "SPACE": "太空",
"CONSTRUCTION_SITE": "工地", "CONSTRUCTION_SITE": "工地",
"JUNGLE": "丛林", "JUNGLE": "丛林",
"FAIRY_CAVE": "妖精洞窟", "FAIRY_CAVE": "仙洞",
"TEMPLE": "神殿", "TEMPLE": "寺庙",
"SLUM": "陋巷", "SLUM": "陋巷",
"SNOWY_FOREST": "冰雪森林", "SNOWY_FOREST": "雪原",
"ISLAND": "岛屿", "ISLAND": "岛屿",
"LABORATORY": "研究所", "LABORATORY": "实验室",
"END": "???", "END": "???",
} as const; } as const;

View File

@ -12,7 +12,7 @@ import { Stat } from "./data/pokemon-stat";
import { PokeballCounts } from "./battle-scene"; import { PokeballCounts } from "./battle-scene";
import { PokeballType } from "./data/pokeball"; import { PokeballType } from "./data/pokeball";
import {TimeOfDay} from "#app/data/enums/time-of-day"; import {TimeOfDay} from "#app/data/enums/time-of-day";
import { Gender } from "./data/gender"; import {Gender} from "pokenode-ts";
/** /**
* Overrides for testing different in game situations * Overrides for testing different in game situations

View File

@ -2315,12 +2315,6 @@ export class BattleEndPhase extends BattlePhase {
this.scene.gameData.gameStats.highestEndlessWave = this.scene.currentBattle.waveIndex + 1; 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()) { for (const pokemon of this.scene.getField()) {
if (pokemon) { if (pokemon) {
pokemon.resetBattleSummonData(); pokemon.resetBattleSummonData();
@ -3893,9 +3887,7 @@ export class GameOverPhase extends BattlePhase {
this.victory = true; this.victory = true;
} }
if (this.victory && this.scene.gameMode.isEndless) { if (this.victory || !this.scene.enableRetries) {
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(); this.handleGameOver();
} else { } else {
this.scene.ui.showText("Would you like to retry from the start of the battle?", null, () => { this.scene.ui.showText("Would you like to retry from the start of the battle?", null, () => {

View File

@ -5,7 +5,6 @@ import BattleScene from "../battle-scene";
import { hasTouchscreen } from "../touch-controls"; import { hasTouchscreen } from "../touch-controls";
import { updateWindowType } from "../ui/ui-theme"; import { updateWindowType } from "../ui/ui-theme";
import { PlayerGender } from "./game-data"; import { PlayerGender } from "./game-data";
import { MoneyFormat } from "../enums/money-format";
export enum Setting { export enum Setting {
Game_Speed = "GAME_SPEED", Game_Speed = "GAME_SPEED",
@ -18,7 +17,6 @@ export enum Setting {
Window_Type = "WINDOW_TYPE", Window_Type = "WINDOW_TYPE",
Tutorials = "TUTORIALS", Tutorials = "TUTORIALS",
Enable_Retries = "ENABLE_RETRIES", Enable_Retries = "ENABLE_RETRIES",
Money_Format = "MONEY_FORMAT",
Sprite_Set = "SPRITE_SET", Sprite_Set = "SPRITE_SET",
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",
@ -52,7 +50,6 @@ export const settingOptions: SettingOptions = {
[Setting.Window_Type]: new Array(5).fill(null).map((_, i) => (i + 1).toString()), [Setting.Window_Type]: new Array(5).fill(null).map((_, i) => (i + 1).toString()),
[Setting.Tutorials]: ["Off", "On"], [Setting.Tutorials]: ["Off", "On"],
[Setting.Enable_Retries]: ["Off", "On"], [Setting.Enable_Retries]: ["Off", "On"],
[Setting.Money_Format]: ["Normal", "Abbreviated"],
[Setting.Sprite_Set]: ["Consistent", "Mixed Animated"], [Setting.Sprite_Set]: ["Consistent", "Mixed Animated"],
[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"],
@ -78,7 +75,6 @@ export const settingDefaults: SettingDefaults = {
[Setting.Window_Type]: 0, [Setting.Window_Type]: 0,
[Setting.Tutorials]: 1, [Setting.Tutorials]: 1,
[Setting.Enable_Retries]: 0, [Setting.Enable_Retries]: 0,
[Setting.Money_Format]: 0,
[Setting.Sprite_Set]: 0, [Setting.Sprite_Set]: 0,
[Setting.Move_Animations]: 1, [Setting.Move_Animations]: 1,
[Setting.Show_Stats_on_Level_Up]: 1, [Setting.Show_Stats_on_Level_Up]: 1,
@ -127,17 +123,6 @@ export function setSetting(scene: BattleScene, setting: Setting, value: integer)
case Setting.Enable_Retries: case Setting.Enable_Retries:
scene.enableRetries = settingOptions[setting][value] === "On"; scene.enableRetries = settingOptions[setting][value] === "On";
break; 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: case Setting.Sprite_Set:
scene.experimentalSprites = !!value; scene.experimentalSprites = !!value;
if (value) { if (value) {