Merge branch 'beta' into internal-pokedex

This commit is contained in:
Wlowscha 2025-01-18 00:19:43 +01:00 committed by GitHub
commit 0efad1676b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 107 additions and 37 deletions

Binary file not shown.

View File

@ -869,6 +869,7 @@
"198": [0, 1, 1], "198": [0, 1, 1],
"203": [0, 1, 1], "203": [0, 1, 1],
"207": [0, 1, 1], "207": [0, 1, 1],
"212": [1, 1, 1],
"215": [0, 1, 1], "215": [0, 1, 1],
"217": [1, 1, 1], "217": [1, 1, 1],
"229": [0, 1, 1], "229": [0, 1, 1],
@ -1778,6 +1779,7 @@
"198": [0, 1, 1], "198": [0, 1, 1],
"203": [0, 1, 1], "203": [0, 1, 1],
"207": [0, 1, 1], "207": [0, 1, 1],
"212": [1, 1, 1],
"215": [0, 1, 1], "215": [0, 1, 1],
"217": [1, 1, 1], "217": [1, 1, 1],
"229": [0, 1, 1], "229": [0, 1, 1],

View File

@ -0,0 +1,41 @@
{
"0": {
"632929": "215a2d",
"f76b6b": "8cce73",
"a52929": "2f794e",
"101010": "101010",
"d63a3a": "4a9c53",
"9494a5": "9494a5",
"ffffff": "ffffff",
"b5b5ce": "b5b5ce",
"3a3a4a": "3a3a4a",
"9c6b21": "9c6b21",
"dec510": "dec510"
},
"1": {
"632929": "2f2962",
"f76b6b": "639cf7",
"a52929": "29429c",
"101010": "101010",
"d63a3a": "4263ef",
"9494a5": "6262a4",
"ffffff": "ffffff",
"b5b5ce": "b5b5ce",
"3a3a4a": "3c3c50",
"9c6b21": "131387",
"dec510": "10bdde"
},
"2": {
"632929": "645117",
"f76b6b": "c59f29",
"a52929": "b88619",
"101010": "101010",
"d63a3a": "ffca2a",
"9494a5": "3c4543",
"ffffff": "ffffff",
"b5b5ce": "b5b5ce",
"3a3a4a": "282d2c",
"9c6b21": "9c6b21",
"dec510": "dec510"
}
}

View File

@ -0,0 +1,41 @@
{
"0": {
"632929": "215a2d",
"f76b6b": "8cce73",
"101010": "101010",
"3a3a4a": "3a3a4a",
"ffffff": "ffffff",
"d63a3a": "4a9c53",
"b5b5ce": "b5b5ce",
"9494a5": "9494a5",
"a52929": "2f794e",
"dec510": "dec510",
"9c6b21": "9c6b21"
},
"1": {
"632929": "2f2962",
"f76b6b": "639cf7",
"101010": "101010",
"3a3a4a": "3c3c50",
"ffffff": "ffffff",
"d63a3a": "4263ef",
"b5b5ce": "b5b5ce",
"9494a5": "6262a4",
"a52929": "29429c",
"dec510": "10bdde",
"9c6b21": "131387"
},
"2": {
"632929": "645117",
"f76b6b": "c59f29",
"101010": "101010",
"3a3a4a": "282d2c",
"ffffff": "ffffff",
"d63a3a": "ffca2a",
"b5b5ce": "b5b5ce",
"9494a5": "3c4543",
"a52929": "b88619",
"dec510": "dec510",
"9c6b21": "9c6b21"
}
}

View File

