diff --git a/src/locales/ca_ES/filter-bar.ts b/src/locales/ca_ES/filter-bar.ts index 1c731d1deaa..ffd227f90ca 100644 --- a/src/locales/ca_ES/filter-bar.ts +++ b/src/locales/ca_ES/filter-bar.ts @@ -8,14 +8,16 @@ export const filterBar: SimpleTranslationEntries = { "miscFilter": "Misc", "sortFilter": "Sort", "all": "All", - "normal": "Normal", + "normal": "Not Shiny", "uncaught": "Uncaught", "passive": "Passive", - "passiveUnlocked": "Passive Unlocked", - "passiveLocked": "Passive Locked", + "passiveUnlocked": "Passive - Yes", + "passiveLocked": "Passive - No", + "passiveUnlockable": "Passive - Can Unlock", "costReduction": "Cost Reduction", - "costReductionUnlocked": "Cost Reduction Unlocked", - "costReductionLocked": "Cost Reduction Locked", + "costReductionUnlocked": "Cost Reduction - Yes", + "costReductionLocked": "Cost Reduction - No", + "costReductionUnlockable": "Cost Reduction - Can Unlock", "favorite": "Favorite", "isFavorite": "Favorite - Yes", "notFavorite": "Favorite - No", @@ -25,6 +27,8 @@ export const filterBar: SimpleTranslationEntries = { "hiddenAbility": "Hidden Ability", "hasHiddenAbility": "Hidden Ability - Yes", "noHiddenAbility": "Hidden Ability - No", + "egg": "Egg", + "eggPurchasable": "Purchasable Egg", "pokerus": "Pokerus", "hasPokerus": "Pokerus - Yes", "noPokerus": "Pokerus - No", diff --git a/src/locales/de/filter-bar.ts b/src/locales/de/filter-bar.ts index 7ed7098820b..10736b226c5 100644 --- a/src/locales/de/filter-bar.ts +++ b/src/locales/de/filter-bar.ts @@ -13,9 +13,11 @@ export const filterBar: SimpleTranslationEntries = { "passive": "Passive", "passiveUnlocked": "Passive freigeschaltet", "passiveLocked": "Passive gesperrt", + "passiveUnlockable": "Passive - Can Unlock", "costReduction": "Cost Reduction", "costReductionUnlocked": "Cost Reduction Unlocked", "costReductionLocked": "Cost Reduction Locked", + "costReductionUnlockable": "Cost Reduction - Can Unlock", "favorite": "Favorite", "isFavorite": "Favorite - Yes", "notFavorite": "Favorite - No", @@ -25,6 +27,8 @@ export const filterBar: SimpleTranslationEntries = { "hiddenAbility": "Hidden Ability", "hasHiddenAbility": "Hidden Ability - Yes", "noHiddenAbility": "Hidden Ability - No", + "egg": "Egg", + "eggPurchasable": "Purchasable Egg", "pokerus": "Pokerus", "hasPokerus": "Pokerus - Yes", "noPokerus": "Pokerus - No", diff --git a/src/locales/en/filter-bar.ts b/src/locales/en/filter-bar.ts index 1dd0c3b2b64..ffd227f90ca 100644 --- a/src/locales/en/filter-bar.ts +++ b/src/locales/en/filter-bar.ts @@ -11,11 +11,13 @@ export const filterBar: SimpleTranslationEntries = { "normal": "Not Shiny", "uncaught": "Uncaught", "passive": "Passive", - "passiveUnlocked": "Passive Unlocked", - "passiveLocked": "Passive Locked", + "passiveUnlocked": "Passive - Yes", + "passiveLocked": "Passive - No", + "passiveUnlockable": "Passive - Can Unlock", "costReduction": "Cost Reduction", - "costReductionUnlocked": "Cost Reduction Unlocked", - "costReductionLocked": "Cost Reduction Locked", + "costReductionUnlocked": "Cost Reduction - Yes", + "costReductionLocked": "Cost Reduction - No", + "costReductionUnlockable": "Cost Reduction - Can Unlock", "favorite": "Favorite", "isFavorite": "Favorite - Yes", "notFavorite": "Favorite - No", @@ -25,6 +27,8 @@ export const filterBar: SimpleTranslationEntries = { "hiddenAbility": "Hidden Ability", "hasHiddenAbility": "Hidden Ability - Yes", "noHiddenAbility": "Hidden Ability - No", + "egg": "Egg", + "eggPurchasable": "Purchasable Egg", "pokerus": "Pokerus", "hasPokerus": "Pokerus - Yes", "noPokerus": "Pokerus - No", diff --git a/src/locales/es/filter-bar.ts b/src/locales/es/filter-bar.ts index b0eae7542ff..e713c10c21b 100644 --- a/src/locales/es/filter-bar.ts +++ b/src/locales/es/filter-bar.ts @@ -13,9 +13,11 @@ export const filterBar: SimpleTranslationEntries = { "passive": "Passive", "passiveUnlocked": "Pasiva Desbloq.", "passiveLocked": "Pasiva Bloq.", + "passiveUnlockable": "Passive - Can Unlock", "costReduction": "Cost Reduction", "costReductionUnlocked": "Cost Reduction Unlocked", "costReductionLocked": "Cost Reduction Locked", + "costReductionUnlockable": "Cost Reduction - Can Unlock", "favorite": "Favorite", "isFavorite": "Favorite - Yes", "notFavorite": "Favorite - No", @@ -25,6 +27,8 @@ export const filterBar: SimpleTranslationEntries = { "hiddenAbility": "Hidden Ability", "hasHiddenAbility": "Hidden Ability - Yes", "noHiddenAbility": "Hidden Ability - No", + "egg": "Egg", + "eggPurchasable": "Purchasable Egg", "pokerus": "Pokerus", "hasPokerus": "Pokerus - Yes", "noPokerus": "Pokerus - No", diff --git a/src/locales/fr/filter-bar.ts b/src/locales/fr/filter-bar.ts index 0c086c8e52c..f3130808f40 100644 --- a/src/locales/fr/filter-bar.ts +++ b/src/locales/fr/filter-bar.ts @@ -13,9 +13,11 @@ export const filterBar: SimpleTranslationEntries = { "passive": "Passif", "passiveUnlocked": "Passif débloqué", "passiveLocked": "Passif verrouillé", + "passiveUnlockable": "Passive - Can Unlock", "costReduction": "Cost Reduction", "costReductionUnlocked": "Cost Reduction Unlocked", "costReductionLocked": "Cost Reduction Locked", + "costReductionUnlockable": "Cost Reduction - Can Unlock", "favorite": "Favorite", "isFavorite": "Favorite - Yes", "notFavorite": "Favorite - No", @@ -25,6 +27,8 @@ export const filterBar: SimpleTranslationEntries = { "hiddenAbility": "Hidden Ability", "hasHiddenAbility": "Hidden Ability - Yes", "noHiddenAbility": "Hidden Ability - No", + "egg": "Egg", + "eggPurchasable": "Purchasable Egg", "pokerus": "Pokerus", "hasPokerus": "Pokerus - Yes", "noPokerus": "Pokerus - No", diff --git a/src/locales/it/filter-bar.ts b/src/locales/it/filter-bar.ts index fff93ad02d4..f956544291d 100644 --- a/src/locales/it/filter-bar.ts +++ b/src/locales/it/filter-bar.ts @@ -13,9 +13,11 @@ export const filterBar: SimpleTranslationEntries = { "passive": "Passive", "passiveUnlocked": "Passiva sbloccata", "passiveLocked": "Passiva bloccata", + "passiveUnlockable": "Passive - Can Unlock", "costReduction": "Cost Reduction", "costReductionUnlocked": "Cost Reduction Unlocked", "costReductionLocked": "Cost Reduction Locked", + "costReductionUnlockable": "Cost Reduction - Can Unlock", "favorite": "Favorite", "isFavorite": "Favorite - Yes", "notFavorite": "Favorite - No", @@ -25,6 +27,8 @@ export const filterBar: SimpleTranslationEntries = { "hiddenAbility": "Hidden Ability", "hasHiddenAbility": "Hidden Ability - Yes", "noHiddenAbility": "Hidden Ability - No", + "egg": "Egg", + "eggPurchasable": "Purchasable Egg", "pokerus": "Pokerus", "hasPokerus": "Pokerus - Yes", "noPokerus": "Pokerus - No", diff --git a/src/locales/ja/filter-bar.ts b/src/locales/ja/filter-bar.ts index 1dd0c3b2b64..ffd227f90ca 100644 --- a/src/locales/ja/filter-bar.ts +++ b/src/locales/ja/filter-bar.ts @@ -11,11 +11,13 @@ export const filterBar: SimpleTranslationEntries = { "normal": "Not Shiny", "uncaught": "Uncaught", "passive": "Passive", - "passiveUnlocked": "Passive Unlocked", - "passiveLocked": "Passive Locked", + "passiveUnlocked": "Passive - Yes", + "passiveLocked": "Passive - No", + "passiveUnlockable": "Passive - Can Unlock", "costReduction": "Cost Reduction", - "costReductionUnlocked": "Cost Reduction Unlocked", - "costReductionLocked": "Cost Reduction Locked", + "costReductionUnlocked": "Cost Reduction - Yes", + "costReductionLocked": "Cost Reduction - No", + "costReductionUnlockable": "Cost Reduction - Can Unlock", "favorite": "Favorite", "isFavorite": "Favorite - Yes", "notFavorite": "Favorite - No", @@ -25,6 +27,8 @@ export const filterBar: SimpleTranslationEntries = { "hiddenAbility": "Hidden Ability", "hasHiddenAbility": "Hidden Ability - Yes", "noHiddenAbility": "Hidden Ability - No", + "egg": "Egg", + "eggPurchasable": "Purchasable Egg", "pokerus": "Pokerus", "hasPokerus": "Pokerus - Yes", "noPokerus": "Pokerus - No", diff --git a/src/locales/ko/filter-bar.ts b/src/locales/ko/filter-bar.ts index 2724b1ea3ac..153f0c1539c 100644 --- a/src/locales/ko/filter-bar.ts +++ b/src/locales/ko/filter-bar.ts @@ -13,9 +13,11 @@ export const filterBar: SimpleTranslationEntries = { "passive": "패시브", "passiveUnlocked": "패시브 해금", "passiveLocked": "패시브 잠김", + "passiveUnlockable": "패시브 해금 가능", "costReduction": "코스트 감소", "costReductionUnlocked": "코스트 감소됨", "costReductionLocked": "코스트 감소 없음", + "costReductionUnlockable": "코스트 감소 가능", "favorite": "즐겨찾기", "isFavorite": "즐겨찾기 등록됨", "notFavorite": "즐겨찾기 제외됨", @@ -25,6 +27,8 @@ export const filterBar: SimpleTranslationEntries = { "hiddenAbility": "숨겨진 특성", "hasHiddenAbility": "숨겨진 특성 보유", "noHiddenAbility": "숨겨진 특성 없음", + "egg": "알", + "eggPurchasable": "알 구매 가능", "pokerus": "포켓러스", "hasPokerus": "포켓러스 감염", "noPokerus": "포켓러스 없음", diff --git a/src/locales/pt_BR/filter-bar.ts b/src/locales/pt_BR/filter-bar.ts index 3ee41c6ead9..d85fa65a536 100644 --- a/src/locales/pt_BR/filter-bar.ts +++ b/src/locales/pt_BR/filter-bar.ts @@ -13,9 +13,11 @@ export const filterBar: SimpleTranslationEntries = { "passive": "Passiva", "passiveUnlocked": "Passiva Desbloqueada", "passiveLocked": "Passiva Bloqueada", + "passiveUnlockable": "Passive - Can Unlock", "costReduction": "Redução de Custo", "costReductionUnlocked": "Redução de Custo Desbloq.", "costReductionLocked": "Redução de Custo Bloq.", + "costReductionUnlockable": "Cost Reduction - Can Unlock", "favorite": "Favorite", "isFavorite": "Favorite - Yes", "notFavorite": "Favorite - No", @@ -25,6 +27,8 @@ export const filterBar: SimpleTranslationEntries = { "hiddenAbility": "Habilidade Oculta", "hasHiddenAbility": "Habilidade Oculta - Sim", "noHiddenAbility": "Habilidade Oculta - Não", + "egg": "Egg", + "eggPurchasable": "Purchasable Egg", "pokerus": "Pokérus", "hasPokerus": "Pokérus - Sim", "noPokerus": "Pokérus - Não", diff --git a/src/locales/zh_CN/filter-bar.ts b/src/locales/zh_CN/filter-bar.ts index 820091af06c..48b56d15071 100644 --- a/src/locales/zh_CN/filter-bar.ts +++ b/src/locales/zh_CN/filter-bar.ts @@ -13,9 +13,11 @@ export const filterBar: SimpleTranslationEntries = { "passive": "被动", "passiveUnlocked": "被动解锁", "passiveLocked": "被动未解锁", + "passiveUnlockable": "Passive - Can Unlock", "costReduction": "费用降低", "costReductionUnlocked": "已降费", "costReductionLocked": "未降费", + "costReductionUnlockable": "Cost Reduction - Can Unlock", "favorite": "Favorite", "isFavorite": "Favorite - Yes", "notFavorite": "Favorite - No", @@ -25,6 +27,8 @@ export const filterBar: SimpleTranslationEntries = { "hiddenAbility": "梦特", "hasHiddenAbility": "有梦特", "noHiddenAbility": "无梦特", + "egg": "Egg", + "eggPurchasable": "Purchasable Egg", "pokerus": "病毒", "hasPokerus": "有病毒", "noPokerus": "无病毒", diff --git a/src/locales/zh_TW/filter-bar.ts b/src/locales/zh_TW/filter-bar.ts index 18c09b629b0..d784b0a6b6a 100644 --- a/src/locales/zh_TW/filter-bar.ts +++ b/src/locales/zh_TW/filter-bar.ts @@ -13,9 +13,11 @@ export const filterBar: SimpleTranslationEntries = { "passive": "被動", "passiveUnlocked": "被動解鎖", "passiveLocked": "被動未解鎖", + "passiveUnlockable": "Passive - Can Unlock", "costReduction": "Cost Reduction", "costReductionUnlocked": "Cost Reduction Unlocked", "costReductionLocked": "Cost Reduction Locked", + "costReductionUnlockable": "Cost Reduction - Can Unlock", "favorite": "Favorite", "isFavorite": "Favorite - Yes", "notFavorite": "Favorite - No", @@ -25,6 +27,8 @@ export const filterBar: SimpleTranslationEntries = { "hiddenAbility": "Hidden Ability", "hasHiddenAbility": "Hidden Ability - Yes", "noHiddenAbility": "Hidden Ability - No", + "egg": "Egg", + "eggPurchasable": "Purchasable Egg", "pokerus": "Pokerus", "hasPokerus": "Pokerus - Yes", "noPokerus": "Pokerus - No", diff --git a/src/ui/dropdown.ts b/src/ui/dropdown.ts index f1723559b57..cfe26570856 100644 --- a/src/ui/dropdown.ts +++ b/src/ui/dropdown.ts @@ -7,7 +7,8 @@ import i18next from "i18next"; export enum DropDownState { ON = 0, OFF = 1, - EXCLUDE = 2 + EXCLUDE = 2, + UNLOCKABLE = 3 } export enum DropDownType { @@ -46,6 +47,7 @@ export class DropDownOption extends Phaser.GameObjects.Container { private onColor = 0x33bbff; private offColor = 0x272727; private excludeColor = 0xff5555; + private unlockableColor = 0xffff00; constructor(scene: SceneBase, val: any, labels: DropDownLabel | DropDownLabel[]) { super(scene); @@ -114,6 +116,9 @@ export class DropDownOption extends Phaser.GameObjects.Container { case DropDownState.EXCLUDE: this.toggle.setTint(this.excludeColor); break; + case DropDownState.UNLOCKABLE: + this.toggle.setTint(this.unlockableColor); + break; } } diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 36e00eed43a..f7ef4b47353 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -445,12 +445,14 @@ export default class StarterSelectUiHandler extends MessageUiHandler { const passiveLabels = [ new DropDownLabel(i18next.t("filterBar:passive"), undefined, DropDownState.OFF), new DropDownLabel(i18next.t("filterBar:passiveUnlocked"), undefined, DropDownState.ON), + new DropDownLabel(i18next.t("filterBar:passiveUnlockable"), undefined, DropDownState.UNLOCKABLE), new DropDownLabel(i18next.t("filterBar:passiveLocked"), undefined, DropDownState.EXCLUDE), ]; const costReductionLabels = [ new DropDownLabel(i18next.t("filterBar:costReduction"), undefined, DropDownState.OFF), new DropDownLabel(i18next.t("filterBar:costReductionUnlocked"), undefined, DropDownState.ON), + new DropDownLabel(i18next.t("filterBar:costReductionUnlockable"), undefined, DropDownState.UNLOCKABLE), new DropDownLabel(i18next.t("filterBar:costReductionLocked"), undefined, DropDownState.EXCLUDE), ]; @@ -477,6 +479,10 @@ export default class StarterSelectUiHandler extends MessageUiHandler { new DropDownLabel(i18next.t("filterBar:hasHiddenAbility"), undefined, DropDownState.ON), new DropDownLabel(i18next.t("filterBar:noHiddenAbility"), undefined, DropDownState.EXCLUDE), ]; + const eggLabels = [ + new DropDownLabel(i18next.t("filterBar:egg"), undefined, DropDownState.OFF), + new DropDownLabel(i18next.t("filterBar:eggPurchasable"), undefined, DropDownState.ON), + ]; const pokerusLabels = [ new DropDownLabel(i18next.t("filterBar:pokerus"), undefined, DropDownState.OFF), new DropDownLabel(i18next.t("filterBar:hasPokerus"), undefined, DropDownState.ON), @@ -485,6 +491,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { new DropDownOption(this.scene, "FAVORITE", favoriteLabels), new DropDownOption(this.scene, "WIN", winLabels), new DropDownOption(this.scene, "HIDDEN_ABILITY", hiddenAbilityLabels), + new DropDownOption(this.scene, "EGG", eggLabels), new DropDownOption(this.scene, "POKERUS", pokerusLabels), ]; this.filterBar.addFilter(DropDownColumn.MISC, i18next.t("filterBar:miscFilter"), new DropDown(this.scene, 0, 0, miscOptions, this.updateStarters, DropDownType.RADIAL)); @@ -1680,37 +1687,35 @@ export default class StarterSelectUiHandler extends MessageUiHandler { }); } - // Same species egg menu option. Only visible if passive is bought - if (passiveAttr & PassiveAttr.UNLOCKED) { - const sameSpeciesEggCost = getSameSpeciesEggCandyCounts(speciesStarters[this.lastSpecies.speciesId]); - options.push({ - label: `x${sameSpeciesEggCost} ${i18next.t("starterSelectUiHandler:sameSpeciesEgg")}`, - handler: () => { - if (this.scene.gameData.eggs.length < 99 && (Overrides.FREE_CANDY_UPGRADE_OVERRIDE || candyCount >= sameSpeciesEggCost)) { - if (!Overrides.FREE_CANDY_UPGRADE_OVERRIDE) { - starterData.candyCount -= sameSpeciesEggCost; - } - this.pokemonCandyCountText.setText(`x${starterData.candyCount}`); - - const egg = new Egg({scene: this.scene, species: this.lastSpecies.speciesId, sourceType: EggSourceType.SAME_SPECIES_EGG}); - egg.addEggToGameData(this.scene); - - this.scene.gameData.saveSystem().then(success => { - if (!success) { - return this.scene.reset(true); - } - }); - ui.setMode(Mode.STARTER_SELECT); - this.scene.playSound("buy"); - - return true; + // Same species egg menu option. + const sameSpeciesEggCost = getSameSpeciesEggCandyCounts(speciesStarters[this.lastSpecies.speciesId]); + options.push({ + label: `x${sameSpeciesEggCost} ${i18next.t("starterSelectUiHandler:sameSpeciesEgg")}`, + handler: () => { + if (this.scene.gameData.eggs.length < 99 && (Overrides.FREE_CANDY_UPGRADE_OVERRIDE || candyCount >= sameSpeciesEggCost)) { + if (!Overrides.FREE_CANDY_UPGRADE_OVERRIDE) { + starterData.candyCount -= sameSpeciesEggCost; } - return false; - }, - item: "candy", - itemArgs: starterColors[this.lastSpecies.speciesId] - }); - } + this.pokemonCandyCountText.setText(`x${starterData.candyCount}`); + + const egg = new Egg({scene: this.scene, species: this.lastSpecies.speciesId, sourceType: EggSourceType.SAME_SPECIES_EGG}); + egg.addEggToGameData(this.scene); + + this.scene.gameData.saveSystem().then(success => { + if (!success) { + return this.scene.reset(true); + } + }); + ui.setMode(Mode.STARTER_SELECT); + this.scene.playSound("buy"); + + return true; + } + return false; + }, + item: "candy", + itemArgs: starterColors[this.lastSpecies.speciesId] + }); options.push({ label: i18next.t("menu:cancel"), handler: () => { @@ -2289,13 +2294,16 @@ export default class StarterSelectUiHandler extends MessageUiHandler { const isCaught = !!(caughtVariants & DexAttr.NON_SHINY); const isUncaught = !isCaught && !isVariantCaught && !isVariant2Caught && !isVariant3Caught; const isPassiveUnlocked = this.scene.gameData.starterData[container.species.speciesId].passiveAttr > 0; + const isPassiveUnlockable = this.isPassiveAvailable(container.species.speciesId) && !isPassiveUnlocked; const isCostReduced = this.scene.gameData.starterData[container.species.speciesId].valueReduction > 0; + const isCostReductionUnlockable = this.isValueReductionAvailable(container.species.speciesId); const isFavorite = this.starterPreferences[container.species.speciesId]?.favorite ?? false; const isWin = this.scene.gameData.starterData[container.species.speciesId].classicWinCount > 0; const isNotWin = this.scene.gameData.starterData[container.species.speciesId].classicWinCount === 0; const isUndefined = this.scene.gameData.starterData[container.species.speciesId].classicWinCount === undefined; const isHA = this.scene.gameData.starterData[container.species.speciesId].abilityAttr & AbilityAttr.ABILITY_HIDDEN; + const isEggPurchasable = this.isSameSpeciesEggAvailable(container.species.speciesId); const fitsGen = this.filterBar.getVals(DropDownColumn.GEN).includes(container.species.generation); @@ -2320,6 +2328,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler { return isPassiveUnlocked; } else if (unlocks.val === "PASSIVE" && unlocks.state === DropDownState.EXCLUDE) { return !isPassiveUnlocked; + } else if (unlocks.val === "PASSIVE" && unlocks.state === DropDownState.UNLOCKABLE) { + return isPassiveUnlockable; } else if (unlocks.val === "PASSIVE" && unlocks.state === DropDownState.OFF) { return true; } @@ -2330,6 +2340,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler { return isCostReduced; } else if (unlocks.val === "COST_REDUCTION" && unlocks.state === DropDownState.EXCLUDE) { return !isCostReduced; + } else if (unlocks.val === "COST_REDUCTION" && unlocks.state === DropDownState.UNLOCKABLE) { + return isCostReductionUnlockable; } else if (unlocks.val === "COST_REDUCTION" && unlocks.state === DropDownState.OFF) { return true; } @@ -2369,6 +2381,16 @@ export default class StarterSelectUiHandler extends MessageUiHandler { } }); + const fitsEgg = this.filterBar.getVals(DropDownColumn.MISC).some(misc => { + if (misc.val === "EGG" && misc.state === DropDownState.ON) { + return isEggPurchasable; + } else if (misc.val === "EGG" && misc.state === DropDownState.EXCLUDE) { + return !isEggPurchasable; + } else if (misc.val === "EGG" && misc.state === DropDownState.OFF) { + return true; + } + }); + const fitsPokerus = this.filterBar.getVals(DropDownColumn.MISC).some(misc => { if (misc.val === "POKERUS" && misc.state === DropDownState.ON) { return this.pokerusSpecies.includes(container.species); @@ -2379,7 +2401,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { } }); - if (fitsGen && fitsType && fitsCaught && fitsPassive && fitsCostReduction && fitsFavorite && fitsWin && fitsHA && fitsPokerus) { + if (fitsGen && fitsType && fitsCaught && fitsPassive && fitsCostReduction && fitsFavorite && fitsWin && fitsHA && fitsEgg && fitsPokerus) { this.filteredStarterContainers.push(container); } });