diff --git a/package.json b/package.json index c48e94deb96..74e98e37f89 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "pokemon-rogue-battle", "private": true, - "version": "1.10.0", + "version": "1.10.1", "type": "module", "scripts": { "start": "vite", diff --git a/src/constants.ts b/src/constants.ts index 17cf08aa7e2..589a091153c 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -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 /** diff --git a/src/data/challenge.ts b/src/data/challenge.ts index 92fa8d4f4a0..3c282e7640e 100644 --- a/src/data/challenge.ts +++ b/src/data/challenge.ts @@ -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; } diff --git a/src/field/trainer.ts b/src/field/trainer.ts index 426f7e0cc1f..acbc8031dbc 100644 --- a/src/field/trainer.ts +++ b/src/field/trainer.ts @@ -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}`); } } diff --git a/src/modifier/init-modifier-pools.ts b/src/modifier/init-modifier-pools.ts index 316d4dae741..3e180846183 100644 --- a/src/modifier/init-modifier-pools.ts +++ b/src/modifier/init-modifier-pools.ts @@ -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, () => { diff --git a/src/ui/egg-gacha-ui-handler.ts b/src/ui/egg-gacha-ui-handler.ts index 0287e0ee7a5..e54ee445aee 100644 --- a/src/ui/egg-gacha-ui-handler.ts +++ b/src/ui/egg-gacha-ui-handler.ts @@ -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"; } diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 848b162042d..25d5277b4c2 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -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, { diff --git a/src/utils/i18n.ts b/src/utils/i18n.ts index 79e289c1f69..24f739fbb44 100644 --- a/src/utils/i18n.ts +++ b/src/utils/i18n.ts @@ -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)]; }