@ -363,28 +363,30 @@ export default class BattleScene extends SceneBase {
/** /**
* Load the variant assets for the given sprite and stores them in {@linkcode variantColorCache} * Load the variant assets for the given sprite and stores them in {@linkcode variantColorCache}
*/ */
loadPokemonVariantAssets(spriteKey: string, fileRoot: string, variant?: Variant) { public async loadPokemonVariantAssets(spriteKey: string, fileRoot: string, variant?: Variant): Promise<void> {
const useExpSprite = this.experimentalSprites && this.hasExpSprite(spriteKey); const useExpSprite = this.experimentalSprites && this.hasExpSprite(spriteKey);
if (useExpSprite) { if (useExpSprite) {
fileRoot = `exp/${fileRoot}`; fileRoot = `exp/${fileRoot}`;
} }
let variantConfig = variantData; let variantConfig = variantData;
fileRoot.split("/").map(p => variantConfig ? variantConfig = variantConfig[p] : null); fileRoot.split("/").map((p) => (variantConfig ? (variantConfig = variantConfig[p]) : null));
const variantSet = variantConfig as VariantSet; const variantSet = variantConfig as VariantSet;
if (variantSet && (variant !== undefined && variantSet[variant] === 1)) {
const populateVariantColors = (key: string): Promise<void> => { return new Promise<void>((resolve) => {
return new Promise(resolve => { if (variantSet && variant !== undefined && variantSet[variant] === 1) {
if (variantColorCache.hasOwnProperty(key)) { if (variantColorCache.hasOwnProperty(spriteKey)) {
return resolve(); return resolve();
} }
this.cachedFetch(`./images/pokemon/variant/${fileRoot}.json`).then(res => res.json()).then(c => { this.cachedFetch(`./images/pokemon/variant/${fileRoot}.json`)
variantColorCache[key] = c; .then((res) => res.json())
.then((c) => {
variantColorCache[spriteKey] = c;
resolve(); resolve();
}); });
}); } else {
}; resolve();
populateVariantColors(spriteKey); }
} });
} }
async preload() { async preload() {

View File

@ -51,9 +51,7 @@ export const speciesStarterCosts = {
[Species.SANDSHREW]: 2, [Species.SANDSHREW]: 2,
[Species.NIDORAN_F]: 3, [Species.NIDORAN_F]: 3,
[Species.NIDORAN_M]: 3, [Species.NIDORAN_M]: 3,
[Species.CLEFAIRY]: 3,
[Species.VULPIX]: 3, [Species.VULPIX]: 3,
[Species.JIGGLYPUFF]: 2,
[Species.ZUBAT]: 3, [Species.ZUBAT]: 3,
[Species.ODDISH]: 3, [Species.ODDISH]: 3,
[Species.PARAS]: 2, [Species.PARAS]: 2,
@ -84,22 +82,15 @@ export const speciesStarterCosts = {
[Species.VOLTORB]: 2, [Species.VOLTORB]: 2,
[Species.EXEGGCUTE]: 3, [Species.EXEGGCUTE]: 3,
[Species.CUBONE]: 3, [Species.CUBONE]: 3,
[Species.HITMONLEE]: 4,
[Species.HITMONCHAN]: 4,
[Species.LICKITUNG]: 3, [Species.LICKITUNG]: 3,
[Species.KOFFING]: 2, [Species.KOFFING]: 2,
[Species.RHYHORN]: 4, [Species.RHYHORN]: 4,
[Species.CHANSEY]: 3,
[Species.TANGELA]: 3, [Species.TANGELA]: 3,
[Species.KANGASKHAN]: 4, [Species.KANGASKHAN]: 4,
[Species.HORSEA]: 3, [Species.HORSEA]: 3,
[Species.GOLDEEN]: 2, [Species.GOLDEEN]: 2,
[Species.STARYU]: 3, [Species.STARYU]: 3,
[Species.MR_MIME]: 3,
[Species.SCYTHER]: 5, [Species.SCYTHER]: 5,
[Species.JYNX]: 4,
[Species.ELECTABUZZ]: 4,
[Species.MAGMAR]: 4,
[Species.PINSIR]: 4, [Species.PINSIR]: 4,
[Species.TAUROS]: 4, [Species.TAUROS]: 4,
[Species.MAGIKARP]: 4, [Species.MAGIKARP]: 4,
@ -110,7 +101,6 @@ export const speciesStarterCosts = {
[Species.OMANYTE]: 3, [Species.OMANYTE]: 3,
[Species.KABUTO]: 3, [Species.KABUTO]: 3,
[Species.AERODACTYL]: 5, [Species.AERODACTYL]: 5,
[Species.SNORLAX]: 5,
[Species.ARTICUNO]: 5, [Species.ARTICUNO]: 5,
[Species.ZAPDOS]: 6, [Species.ZAPDOS]: 6,
[Species.MOLTRES]: 6, [Species.MOLTRES]: 6,
@ -132,8 +122,6 @@ export const speciesStarterCosts = {
[Species.TOGEPI]: 3, [Species.TOGEPI]: 3,
[Species.NATU]: 2, [Species.NATU]: 2,
[Species.MAREEP]: 2, [Species.MAREEP]: 2,
[Species.MARILL]: 4,
[Species.SUDOWOODO]: 3,
[Species.HOPPIP]: 2, [Species.HOPPIP]: 2,
[Species.AIPOM]: 2, [Species.AIPOM]: 2,
[Species.SUNKERN]: 1, [Species.SUNKERN]: 1,
@ -142,7 +130,6 @@ export const speciesStarterCosts = {
[Species.MURKROW]: 3, [Species.MURKROW]: 3,
[Species.MISDREAVUS]: 2, [Species.MISDREAVUS]: 2,
[Species.UNOWN]: 1, [Species.UNOWN]: 1,
[Species.WOBBUFFET]: 2,
[Species.GIRAFARIG]: 3, [Species.GIRAFARIG]: 3,
[Species.PINECO]: 2, [Species.PINECO]: 2,
[Species.DUNSPARCE]: 3, [Species.DUNSPARCE]: 3,
@ -158,7 +145,6 @@ export const speciesStarterCosts = {
[Species.CORSOLA]: 2, [Species.CORSOLA]: 2,
[Species.REMORAID]: 2, [Species.REMORAID]: 2,
[Species.DELIBIRD]: 2, [Species.DELIBIRD]: 2,
[Species.MANTINE]: 3,
[Species.SKARMORY]: 4, [Species.SKARMORY]: 4,
[Species.HOUNDOUR]: 3, [Species.HOUNDOUR]: 3,
[Species.PHANPY]: 3, [Species.PHANPY]: 3,
@ -206,7 +192,6 @@ export const speciesStarterCosts = {
[Species.MINUN]: 2, [Species.MINUN]: 2,
[Species.VOLBEAT]: 2, [Species.VOLBEAT]: 2,
[Species.ILLUMISE]: 2, [Species.ILLUMISE]: 2,
[Species.ROSELIA]: 3,
[Species.GULPIN]: 1, [Species.GULPIN]: 1,
[Species.CARVANHA]: 3, [Species.CARVANHA]: 3,
[Species.WAILMER]: 2, [Species.WAILMER]: 2,
@ -232,7 +217,6 @@ export const speciesStarterCosts = {
[Species.SHUPPET]: 2, [Species.SHUPPET]: 2,
[Species.DUSKULL]: 3, [Species.DUSKULL]: 3,
[Species.TROPIUS]: 3, [Species.TROPIUS]: 3,
[Species.CHIMECHO]: 3,
[Species.ABSOL]: 4, [Species.ABSOL]: 4,
[Species.WYNAUT]: 2, [Species.WYNAUT]: 2,
[Species.SNORUNT]: 2, [Species.SNORUNT]: 2,
@ -543,7 +527,6 @@ export const speciesStarterCosts = {
[Species.GALAR_PONYTA]: 2, [Species.GALAR_PONYTA]: 2,
[Species.GALAR_SLOWPOKE]: 3, [Species.GALAR_SLOWPOKE]: 3,
[Species.GALAR_FARFETCHD]: 3, [Species.GALAR_FARFETCHD]: 3,
[Species.GALAR_MR_MIME]: 3,
[Species.GALAR_ARTICUNO]: 6, [Species.GALAR_ARTICUNO]: 6,
[Species.GALAR_ZAPDOS]: 6, [Species.GALAR_ZAPDOS]: 6,
[Species.GALAR_MOLTRES]: 6, [Species.GALAR_MOLTRES]: 6,

View File

@ -516,8 +516,7 @@ export abstract class PokemonSpeciesForm {
globalScene.anims.get(spriteKey).frameRate = 10; globalScene.anims.get(spriteKey).frameRate = 10;
} }
const spritePath = this.getSpriteAtlasPath(female, formIndex, shiny, variant).replace("variant/", "").replace(/_[1-3]$/, ""); const spritePath = this.getSpriteAtlasPath(female, formIndex, shiny, variant).replace("variant/", "").replace(/_[1-3]$/, "");
globalScene.loadPokemonVariantAssets(spriteKey, spritePath, variant); globalScene.loadPokemonVariantAssets(spriteKey, spritePath, variant).then(() => resolve());
resolve();
}); });
if (startLoad) { if (startLoad) {
if (!globalScene.load.isLoading()) { if (!globalScene.load.isLoading()) {

View File

@ -215,11 +215,12 @@ export default class MysteryEncounterIntroVisuals extends Phaser.GameObjects.Con
resolve(); resolve();
} }
const shinyPromises: Promise<void>[] = [];
this.spriteConfigs.forEach((config) => { this.spriteConfigs.forEach((config) => {
if (config.isPokemon) { if (config.isPokemon) {
globalScene.loadPokemonAtlas(config.spriteKey, config.fileRoot); globalScene.loadPokemonAtlas(config.spriteKey, config.fileRoot);
if (config.isShiny) { if (config.isShiny) {
globalScene.loadPokemonVariantAssets(config.spriteKey, config.fileRoot, config.variant); shinyPromises.push(globalScene.loadPokemonVariantAssets(config.spriteKey, config.fileRoot, config.variant));
} }
} else if (config.isItem) { } else if (config.isItem) {
globalScene.loadAtlas("items", ""); globalScene.loadAtlas("items", "");
@ -254,7 +255,7 @@ export default class MysteryEncounterIntroVisuals extends Phaser.GameObjects.Con
return true; return true;
}); });
resolve(); Promise.all(shinyPromises).then(() => resolve());
}); });
if (!globalScene.load.isLoading()) { if (!globalScene.load.isLoading()) {

View File

@ -322,6 +322,7 @@ export class LoadingScene extends SceneBase {
this.loadSe("pb_move"); this.loadSe("pb_move");
this.loadSe("pb_catch"); this.loadSe("pb_catch");
this.loadSe("pb_lock"); this.loadSe("pb_lock");
this.loadSe("crit_throw");
this.loadSe("pb_tray_enter"); this.loadSe("pb_tray_enter");
this.loadSe("pb_tray_ball"); this.loadSe("pb_tray_ball");

View File

@ -64,7 +64,7 @@ export class AttemptCapturePhase extends PokemonPhase {
this.pokeball.setOrigin(0.5, 0.625); this.pokeball.setOrigin(0.5, 0.625);
globalScene.field.add(this.pokeball); globalScene.field.add(this.pokeball);
globalScene.playSound("se/pb_throw", isCritical ? { rate: 0.2 } : undefined); // Crit catch throws are higher pitched globalScene.playSound(isCritical ? "se/crit_throw" : "se/pb_throw");
globalScene.time.delayedCall(300, () => { globalScene.time.delayedCall(300, () => {
globalScene.field.moveBelow(this.pokeball as Phaser.GameObjects.GameObject, pokemon); globalScene.field.moveBelow(this.pokeball as Phaser.GameObjects.GameObject, pokemon);
}); });

View File

@ -365,7 +365,7 @@ export const achvs = {
FRESH_START: new ChallengeAchv("FRESH_START", "", "FRESH_START.description", "reviver_seed", 100, (c) => c instanceof FreshStartChallenge && c.value > 0 && !globalScene.gameMode.challenges.some(c => [ Challenges.INVERSE_BATTLE, Challenges.FLIP_STAT ].includes(c.id) && c.value > 0)), FRESH_START: new ChallengeAchv("FRESH_START", "", "FRESH_START.description", "reviver_seed", 100, (c) => c instanceof FreshStartChallenge && c.value > 0 && !globalScene.gameMode.challenges.some(c => [ Challenges.INVERSE_BATTLE, Challenges.FLIP_STAT ].includes(c.id) && c.value > 0)),
INVERSE_BATTLE: new ChallengeAchv("INVERSE_BATTLE", "", "INVERSE_BATTLE.description", "inverse", 100, (c) => c instanceof InverseBattleChallenge && c.value > 0), INVERSE_BATTLE: new ChallengeAchv("INVERSE_BATTLE", "", "INVERSE_BATTLE.description", "inverse", 100, (c) => c instanceof InverseBattleChallenge && c.value > 0),
FLIP_STATS: new ChallengeAchv("FLIP_STATS", "", "FLIP_STATS.description", "dubious_disc", 100, (c) => c instanceof FlipStatChallenge && c.value > 0), FLIP_STATS: new ChallengeAchv("FLIP_STATS", "", "FLIP_STATS.description", "dubious_disc", 100, (c) => c instanceof FlipStatChallenge && c.value > 0),
FLIP_INVERSE: new ChallengeAchv("FLIP_INVERSE", "", "FLIP_INVERSE.description", "cracked_pot", 100, (c) => c instanceof FlipStatChallenge && c.value > 0 && globalScene.gameMode.challenges.every(c => [ Challenges.INVERSE_BATTLE, Challenges.FLIP_STAT ].includes(c.id) && c.value > 0)), FLIP_INVERSE: new ChallengeAchv("FLIP_INVERSE", "", "FLIP_INVERSE.description", "cracked_pot", 100, (c) => c instanceof FlipStatChallenge && c.value > 0 && globalScene.gameMode.challenges.every(c => [ Challenges.INVERSE_BATTLE, Challenges.FLIP_STAT ].includes(c.id) && c.value > 0)).setSecret(),
BREEDERS_IN_SPACE: new Achv("BREEDERS_IN_SPACE", "", "BREEDERS_IN_SPACE.description", "moon_stone", 50).setSecret(), BREEDERS_IN_SPACE: new Achv("BREEDERS_IN_SPACE", "", "BREEDERS_IN_SPACE.description", "moon_stone", 50).setSecret(),
}; };