diff --git a/index.html b/index.html
index 91367cf73ec..111464b5e5c 100644
--- a/index.html
+++ b/index.html
@@ -133,7 +133,7 @@
V
-
+
V
diff --git a/package-lock.json b/package-lock.json
index d31469f4a45..453a525581b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "pokemon-rogue-battle",
- "version": "1.7.5",
+ "version": "1.7.6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "pokemon-rogue-battle",
- "version": "1.7.5",
+ "version": "1.7.6",
"hasInstallScript": true,
"dependencies": {
"@material/material-color-utilities": "^0.2.7",
diff --git a/package.json b/package.json
index 1953b886c80..4c9204f60f9 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "pokemon-rogue-battle",
"private": true,
- "version": "1.7.5",
+ "version": "1.7.6",
"type": "module",
"scripts": {
"start": "vite",
diff --git a/public/locales b/public/locales
index b4534f03ba8..0e5c6096ba2 160000
--- a/public/locales
+++ b/public/locales
@@ -1 +1 @@
-Subproject commit b4534f03ba8eb8709486ee967257b6f3725702dd
+Subproject commit 0e5c6096ba26f6b87aed1aab3fe9b0b23f6cbb7b
diff --git a/src/data/move.ts b/src/data/move.ts
index 11ce7069664..677ad9f0ebc 100644
--- a/src/data/move.ts
+++ b/src/data/move.ts
@@ -5236,7 +5236,7 @@ export class CombinedPledgeTypeAttr extends VariableMoveTypeAttr {
return false;
}
- const combinedPledgeMove = user.turnData.combiningPledge;
+ const combinedPledgeMove = user?.turnData?.combiningPledge;
if (!combinedPledgeMove) {
return false;
}
diff --git a/src/system/game-data.ts b/src/system/game-data.ts
index 57e25325ba4..aefc583a98a 100644
--- a/src/system/game-data.ts
+++ b/src/system/game-data.ts
@@ -1645,11 +1645,19 @@ export class GameData {
} else if (formIndex === 3) {
dexEntry.caughtAttr |= globalScene.gameData.getFormAttr(1);
}
- }
- const allFormChanges = pokemonFormChanges.hasOwnProperty(species.speciesId) ? pokemonFormChanges[species.speciesId] : [];
- const toCurrentFormChanges = allFormChanges.filter(f => (f.formKey === formKey));
- if (toCurrentFormChanges.length > 0) {
- dexEntry.caughtAttr |= globalScene.gameData.getFormAttr(0);
+ } else if (pokemon.species.speciesId === Species.ZYGARDE) {
+ if (formIndex === 4) {
+ dexEntry.caughtAttr |= globalScene.gameData.getFormAttr(2);
+ } else if (formIndex === 5) {
+ dexEntry.caughtAttr |= globalScene.gameData.getFormAttr(3);
+ }
+ } else {
+ const allFormChanges = pokemonFormChanges.hasOwnProperty(species.speciesId) ? pokemonFormChanges[species.speciesId] : [];
+ const toCurrentFormChanges = allFormChanges.filter(f => (f.formKey === formKey));
+ if (toCurrentFormChanges.length > 0) {
+ // Needs to do this or Castform can unlock the wrong form, etc.
+ dexEntry.caughtAttr |= globalScene.gameData.getFormAttr(0);
+ }
}
}
diff --git a/src/ui/pokedex-page-ui-handler.ts b/src/ui/pokedex-page-ui-handler.ts
index e9060fb43b6..eee900d411e 100644
--- a/src/ui/pokedex-page-ui-handler.ts
+++ b/src/ui/pokedex-page-ui-handler.ts
@@ -789,6 +789,10 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
const formIndex = otherFormIndex !== undefined ? otherFormIndex : this.formIndex;
const caughtAttr = this.isCaught(species);
+ if (caughtAttr && (!species.forms.length || species.forms.length === 1)) {
+ return true;
+ }
+
const isFormCaught = (caughtAttr & globalScene.gameData.getFormAttr(formIndex ?? 0)) > 0n;
return isFormCaught;
}
@@ -1580,15 +1584,14 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
starterAttributes.variant = newVariant; // store the selected variant
this.savedStarterAttributes.variant = starterAttributes.variant;
- if (newVariant > props.variant) {
- this.setSpeciesDetails(this.species, { variant: newVariant as Variant });
- success = true;
- } else {
+ if ((this.isCaught() & DexAttr.NON_SHINY) && (newVariant <= props.variant)) {
this.setSpeciesDetails(this.species, { shiny: false, variant: 0 });
success = true;
-
starterAttributes.shiny = false;
this.savedStarterAttributes.shiny = starterAttributes.shiny;
+ } else {
+ this.setSpeciesDetails(this.species, { variant: newVariant as Variant });
+ success = true;
}
}
}
@@ -2201,7 +2204,8 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
const isNonShinyCaught = !!(caughtAttr & DexAttr.NON_SHINY);
const isShinyCaught = !!(caughtAttr & DexAttr.SHINY);
- this.canCycleShiny = isNonShinyCaught && isShinyCaught;
+ const caughtVariants = [ DexAttr.DEFAULT_VARIANT, DexAttr.VARIANT_2, DexAttr.VARIANT_3 ].filter(v => caughtAttr & v);
+ this.canCycleShiny = (isNonShinyCaught && isShinyCaught) || (isShinyCaught && caughtVariants.length > 1);
const isMaleCaught = !!(caughtAttr & DexAttr.MALE);
const isFemaleCaught = !!(caughtAttr & DexAttr.FEMALE);
diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts
index ad1bab069c7..34a29411de4 100644
--- a/src/ui/starter-select-ui-handler.ts
+++ b/src/ui/starter-select-ui-handler.ts
@@ -8,6 +8,7 @@ import i18next from "i18next";
import type BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext";
import { starterColors } from "#app/battle-scene";
import { globalScene } from "#app/global-scene";
+import type { Ability } from "#app/data/ability";
import { allAbilities } from "#app/data/ability";
import { speciesEggMoves } from "#app/data/balance/egg-moves";
import { GrowthRate, getGrowthRateColor } from "#app/data/exp";
@@ -2067,20 +2068,20 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
}
} while (newVariant !== props.variant);
starterAttributes.variant = newVariant; // store the selected variant
- // If going to a higher variant, display that
- if (newVariant > props.variant) {
+ if ((this.speciesStarterDexEntry!.caughtAttr & DexAttr.NON_SHINY) && (newVariant <= props.variant)) {
+ // If we have run out of variants, go back to non shiny
+ this.setSpeciesDetails(this.lastSpecies, { shiny: false, variant: 0 });
+ this.pokemonShinyIcon.setVisible(false);
+ success = true;
+ starterAttributes.shiny = false;
+ } else {
+ // If going to a higher variant, or only shiny forms are caught, go to next variant
this.setSpeciesDetails(this.lastSpecies, { variant: newVariant as Variant });
// Cycle tint based on current sprite tint
const tint = getVariantTint(newVariant as Variant);
this.pokemonShinyIcon.setFrame(getVariantIcon(newVariant as Variant));
this.pokemonShinyIcon.setTint(tint);
success = true;
- // If we have run out of variants, go back to non shiny
- } else {
- this.setSpeciesDetails(this.lastSpecies, { shiny: false, variant: 0 });
- this.pokemonShinyIcon.setVisible(false);
- success = true;
- starterAttributes.shiny = false;
}
}
}
@@ -3327,7 +3328,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
const isNonShinyCaught = !!(caughtAttr & DexAttr.NON_SHINY);
const isShinyCaught = !!(caughtAttr & DexAttr.SHINY);
- this.canCycleShiny = isNonShinyCaught && isShinyCaught;
+ const caughtVariants = [ DexAttr.DEFAULT_VARIANT, DexAttr.VARIANT_2, DexAttr.VARIANT_3 ].filter(v => caughtAttr & v);
+ this.canCycleShiny = (isNonShinyCaught && isShinyCaught) || (isShinyCaught && caughtVariants.length > 1);
const isMaleCaught = !!(caughtAttr & DexAttr.MALE);
const isFemaleCaught = !!(caughtAttr & DexAttr.FEMALE);
@@ -3364,7 +3366,12 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
}
if (dexEntry.caughtAttr) {
- const ability = allAbilities[this.lastSpecies.getAbility(abilityIndex!)]; // TODO: is this bang correct?
+ let ability: Ability;
+ if (this.lastSpecies.forms?.length > 1) {
+ ability = allAbilities[this.lastSpecies.forms[formIndex ?? 0].getAbility(abilityIndex!)];
+ } else {
+ ability = allAbilities[this.lastSpecies.getAbility(abilityIndex!)]; // TODO: is this bang correct?
+ }
this.pokemonAbilityText.setText(ability.name);
const isHidden = abilityIndex === (this.lastSpecies.ability2 ? 2 : 1);