From c9d80a3a42338567055c79a37bfcebe3cb7d816c Mon Sep 17 00:00:00 2001 From: ImperialSympathizer Date: Thu, 22 Aug 2024 14:21:39 -0400 Subject: [PATCH] test patch fix --- .../encounters/the-strong-stuff-encounter.ts | 199 ------------------ .../clowning-around-dialogue.ts | 34 --- 2 files changed, 233 deletions(-) delete mode 100644 src/data/mystery-encounters/encounters/the-strong-stuff-encounter.ts delete mode 100644 src/locales/en/mystery-encounters/clowning-around-dialogue.ts diff --git a/src/data/mystery-encounters/encounters/the-strong-stuff-encounter.ts b/src/data/mystery-encounters/encounters/the-strong-stuff-encounter.ts deleted file mode 100644 index 0b4e60a16e4..00000000000 --- a/src/data/mystery-encounters/encounters/the-strong-stuff-encounter.ts +++ /dev/null @@ -1,199 +0,0 @@ -import { EnemyPartyConfig, initBattleWithEnemyConfig, loadCustomMovesForEncounter, leaveEncounterWithoutBattle, setEncounterRewards, transitionMysteryEncounterIntroVisuals, generateModifierType } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { modifierTypes, PokemonHeldItemModifierType, } from "#app/modifier/modifier-type"; -import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import BattleScene from "#app/battle-scene"; -import MysteryEncounter, { MysteryEncounterBuilder } from "../mystery-encounter"; -import { getPokemonSpecies } from "#app/data/pokemon-species"; -import { Species } from "#enums/species"; -import { Nature } from "#app/data/nature"; -import Pokemon, { PlayerPokemon, PokemonMove } from "#app/field/pokemon"; -import { queueEncounterMessage, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; -import { modifyPlayerPokemonBST } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import { Moves } from "#enums/moves"; -import { BattlerIndex } from "#app/battle"; -import { BattleStat } from "#app/data/battle-stat"; -import { BattlerTagType } from "#enums/battler-tag-type"; -import { BerryType } from "#enums/berry-type"; -import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; -import { MysteryEncounterPokemonData } from "#app/data/mystery-encounters/mystery-encounter-pokemon-data"; -import { StatChangePhase } from "#app/phases/stat-change-phase"; - -/** the i18n namespace for the encounter */ -const namespace = "mysteryEncounter:theStrongStuff"; - -/** - * The Strong Stuff encounter. - * @see {@link https://github.com/AsdarDevelops/PokeRogue-Events/issues/54 | GitHub Issue #54} - * @see For biome requirements check {@linkcode mysteryEncountersByBiome} - */ -export const TheStrongStuffEncounter: MysteryEncounter = - MysteryEncounterBuilder.withEncounterType(MysteryEncounterType.THE_STRONG_STUFF) - .withEncounterTier(MysteryEncounterTier.COMMON) - .withSceneWaveRangeRequirement(10, 180) // waves 10 to 180 - .withHideWildIntroMessage(true) - .withAutoHideIntroVisuals(false) - .withIntroSpriteConfigs([ - { - spriteKey: "berry_juice", - fileRoot: "items", - hasShadow: true, - isItem: true, - scale: 1.5, - x: -15, - y: 3, - disableAnimation: true - }, - { - spriteKey: Species.SHUCKLE.toString(), - fileRoot: "pokemon", - hasShadow: true, - repeat: true, - scale: 1.5, - x: 20, - y: 10, - yShadow: 7 - }, - ]) // Set in onInit() - .withIntroDialogue([ - { - text: `${namespace}.intro`, - }, - ]) - .withOnInit((scene: BattleScene) => { - const encounter = scene.currentBattle.mysteryEncounter; - - // Calculate boss mon - const config: EnemyPartyConfig = { - levelAdditiveMultiplier: 1, - disableSwitch: true, - pokemonConfigs: [ - { - species: getPokemonSpecies(Species.SHUCKLE), - isBoss: true, - bossSegments: 5, - mysteryEncounterData: new MysteryEncounterPokemonData(1.5), - nature: Nature.BOLD, - moveSet: [Moves.INFESTATION, Moves.SALT_CURE, Moves.GASTRO_ACID, Moves.HEAL_ORDER], - modifierConfigs: [ - { - modifierType: generateModifierType(scene, modifierTypes.BERRY, [BerryType.SITRUS]) as PokemonHeldItemModifierType - }, - { - modifierType: generateModifierType(scene, modifierTypes.BERRY, [BerryType.APICOT]) as PokemonHeldItemModifierType - }, - { - modifierType: generateModifierType(scene, modifierTypes.BERRY, [BerryType.GANLON]) as PokemonHeldItemModifierType - }, - { - modifierType: generateModifierType(scene, modifierTypes.BERRY, [BerryType.LUM]) as PokemonHeldItemModifierType, - stackCount: 2 - } - ], - tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON], - mysteryEncounterBattleEffects: (pokemon: Pokemon) => { - queueEncounterMessage(pokemon.scene, `${namespace}.option.2.stat_boost`); - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [BattleStat.DEF, BattleStat.SPDEF], 2)); - } - } - ], - }; - - encounter.enemyPartyConfigs = [config]; - - loadCustomMovesForEncounter(scene, [Moves.GASTRO_ACID, Moves.STEALTH_ROCK]); - - return true; - }) - .withTitle(`${namespace}.title`) - .withDescription(`${namespace}.description`) - .withQuery(`${namespace}.query`) - .withSimpleOption( - { - buttonLabel: `${namespace}.option.1.label`, - buttonTooltip: `${namespace}.option.1.tooltip`, - selected: [ - { - text: `${namespace}.option.1.selected` - } - ] - }, - async (scene: BattleScene) => { - const encounter = scene.currentBattle.mysteryEncounter; - // Do blackout and hide intro visuals during blackout - scene.time.delayedCall(750, () => { - transitionMysteryEncounterIntroVisuals(scene, true, true, 50); - }); - - // -20 to all base stats of highest BST, +10 to all base stats of rest of party - // Get highest BST mon - const party = scene.getParty(); - let highestBst: PlayerPokemon | null = null; - let statTotal = 0; - for (const pokemon of party) { - if (!highestBst) { - highestBst = pokemon; - statTotal = pokemon.getSpeciesForm().getBaseStatTotal(); - continue; - } - - const total = pokemon.getSpeciesForm().getBaseStatTotal(); - if (total > statTotal) { - highestBst = pokemon; - statTotal = total; - } - } - - if (!highestBst) { - highestBst = party[0]; - } - - modifyPlayerPokemonBST(highestBst, -20); - for (const pokemon of party) { - if (highestBst.id === pokemon.id) { - continue; - } - - modifyPlayerPokemonBST(pokemon, 10); - } - - encounter.setDialogueToken("highBstPokemon", highestBst.getNameToRender()); - await showEncounterText(scene, `${namespace}.option.1.selected_2`, undefined, true); - - setEncounterRewards(scene, { fillRemaining: true }); - leaveEncounterWithoutBattle(scene, true); - return true; - } - ) - .withSimpleOption( - { - buttonLabel: `${namespace}.option.2.label`, - buttonTooltip: `${namespace}.option.2.tooltip`, - selected: [ - { - text: `${namespace}.option.2.selected`, - }, - ], - }, - async (scene: BattleScene) => { - // Pick battle - const encounter = scene.currentBattle.mysteryEncounter; - setEncounterRewards(scene, { guaranteedModifierTypeFuncs: [modifierTypes.SOUL_DEW], fillRemaining: true }); - encounter.startOfBattleEffects.push( - { - sourceBattlerIndex: BattlerIndex.ENEMY, - targets: [BattlerIndex.PLAYER], - move: new PokemonMove(Moves.GASTRO_ACID), - ignorePp: true - }, - { - sourceBattlerIndex: BattlerIndex.ENEMY, - targets: [BattlerIndex.PLAYER], - move: new PokemonMove(Moves.STEALTH_ROCK), - ignorePp: true - }); - - transitionMysteryEncounterIntroVisuals(scene, true, true, 500); - await initBattleWithEnemyConfig(scene, encounter.enemyPartyConfigs[0]); - } - ) - .build(); diff --git a/src/locales/en/mystery-encounters/clowning-around-dialogue.ts b/src/locales/en/mystery-encounters/clowning-around-dialogue.ts deleted file mode 100644 index 87dc0169b87..00000000000 --- a/src/locales/en/mystery-encounters/clowning-around-dialogue.ts +++ /dev/null @@ -1,34 +0,0 @@ -export const clowningAroundDialogue = { - intro: "It's...@d{64} a clown?", - speaker: "Clown", - intro_dialogue: "Bumbling buffoon, brace for a brilliant battle!\nYou'll be beaten by this brawling busker!", - title: "Clowning Around", - description: "Something is off about this encounter. The clown seems eager to goad you into a battle, but to what end?\n\nThe Blacephalon is especially strange, like it has @[TOOLTIP_TITLE]{weird types and ability.}", - query: "What will you do?", - option: { - 1: { - label: "Battle the Clown", - tooltip: "(-) Strange Battle\n(?) Affects Pokémon Abilities", - selected: "Your pitiful Pokémon are poised for a pathetic performance!", - apply_ability_dialogue: "A sensational showcase!\nYour savvy suits a sensational skill as spoils!", - apply_ability_message: "The clown is offering to permanently Skill Swap one of your Pokémon's ability to {{ability}}!", - ability_prompt: "Would you like to permanently teach a Pokémon the {{ability}} ability?", - ability_gained: "@s{level_up_fanfare}{{chosenPokemon}} gained the {{ability}} ability!" - }, - 2: { - label: "Remain Unprovoked", - tooltip: "(-) Upsets the Clown\n(?) Affects Pokémon Items", - selected: "Dismal dodger, you deny a delightful duel?\nFeel my fury!", - selected_2: "The clown's Blacephalon uses Trick!\nAll of your {{switchPokemon}}'s items were randomly swapped!", - selected_3: "Flustered fool, fall for my flawless deception!", - }, - 3: { - label: "Return the Insults", - tooltip: "(-) Upsets the Clown\n(?) Affects Pokémon Types", - selected: "Dismal dodger, you deny a delightful duel?\nFeel my fury!", - selected_2: "The clown's Blacephalon uses a strange move!\nAll of your team's types were randomly swapped!", - selected_3: "Flustered fool, fall for my flawless deception!", - }, - }, - outro: "The clown and his cohorts\ndisappear in a puff of smoke." -};