mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-08 08:29:37 +02:00
Merge branch 'beta' into clean-up-move-info-overlay
This commit is contained in:
commit
760f366f1e
@ -30,19 +30,19 @@
|
||||
"@biomejs/biome": "2.0.0",
|
||||
"@ls-lint/ls-lint": "2.3.1",
|
||||
"@types/jsdom": "^21.1.7",
|
||||
"@types/node": "^22.16.3",
|
||||
"@types/node": "^22.16.5",
|
||||
"@vitest/coverage-istanbul": "^3.2.4",
|
||||
"@vitest/expect": "^3.2.4",
|
||||
"chalk": "^5.4.1",
|
||||
"dependency-cruiser": "^16.10.4",
|
||||
"inquirer": "^12.7.0",
|
||||
"inquirer": "^12.8.2",
|
||||
"jsdom": "^26.1.0",
|
||||
"lefthook": "^1.12.2",
|
||||
"msw": "^2.10.4",
|
||||
"phaser3spectorjs": "^0.0.8",
|
||||
"typedoc": "^0.28.7",
|
||||
"typedoc": "^0.28.8",
|
||||
"typescript": "^5.8.3",
|
||||
"vite": "^6.3.5",
|
||||
"vite": "^7.0.6",
|
||||
"vite-tsconfig-paths": "^5.1.4",
|
||||
"vitest": "^3.2.4",
|
||||
"vitest-canvas-mock": "^0.3.3"
|
||||
|
918
pnpm-lock.yaml
918
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@ export interface IllusionData {
|
||||
/** The name of pokemon featured in the illusion */
|
||||
name: string;
|
||||
/** The nickname of the pokemon featured in the illusion */
|
||||
nickname: string;
|
||||
nickname?: string;
|
||||
/** Whether the pokemon featured in the illusion is shiny or not */
|
||||
shiny: boolean;
|
||||
/** The variant of the pokemon featured in the illusion */
|
||||
|
@ -39,6 +39,7 @@ import { addPokemonDataToDexAndValidateAchievements } from "#mystery-encounters/
|
||||
import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter";
|
||||
import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter";
|
||||
import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option";
|
||||
import { PartySizeRequirement } from "#mystery-encounters/mystery-encounter-requirements";
|
||||
import { PokemonData } from "#system/pokemon-data";
|
||||
import { MusicPreference } from "#system/settings";
|
||||
import type { OptionSelectItem } from "#ui/abstact-option-select-ui-handler";
|
||||
@ -151,7 +152,8 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
|
||||
return true;
|
||||
})
|
||||
.withOption(
|
||||
MysteryEncounterOptionBuilder.newOptionWithMode(MysteryEncounterOptionMode.DEFAULT)
|
||||
MysteryEncounterOptionBuilder.newOptionWithMode(MysteryEncounterOptionMode.DISABLED_OR_DEFAULT)
|
||||
.withSceneRequirement(new PartySizeRequirement([2, 6], true)) // Requires 2 valid party members
|
||||
.withHasDexProgress(true)
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.1.label`,
|
||||
@ -257,7 +259,8 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
|
||||
.build(),
|
||||
)
|
||||
.withOption(
|
||||
MysteryEncounterOptionBuilder.newOptionWithMode(MysteryEncounterOptionMode.DEFAULT)
|
||||
MysteryEncounterOptionBuilder.newOptionWithMode(MysteryEncounterOptionMode.DISABLED_OR_DEFAULT)
|
||||
.withSceneRequirement(new PartySizeRequirement([2, 6], true)) // Requires 2 valid party members
|
||||
.withHasDexProgress(true)
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
|
@ -213,7 +213,11 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
* TODO: Stop treating this like a unique ID and stop treating 0 as no pokemon
|
||||
*/
|
||||
public id: number;
|
||||
public nickname: string;
|
||||
/**
|
||||
* The Pokemon's current nickname, or `undefined` if it currently lacks one.
|
||||
* If omitted, references to this should refer to the default name for this Pokemon's species.
|
||||
*/
|
||||
public nickname?: string;
|
||||
public species: PokemonSpecies;
|
||||
public formIndex: number;
|
||||
public abilityIndex: number;
|
||||
@ -443,7 +447,7 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
getNameToRender(useIllusion = true) {
|
||||
const illusion = this.summonData.illusion;
|
||||
const name = useIllusion ? (illusion?.name ?? this.name) : this.name;
|
||||
const nickname: string = useIllusion ? (illusion?.nickname ?? this.nickname) : this.nickname;
|
||||
const nickname: string | undefined = useIllusion ? illusion?.nickname : this.nickname;
|
||||
try {
|
||||
if (nickname) {
|
||||
return decodeURIComponent(escape(atob(nickname))); // TODO: Remove `atob` and `escape`... eventually...
|
||||
|
@ -93,7 +93,7 @@ describe("Global Trade System - Mystery Encounter", () => {
|
||||
describe("Option 1 - Check Trade Offers", () => {
|
||||
it("should have the correct properties", () => {
|
||||
const option = GlobalTradeSystemEncounter.options[0];
|
||||
expect(option.optionMode).toBe(MysteryEncounterOptionMode.DEFAULT);
|
||||
expect(option.optionMode).toBe(MysteryEncounterOptionMode.DISABLED_OR_DEFAULT);
|
||||
expect(option.dialogue).toBeDefined();
|
||||
expect(option.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.1.label`,
|
||||
@ -154,7 +154,7 @@ describe("Global Trade System - Mystery Encounter", () => {
|
||||
describe("Option 2 - Wonder Trade", () => {
|
||||
it("should have the correct properties", () => {
|
||||
const option = GlobalTradeSystemEncounter.options[1];
|
||||
expect(option.optionMode).toBe(MysteryEncounterOptionMode.DEFAULT);
|
||||
expect(option.optionMode).toBe(MysteryEncounterOptionMode.DISABLED_OR_DEFAULT);
|
||||
expect(option.dialogue).toBeDefined();
|
||||
expect(option.dialogue).toStrictEqual({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
|
Loading…
Reference in New Issue
Block a user