Hotfix 1.10.1 to main

This commit is contained in:
damocleas 2025-08-22 22:13:44 -04:00 committed by GitHub
commit 2869e85f78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 19 additions and 12 deletions

View File

@ -1,7 +1,7 @@
{
"name": "pokemon-rogue-battle",
"private": true,
"version": "1.10.0",
"version": "1.10.1",
"type": "module",
"scripts": {
"start": "vite",

View File

@ -53,6 +53,12 @@ export const defaultStarterSpecies: SpeciesId[] = [
SpeciesId.QUAXLY,
];
export const defaultStarterSpeciesAndEvolutions: SpeciesId[] = defaultStarterSpecies.flatMap(id => [
id,
(id + 1) as SpeciesId,
(id + 2) as SpeciesId,
]);
export const saveKey = "x0i2O7WRiANTqPmZ"; // Temporary; secure encryption is not yet necessary
/**

View File

@ -1,6 +1,6 @@
import type { FixedBattleConfig } from "#app/battle";
import { getRandomTrainerFunc } from "#app/battle";
import { defaultStarterSpecies } from "#app/constants";
import { defaultStarterSpeciesAndEvolutions } from "#app/constants";
import { speciesStarterCosts } from "#balance/starters";
import type { PokemonSpecies } from "#data/pokemon-species";
import { AbilityAttr } from "#enums/ability-attr";
@ -797,7 +797,7 @@ export class FreshStartChallenge extends Challenge {
}
applyStarterChoice(pokemon: PokemonSpecies, valid: BooleanHolder): boolean {
if (this.value === 1 && !defaultStarterSpecies.includes(pokemon.speciesId)) {
if (this.value === 1 && !defaultStarterSpeciesAndEvolutions.includes(pokemon.speciesId)) {
valid.value = false;
return true;
}

View File

@ -90,7 +90,7 @@ export class Trainer extends Phaser.GameObjects.Container {
[this.name, this.partnerName] = this.name.split(" & ");
}
} else {
const partnerGenderKey = i18next.exists(`${classKey}.fenale`) ? ".fenale" : "";
const partnerGenderKey = i18next.exists(`${classKey}.female`) ? ".female" : "";
[this.partnerNameKey, this.partnerName] = getRandomLocaleEntry(`${classKey}${partnerGenderKey}`);
}
}

View File

@ -279,7 +279,7 @@ function initGreatModifierPool() {
new WeightedModifierType(modifierTypes.DIRE_HIT, 4),
new WeightedModifierType(modifierTypes.SUPER_LURE, lureWeightFunc(15, 4)),
new WeightedModifierType(modifierTypes.NUGGET, skipInLastClassicWaveOrDefault(5)),
new WeightedModifierType(modifierTypes.SPECIES_STAT_BOOSTER, 4),
new WeightedModifierType(modifierTypes.SPECIES_STAT_BOOSTER, 2),
new WeightedModifierType(
modifierTypes.EVOLUTION_ITEM,
() => {

View File

@ -743,7 +743,7 @@ export class EggGachaUiHandler extends MessageUiHandler {
if (!freePulls && globalScene.gameData.eggs.length + pulls > 99) {
errorKey = "egg:tooManyEggs";
} else if (!freePulls && !globalScene.gameData.voucherCounts[voucherType]) {
} else if (!freePulls && globalScene.gameData.voucherCounts[voucherType] < vouchersConsumed) {
errorKey = "egg:notEnoughVouchers";
}

View File

@ -2391,6 +2391,10 @@ export class StarterSelectUiHandler extends MessageUiHandler {
const newVariant = starterAttributes.variant
? (starterAttributes.variant as Variant)
: newProps.variant;
starterAttributes.shiny = true;
originalStarterAttributes.shiny = true;
starterAttributes.variant = newVariant;
originalStarterAttributes.variant = newVariant;
this.setSpeciesDetails(this.lastSpecies, {
shiny: true,
variant: newVariant,
@ -2400,9 +2404,6 @@ export class StarterSelectUiHandler extends MessageUiHandler {
// Cycle tint based on current sprite tint
const tint = getVariantTint(newVariant);
this.pokemonShinyIcon.setFrame(getVariantIcon(newVariant)).setTint(tint).setVisible(true);
starterAttributes.shiny = true;
originalStarterAttributes.shiny = true;
} else {
// If shiny, we update the variant
let newVariant = props.variant;
@ -2429,14 +2430,14 @@ export class StarterSelectUiHandler extends MessageUiHandler {
originalStarterAttributes.variant = newVariant;
if (this.speciesStarterDexEntry!.caughtAttr & DexAttr.NON_SHINY && newVariant <= props.variant) {
// If we have run out of variants, go back to non shiny
starterAttributes.shiny = false;
originalStarterAttributes.shiny = false;
this.setSpeciesDetails(this.lastSpecies, {
shiny: false,
variant: 0,
});
this.pokemonShinyIcon.setVisible(false);
success = true;
starterAttributes.shiny = false;
originalStarterAttributes.shiny = false;
} else {
// If going to a higher variant, or only shiny forms are caught, go to next variant
this.setSpeciesDetails(this.lastSpecies, {

View File

@ -12,6 +12,6 @@ import i18next from "i18next";
* not supporting arrays in any capacity.
*/
export function getRandomLocaleEntry(key: string): [key: string, value: string] {
const keyName = `${key}.${randSeedItem(Object.keys(i18next.t("key", { returnObjects: true })))}`;
const keyName = `${key}.${randSeedItem(Object.keys(i18next.t(key, { returnObjects: true })))}`;
return [keyName, i18next.t(keyName)];
}