Compare commits

..

8 Commits

Author SHA1 Message Date
40chyan
4b8c9c87c3
Update zh_CH biome names (#1473) 2024-05-28 01:05:01 -04:00
Madmadness65
b058e10713 Add missing summon text for As One abilities
Just a minor flavor text addition to mirror the canon games.
2024-05-27 23:54:56 -05:00
Adrian T
0d80a045fd
fix gender override (#1469) 2024-05-27 23:59:01 -04:00
Franck TROUILLEZ
99835c27c8
Add setting to change money format (#1261)
* Add setting to change money format

This setting can currently be set either on "normal" or "abbreviated". "normal" will show all the numbers, while "abbreviated" will abbreviate to the most significant numbers and use a suffix to show the power-10.

A new enum has been added for MoneyFormat as well.

* Update src/battle-scene.ts

Co-authored-by: Franck TROUILLEZ <57403591+francktrouillez@users.noreply.github.com>

---------

Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
2024-05-27 22:58:33 -04:00
Xavion3
17e4edeb8d
Fix endless retries (#1465) 2024-05-28 02:36:32 +01:00
Xavion3
970e335fab
Remove endless 5850 crash bug (#1463) 2024-05-28 11:01:13 +10:00
Tempoanon
f64e9e4a0d
Update Phione and Manaphy levelup learnset (#1462) 2024-05-27 19:50:27 -05:00
Daeloth
f957994fe4
Tweaked SSS luck value color (#1457)
Changed the gradient colors in the SSS luck value to something with a little more life
2024-05-27 20:14:16 -04:00
9 changed files with 63 additions and 23 deletions

View File

@ -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({

View File

@ -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)

View File

@ -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 ],

View File

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

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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, () => {

View File

@ -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) {