diff --git a/src/ui/abstact-option-select-ui-handler.ts b/src/ui/abstact-option-select-ui-handler.ts index f58eda79bcb..2069f034e89 100644 --- a/src/ui/abstact-option-select-ui-handler.ts +++ b/src/ui/abstact-option-select-ui-handler.ts @@ -2,7 +2,6 @@ import BattleScene from "../battle-scene"; import { TextStyle, addTextObject } from "./text"; import { Mode } from "./ui"; import UiHandler from "./ui-handler"; -import { unlockAll } from "./menu-ui-handler"; import { addWindow } from "./ui-theme"; import * as Utils from "../utils"; import { argbFromRgba } from "@material/material-color-utilities"; @@ -43,9 +42,6 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler { protected scrollCursor: integer = 0; - private konamiIndex: integer = 0; - static readonly konamiCode: Button[] = [Button.UP, Button.UP, Button.DOWN, Button.DOWN, Button.LEFT, Button.RIGHT, Button.LEFT, Button.RIGHT, Button.CANCEL, Button.ACTION]; - private cursorObj: Phaser.GameObjects.Image; constructor(scene: BattleScene, mode?: Mode) { @@ -163,20 +159,6 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler { let playSound = true; - if (ui.getMode() === Mode.TITLE) { - if (button === AbstractOptionSelectUiHandler.konamiCode[this.konamiIndex] && (Utils.isLocal || Utils.isBeta)) { - if (this.konamiIndex !== AbstractOptionSelectUiHandler.konamiCode.length - 1) { - this.konamiIndex += 1; - } else { - unlockAll(this.scene); - this.konamiIndex = 0; - return false; - } - } else { - this.konamiIndex = 0; - } - } - if (button === Button.ACTION || button === Button.CANCEL) { if (this.blockInput) { ui.playError(); diff --git a/src/ui/menu-ui-handler.ts b/src/ui/menu-ui-handler.ts index 5555d1be01c..88c9791c689 100644 --- a/src/ui/menu-ui-handler.ts +++ b/src/ui/menu-ui-handler.ts @@ -11,11 +11,6 @@ import i18next from "i18next"; import {Button} from "#enums/buttons"; import { GameDataType } from "#enums/game-data-type"; import BgmBar from "#app/ui/bgm-bar"; -import { Species } from "#app/enums/species.js"; -import { DexAttr, AbilityAttr } from "#app/system/game-data.js"; -import { getPokemonSpecies, starterPassiveAbilities } from "../data/pokemon-species"; -import { Nature } from "../data/nature"; -import { Passive } from "../enums/passive"; enum MenuOptions { GAME_SETTINGS, @@ -35,47 +30,6 @@ const discordUrl = "https://discord.gg/uWpTfdKG49"; const githubUrl = "https://github.com/pagefaultgames/pokerogue"; const redditUrl = "https://www.reddit.com/r/pokerogue"; -export function unlockAll(scene: BattleScene) { - if (Utils.isLocal || Utils.isBeta) { - const totalSpecies = Object.keys(Species).filter(s => !isNaN(Number(s))); - for (const species of totalSpecies) { - //const pokemonSpecies = Number(species) > 2000 ? allSpecies.find(s => s.speciesId === Number(species)) : allSpecies[Number(species) - 1]; // thie converts the species to a pokemon from allSpecies by checking regional variants and returning the normal species index - const pokemonSpecies = getPokemonSpecies(Number(species)); - let dexAttrLength = Object.values(DexAttr).length; // this will be the final amount of bits to set; we start by getting the length of the DexAttr so we know how many things every pokemon will get at minimum - if (pokemonSpecies.forms?.length > 0) { // this checks if the specific pokemon has forms - dexAttrLength += pokemonSpecies.forms?.length; // if it does have forms, add it to the dexAttrLength - } - const natureAttrLength = Object.values(Nature).length; // this gets a list of all the natures to set bits for - let abilityAttr: number; // since pokemon can have 1, 2 or 3 abilities - switch (pokemonSpecies.getAbilityCount()) { - case 1: // if it's one ability, return one ability - abilityAttr = AbilityAttr.ABILITY_1; - break; - case 2: // if it's one ability and the hidden ability, return ability 1 and the hidden ability - abilityAttr = AbilityAttr.ABILITY_1 + AbilityAttr.ABILITY_HIDDEN; - break; - case 3: // if it's 3 abilities, return all three - abilityAttr = AbilityAttr.ABILITY_1 + AbilityAttr.ABILITY_2 + AbilityAttr.ABILITY_HIDDEN; - break; - } - scene.gameData.dexData[species].seenAttr = BigInt(Math.pow(2, dexAttrLength) - 1); // we can set these values as 2^n - 1 if n is one more than the total number of total bits compared to what we need - scene.gameData.dexData[species].caughtAttr = BigInt(Math.pow(2, dexAttrLength) - 1); - scene.gameData.dexData[species].natureAttr = Math.pow(2, natureAttrLength) - 1; - scene.gameData.dexData[species].caughtCount = 1; - scene.gameData.dexData[species].seenCount = 1; - scene.gameData.dexData[species].ivs = [31, 31, 31, 31, 31, 31]; - if (scene.gameData.starterData[species]) { // this checks to make sure the species has a starter - scene.gameData.starterData[species].abilityAttr = abilityAttr; // if so, it sets the abilityAttr for the starter - } - if (starterPassiveAbilities[species]) { // checks to see if the species has a passive - this is different to the starter code above as this needs to check babies instead of evolutions (i.e. check pichu instead of pikachu) - scene.gameData.starterData[species].passiveAttr = Passive.UNLOCKED + Passive.ENABLED; // if so, it sets the passiveAttr for the starter to be - } - } - //scene.gameData.saveAll(scene, true, true, false, true); // I could not for the life of me figure out how to make it save - scene.ui.revertMode(); - } -} - export default class MenuUiHandler extends MessageUiHandler { private menuContainer: Phaser.GameObjects.Container; private menuMessageBoxContainer: Phaser.GameObjects.Container; @@ -242,15 +196,6 @@ export default class MenuUiHandler extends MessageUiHandler { }, keepOpen: true }); - if (Utils.isLocal || Utils.isBeta) { - manageDataOptions.push({ - label: "Unlock All", - handler: () => { - unlockAll(this.scene); - return true; - } - }); - } manageDataOptions.push({ label: i18next.t("menuUiHandler:cancel"), handler: () => {