Merge branch 'beta' into metronomechal
This commit is contained in:
commit
5dbe049568
|
@ -230,7 +230,7 @@ export const starterPassiveAbilities: StarterPassiveAbilities = {
|
|||
[Species.PINECO]: { 0: Abilities.ROUGH_SKIN },
|
||||
[Species.FORRETRESS]: { 0: Abilities.IRON_BARBS },
|
||||
[Species.DUNSPARCE]: { 0: Abilities.UNAWARE },
|
||||
[Species.DUDUNSPARCE]: { 0: Abilities.UNAWARE },
|
||||
[Species.DUDUNSPARCE]: { 0: Abilities.UNAWARE, 1: Abilities.UNAWARE },
|
||||
[Species.GLIGAR]: { 0: Abilities.POISON_TOUCH },
|
||||
[Species.GLISCOR]: { 0: Abilities.TOXIC_BOOST },
|
||||
[Species.SNUBBULL]: { 0: Abilities.PIXILATE },
|
||||
|
@ -276,7 +276,9 @@ export const starterPassiveAbilities: StarterPassiveAbilities = {
|
|||
[Species.RAIKOU]: { 0: Abilities.BEAST_BOOST },
|
||||
[Species.ENTEI]: { 0: Abilities.BEAST_BOOST },
|
||||
[Species.SUICUNE]: { 0: Abilities.BEAST_BOOST },
|
||||
[Species.LARVITAR]: { 0: Abilities.SOLID_ROCK, 1: Abilities.SOLID_ROCK },
|
||||
[Species.LARVITAR]: { 0: Abilities.SOLID_ROCK },
|
||||
[Species.PUPITAR]: { 0: Abilities.SOLID_ROCK },
|
||||
[Species.TYRANITAR]: { 0: Abilities.SOLID_ROCK, 1: Abilities.SOLID_ROCK },
|
||||
[Species.LUGIA]: { 0: Abilities.DELTA_STREAM },
|
||||
[Species.HO_OH]: { 0: Abilities.MAGIC_GUARD },
|
||||
[Species.CELEBI]: { 0: Abilities.PSYCHIC_SURGE },
|
||||
|
@ -431,7 +433,7 @@ export const starterPassiveAbilities: StarterPassiveAbilities = {
|
|||
[Species.PIPLUP]: { 0: Abilities.CUTE_CHARM },
|
||||
[Species.PRINPLUP]: { 0: Abilities.DRIZZLE },
|
||||
[Species.EMPOLEON]: { 0: Abilities.DRIZZLE },
|
||||
[Species.STARLY]: { 0: Abilities.ROCK_HEAD },
|
||||
[Species.STARLY]: { 0: Abilities.INTIMIDATE },
|
||||
[Species.STARAVIA]: { 0: Abilities.ROCK_HEAD },
|
||||
[Species.STARAPTOR]: { 0: Abilities.ROCK_HEAD },
|
||||
[Species.BIDOOF]: { 0: Abilities.SAP_SIPPER },
|
||||
|
@ -610,8 +612,8 @@ export const starterPassiveAbilities: StarterPassiveAbilities = {
|
|||
[Species.REUNICLUS]: { 0: Abilities.PSYCHIC_SURGE },
|
||||
[Species.DUCKLETT]: { 0: Abilities.DRIZZLE },
|
||||
[Species.SWANNA]: { 0: Abilities.DRIZZLE },
|
||||
[Species.VANILLITE]: { 0: Abilities.SLUSH_RUSH },
|
||||
[Species.VANILLISH]: { 0: Abilities.SLUSH_RUSH },
|
||||
[Species.VANILLITE]: { 0: Abilities.SNOW_WARNING },
|
||||
[Species.VANILLISH]: { 0: Abilities.SNOW_WARNING },
|
||||
[Species.VANILLUXE]: { 0: Abilities.SLUSH_RUSH },
|
||||
[Species.DEERLING]: { 0: Abilities.FLOWER_VEIL, 1: Abilities.CUD_CHEW, 2: Abilities.HARVEST, 3: Abilities.FUR_COAT },
|
||||
[Species.SAWSBUCK]: { 0: Abilities.FLOWER_VEIL, 1: Abilities.CUD_CHEW, 2: Abilities.HARVEST, 3: Abilities.FUR_COAT },
|
||||
|
@ -689,30 +691,30 @@ export const starterPassiveAbilities: StarterPassiveAbilities = {
|
|||
[Species.DELPHOX]: { 0: Abilities.PSYCHIC_SURGE },
|
||||
[Species.FROAKIE]: { 0: Abilities.STAKEOUT, 1: Abilities.STAKEOUT },
|
||||
[Species.FROGADIER]: { 0: Abilities.STAKEOUT, 1: Abilities.STAKEOUT },
|
||||
[Species.GRENINJA]: { 0: Abilities.STAKEOUT, 1: Abilities.STAKEOUT },
|
||||
[Species.GRENINJA]: { 0: Abilities.STAKEOUT, 1: Abilities.STAKEOUT, 2: Abilities.STAKEOUT },
|
||||
[Species.BUNNELBY]: { 0: Abilities.INNER_FOCUS },
|
||||
[Species.DIGGERSBY]: { 0: Abilities.THICK_FAT },
|
||||
[Species.FLETCHLING]: { 0: Abilities.FLAME_BODY },
|
||||
[Species.FLETCHINDER]: { 0: Abilities.MAGIC_GUARD },
|
||||
[Species.TALONFLAME]: { 0: Abilities.MAGIC_GUARD },
|
||||
[Species.SCATTERBUG]: { 0: Abilities.RUN_AWAY },
|
||||
[Species.SPEWPA]: { 0: Abilities.COMPOUND_EYES },
|
||||
[Species.VIVILLON]: { 0: Abilities.PRANKSTER },
|
||||
[Species.SCATTERBUG]: { 0: Abilities.RUN_AWAY, 1: Abilities.RUN_AWAY, 2: Abilities.RUN_AWAY, 3: Abilities.RUN_AWAY, 4: Abilities.RUN_AWAY, 5: Abilities.RUN_AWAY, 6: Abilities.RUN_AWAY, 7: Abilities.RUN_AWAY, 8: Abilities.RUN_AWAY, 9: Abilities.RUN_AWAY, 10: Abilities.RUN_AWAY, 11: Abilities.RUN_AWAY, 12: Abilities.RUN_AWAY, 13: Abilities.RUN_AWAY, 14: Abilities.RUN_AWAY, 15: Abilities.RUN_AWAY, 16: Abilities.RUN_AWAY, 17: Abilities.RUN_AWAY, 18: Abilities.RUN_AWAY, 19: Abilities.RUN_AWAY },
|
||||
[Species.SPEWPA]: { 0: Abilities.COMPOUND_EYES, 1: Abilities.COMPOUND_EYES, 2: Abilities.COMPOUND_EYES, 3: Abilities.COMPOUND_EYES, 4: Abilities.COMPOUND_EYES, 5: Abilities.COMPOUND_EYES, 6: Abilities.COMPOUND_EYES, 7: Abilities.COMPOUND_EYES, 8: Abilities.COMPOUND_EYES, 9: Abilities.COMPOUND_EYES, 10: Abilities.COMPOUND_EYES, 11: Abilities.COMPOUND_EYES, 12: Abilities.COMPOUND_EYES, 13: Abilities.COMPOUND_EYES, 14: Abilities.COMPOUND_EYES, 15: Abilities.COMPOUND_EYES, 16: Abilities.COMPOUND_EYES, 17: Abilities.COMPOUND_EYES, 18: Abilities.COMPOUND_EYES, 19: Abilities.COMPOUND_EYES },
|
||||
[Species.VIVILLON]: { 0: Abilities.PRANKSTER, 1: Abilities.PRANKSTER, 2: Abilities.PRANKSTER, 3: Abilities.PRANKSTER, 4: Abilities.PRANKSTER, 5: Abilities.PRANKSTER, 6: Abilities.PRANKSTER, 7: Abilities.PRANKSTER, 8: Abilities.PRANKSTER, 9: Abilities.PRANKSTER, 10: Abilities.PRANKSTER, 11: Abilities.PRANKSTER, 12: Abilities.PRANKSTER, 13: Abilities.PRANKSTER, 14: Abilities.PRANKSTER, 15: Abilities.PRANKSTER, 16: Abilities.PRANKSTER, 17: Abilities.PRANKSTER, 18: Abilities.PRANKSTER, 19: Abilities.PRANKSTER },
|
||||
[Species.LITLEO]: { 0: Abilities.BEAST_BOOST },
|
||||
[Species.PYROAR]: { 0: Abilities.BEAST_BOOST },
|
||||
[Species.FLABEBE]: { 0: Abilities.GRASSY_SURGE },
|
||||
[Species.FLOETTE]: { 0: Abilities.GRASSY_SURGE },
|
||||
[Species.FLORGES]: { 0: Abilities.GRASSY_SURGE },
|
||||
[Species.FLABEBE]: { 0: Abilities.GRASSY_SURGE, 1: Abilities.GRASSY_SURGE, 2: Abilities.GRASSY_SURGE, 3: Abilities.GRASSY_SURGE, 4: Abilities.GRASSY_SURGE },
|
||||
[Species.FLOETTE]: { 0: Abilities.GRASSY_SURGE, 1: Abilities.GRASSY_SURGE, 2: Abilities.GRASSY_SURGE, 3: Abilities.GRASSY_SURGE, 4: Abilities.GRASSY_SURGE },
|
||||
[Species.FLORGES]: { 0: Abilities.GRASSY_SURGE, 1: Abilities.GRASSY_SURGE, 2: Abilities.GRASSY_SURGE, 3: Abilities.GRASSY_SURGE, 4: Abilities.GRASSY_SURGE },
|
||||
[Species.SKIDDO]: { 0: Abilities.SEED_SOWER },
|
||||
[Species.GOGOAT]: { 0: Abilities.SEED_SOWER },
|
||||
[Species.PANCHAM]: { 0: Abilities.TECHNICIAN },
|
||||
[Species.PANGORO]: { 0: Abilities.FUR_COAT },
|
||||
[Species.FURFROU]: { 0: Abilities.FLUFFY },
|
||||
[Species.FURFROU]: { 0: Abilities.FLUFFY, 1: Abilities.FLUFFY, 2: Abilities.FLUFFY, 3: Abilities.FLUFFY, 4: Abilities.FLUFFY, 5: Abilities.FLUFFY, 6: Abilities.FLUFFY, 7: Abilities.FLUFFY, 8: Abilities.FLUFFY, 9: Abilities.FLUFFY },
|
||||
[Species.ESPURR]: { 0: Abilities.PRANKSTER },
|
||||
[Species.MEOWSTIC]: { 0: Abilities.FUR_COAT, 1: Abilities.NEUROFORCE },
|
||||
[Species.HONEDGE]: { 0: Abilities.SHARPNESS },
|
||||
[Species.DOUBLADE]: { 0: Abilities.SHARPNESS },
|
||||
[Species.AEGISLASH]: { 0: Abilities.SHARPNESS },
|
||||
[Species.AEGISLASH]: { 0: Abilities.SHARPNESS, 1: Abilities.SHARPNESS },
|
||||
[Species.SPRITZEE]: { 0: Abilities.FUR_COAT },
|
||||
[Species.AROMATISSE]: { 0: Abilities.FUR_COAT },
|
||||
[Species.SWIRLIX]: { 0: Abilities.RIPEN },
|
||||
|
@ -749,9 +751,9 @@ export const starterPassiveAbilities: StarterPassiveAbilities = {
|
|||
[Species.HISUI_AVALUGG]: { 0: Abilities.ICE_SCALES },
|
||||
[Species.NOIBAT]: { 0: Abilities.CHEEK_POUCH },
|
||||
[Species.NOIVERN]: { 0: Abilities.PUNK_ROCK },
|
||||
[Species.XERNEAS]: { 0: Abilities.HARVEST },
|
||||
[Species.XERNEAS]: { 0: Abilities.HARVEST, 1: Abilities.HARVEST },
|
||||
[Species.YVELTAL]: { 0: Abilities.SOUL_HEART },
|
||||
[Species.ZYGARDE]: { 0: Abilities.UNNERVE, 1: Abilities.MOXIE, 2: Abilities.UNNERVE, 3: Abilities.MOXIE, 4: Abilities.ADAPTABILITY },
|
||||
[Species.ZYGARDE]: { 0: Abilities.UNNERVE, 1: Abilities.MOXIE, 2: Abilities.UNNERVE, 3: Abilities.MOXIE, 4: Abilities.ADAPTABILITY, 5: Abilities.ADAPTABILITY },
|
||||
[Species.DIANCIE]: { 0: Abilities.SOLID_ROCK, 1: Abilities.PRISM_ARMOR },
|
||||
[Species.HOOPA]: { 0: Abilities.OPPORTUNIST, 1: Abilities.OPPORTUNIST },
|
||||
[Species.VOLCANION]: { 0: Abilities.NEUTRALIZING_GAS },
|
||||
|
@ -793,7 +795,7 @@ export const starterPassiveAbilities: StarterPassiveAbilities = {
|
|||
[Species.LURANTIS]: { 0: Abilities.SHARPNESS },
|
||||
[Species.MORELULL]: { 0: Abilities.TRIAGE },
|
||||
[Species.SHIINOTIC]: { 0: Abilities.TRIAGE },
|
||||
[Species.SALANDIT]: { 0: Abilities.DRAGONS_MAW },
|
||||
[Species.SALANDIT]: { 0: Abilities.PICKUP },
|
||||
[Species.SALAZZLE]: { 0: Abilities.DRAGONS_MAW },
|
||||
[Species.STUFFUL]: { 0: Abilities.SCRAPPY },
|
||||
[Species.BEWEAR]: { 0: Abilities.SCRAPPY },
|
||||
|
@ -849,6 +851,7 @@ export const starterPassiveAbilities: StarterPassiveAbilities = {
|
|||
[Species.ALOLA_RATTATA]: { 0: Abilities.ADAPTABILITY },
|
||||
[Species.ALOLA_RATICATE]: { 0: Abilities.ADAPTABILITY },
|
||||
[Species.ALOLA_SANDSHREW]: { 0: Abilities.ICE_SCALES },
|
||||
[Species.ALOLA_SANDSLASH]: { 0: Abilities.ICE_SCALES },
|
||||
[Species.ALOLA_VULPIX]: { 0: Abilities.ICE_BODY },
|
||||
[Species.ALOLA_NINETALES]: { 0: Abilities.ICE_BODY },
|
||||
[Species.ALOLA_DIGLETT]: { 0: Abilities.STURDY },
|
||||
|
@ -883,6 +886,7 @@ export const starterPassiveAbilities: StarterPassiveAbilities = {
|
|||
[Species.GOSSIFLEUR]: { 0: Abilities.SEED_SOWER },
|
||||
[Species.ELDEGOSS]: { 0: Abilities.GRASSY_SURGE },
|
||||
[Species.WOOLOO]: { 0: Abilities.SCRAPPY },
|
||||
[Species.DUBWOOL]: { 0: Abilities.SCRAPPY },
|
||||
[Species.CHEWTLE]: { 0: Abilities.SOLID_ROCK },
|
||||
[Species.DREDNAW]: { 0: Abilities.SOLID_ROCK, 1: Abilities.SOLID_ROCK },
|
||||
[Species.YAMPER]: { 0: Abilities.PICKUP },
|
||||
|
@ -915,7 +919,7 @@ export const starterPassiveAbilities: StarterPassiveAbilities = {
|
|||
[Species.MORGREM]: { 0: Abilities.INTIMIDATE },
|
||||
[Species.GRIMMSNARL]: { 0: Abilities.INTIMIDATE, 1: Abilities.INTIMIDATE },
|
||||
[Species.MILCERY]: { 0: Abilities.REGENERATOR },
|
||||
[Species.ALCREMIE]: { 0: Abilities.REGENERATOR },
|
||||
[Species.ALCREMIE]: { 0: Abilities.REGENERATOR, 1: Abilities.REGENERATOR, 2: Abilities.REGENERATOR, 3: Abilities.REGENERATOR, 4: Abilities.REGENERATOR, 5: Abilities.REGENERATOR, 6: Abilities.REGENERATOR, 7: Abilities.REGENERATOR, 8: Abilities.REGENERATOR, 9: Abilities.REGENERATOR },
|
||||
[Species.FALINKS]: { 0: Abilities.DAUNTLESS_SHIELD },
|
||||
[Species.PINCURCHIN]: { 0: Abilities.ELECTROMORPHOSIS },
|
||||
[Species.SNOM]: { 0: Abilities.SNOW_WARNING },
|
||||
|
|
|
@ -6715,6 +6715,8 @@ class CallMoveAttr extends OverrideMoveEffectAttr {
|
|||
const replaceMoveTarget = move.moveTarget === MoveTarget.NEAR_OTHER ? MoveTarget.NEAR_ENEMY : undefined;
|
||||
const moveTargets = getMoveTargets(user, move.id, replaceMoveTarget);
|
||||
if (moveTargets.targets.length === 0) {
|
||||
globalScene.queueMessage(i18next.t("battle:attackFailed"));
|
||||
console.log("CallMoveAttr failed due to no targets.");
|
||||
return false;
|
||||
}
|
||||
const targets = moveTargets.multiple || moveTargets.targets.length === 1
|
||||
|
|
|
@ -95,7 +95,7 @@ export const TheStrongStuffEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||
bossSegments: 5,
|
||||
shiny: false, // Shiny lock because shiny is rolled only if the battle option is picked
|
||||
customPokemonData: new CustomPokemonData({ spriteScale: 1.25 }),
|
||||
nature: Nature.BOLD,
|
||||
nature: Nature.HARDY,
|
||||
moveSet: [Moves.INFESTATION, Moves.SALT_CURE, Moves.GASTRO_ACID, Moves.HEAL_ORDER],
|
||||
modifierConfigs: [
|
||||
{
|
||||
|
@ -119,7 +119,7 @@ export const TheStrongStuffEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||
queueEncounterMessage(`${namespace}:option.2.stat_boost`);
|
||||
globalScene.unshiftPhase(
|
||||
new StatStageChangePhase(pokemon.getBattlerIndex(), true, [Stat.DEF, Stat.SPDEF], 2),
|
||||
new StatStageChangePhase(pokemon.getBattlerIndex(), true, [Stat.DEF, Stat.SPDEF], 1),
|
||||
);
|
||||
},
|
||||
},
|
||||
|
|
|
@ -28,6 +28,7 @@ import { BattlerIndex } from "#app/battle";
|
|||
import { PokemonMove } from "#app/field/pokemon";
|
||||
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode";
|
||||
import { Challenges } from "#enums/challenges";
|
||||
import { randSeedInt } from "#app/utils";
|
||||
|
||||
/** the i18n namespace for this encounter */
|
||||
const namespace = "mysteryEncounters/trashToTreasure";
|
||||
|
@ -82,7 +83,43 @@ export const TrashToTreasureEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||
shiny: false, // Shiny lock because of custom intro sprite
|
||||
formIndex: 1, // Gmax
|
||||
bossSegmentModifier: 1, // +1 Segment from normal
|
||||
moveSet: [Moves.PAYBACK, Moves.GUNK_SHOT, Moves.STOMPING_TANTRUM, Moves.DRAIN_PUNCH],
|
||||
moveSet: [Moves.GUNK_SHOT, Moves.STOMPING_TANTRUM, Moves.HAMMER_ARM, Moves.PAYBACK],
|
||||
modifierConfigs: [
|
||||
{
|
||||
modifier: generateModifierType(modifierTypes.BERRY) as PokemonHeldItemModifierType,
|
||||
},
|
||||
{
|
||||
modifier: generateModifierType(modifierTypes.BERRY) as PokemonHeldItemModifierType,
|
||||
},
|
||||
{
|
||||
modifier: generateModifierType(modifierTypes.BERRY) as PokemonHeldItemModifierType,
|
||||
},
|
||||
{
|
||||
modifier: generateModifierType(modifierTypes.BERRY) as PokemonHeldItemModifierType,
|
||||
},
|
||||
{
|
||||
modifier: generateModifierType(modifierTypes.BASE_STAT_BOOSTER) as PokemonHeldItemModifierType,
|
||||
},
|
||||
{
|
||||
modifier: generateModifierType(modifierTypes.BASE_STAT_BOOSTER) as PokemonHeldItemModifierType,
|
||||
},
|
||||
{
|
||||
modifier: generateModifierType(modifierTypes.TOXIC_ORB) as PokemonHeldItemModifierType,
|
||||
stackCount: randSeedInt(2, 0),
|
||||
},
|
||||
{
|
||||
modifier: generateModifierType(modifierTypes.SOOTHE_BELL) as PokemonHeldItemModifierType,
|
||||
stackCount: randSeedInt(2, 1),
|
||||
},
|
||||
{
|
||||
modifier: generateModifierType(modifierTypes.LUCKY_EGG) as PokemonHeldItemModifierType,
|
||||
stackCount: randSeedInt(3, 1),
|
||||
},
|
||||
{
|
||||
modifier: generateModifierType(modifierTypes.GOLDEN_EGG) as PokemonHeldItemModifierType,
|
||||
stackCount: randSeedInt(2, 0),
|
||||
},
|
||||
],
|
||||
};
|
||||
const config: EnemyPartyConfig = {
|
||||
levelAdditiveModifier: 0.5,
|
||||
|
@ -92,7 +129,7 @@ export const TrashToTreasureEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||
encounter.enemyPartyConfigs = [config];
|
||||
|
||||
// Load animations/sfx for Garbodor fight start moves
|
||||
loadCustomMovesForEncounter([Moves.TOXIC, Moves.AMNESIA]);
|
||||
loadCustomMovesForEncounter([Moves.TOXIC, Moves.STOCKPILE]);
|
||||
|
||||
globalScene.loadSe("PRSFX- Dig2", "battle_anims", "PRSFX- Dig2.wav");
|
||||
globalScene.loadSe("PRSFX- Venom Drench", "battle_anims", "PRSFX- Venom Drench.wav");
|
||||
|
@ -117,7 +154,7 @@ export const TrashToTreasureEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||
doGarbageDig();
|
||||
})
|
||||
.withOptionPhase(async () => {
|
||||
// Gain 2 Leftovers and 2 Shell Bell
|
||||
// Gain 2 Leftovers and 1 Shell Bell
|
||||
await transitionMysteryEncounterIntroVisuals();
|
||||
await tryApplyDigRewardItems();
|
||||
|
||||
|
@ -177,7 +214,7 @@ export const TrashToTreasureEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||
{
|
||||
sourceBattlerIndex: BattlerIndex.ENEMY,
|
||||
targets: [BattlerIndex.ENEMY],
|
||||
move: new PokemonMove(Moves.AMNESIA),
|
||||
move: new PokemonMove(Moves.STOCKPILE),
|
||||
ignorePp: true,
|
||||
},
|
||||
);
|
||||
|
@ -233,21 +270,7 @@ async function tryApplyDigRewardItems() {
|
|||
true,
|
||||
);
|
||||
|
||||
// First Shell bell
|
||||
for (const pokemon of party) {
|
||||
const heldItems = globalScene.findModifiers(
|
||||
m => m instanceof PokemonHeldItemModifier && m.pokemonId === pokemon.id,
|
||||
true,
|
||||
) as PokemonHeldItemModifier[];
|
||||
const existingShellBell = heldItems.find(m => m instanceof HitHealModifier) as HitHealModifier;
|
||||
|
||||
if (!existingShellBell || existingShellBell.getStackCount() < existingShellBell.getMaxStackCount()) {
|
||||
await applyModifierTypeToPlayerPokemon(pokemon, shellBell);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Second Shell bell
|
||||
// Only Shell bell
|
||||
for (const pokemon of party) {
|
||||
const heldItems = globalScene.findModifiers(
|
||||
m => m instanceof PokemonHeldItemModifier && m.pokemonId === pokemon.id,
|
||||
|
@ -265,7 +288,7 @@ async function tryApplyDigRewardItems() {
|
|||
await showEncounterText(
|
||||
i18next.t("battle:rewardGainCount", {
|
||||
modifierName: shellBell.name,
|
||||
count: 2,
|
||||
count: 1,
|
||||
}),
|
||||
null,
|
||||
undefined,
|
||||
|
|
|
@ -114,7 +114,7 @@ describe("The Strong Stuff - Mystery Encounter", () => {
|
|||
bossSegments: 5,
|
||||
shiny: false,
|
||||
customPokemonData: new CustomPokemonData({ spriteScale: 1.25 }),
|
||||
nature: Nature.BOLD,
|
||||
nature: Nature.HARDY,
|
||||
moveSet: [Moves.INFESTATION, Moves.SALT_CURE, Moves.GASTRO_ACID, Moves.HEAL_ORDER],
|
||||
modifierConfigs: expect.any(Array),
|
||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
||||
|
@ -198,7 +198,7 @@ describe("The Strong Stuff - Mystery Encounter", () => {
|
|||
expect(scene.getCurrentPhase()?.constructor.name).toBe(CommandPhase.name);
|
||||
expect(enemyField.length).toBe(1);
|
||||
expect(enemyField[0].species.speciesId).toBe(Species.SHUCKLE);
|
||||
expect(enemyField[0].summonData.statStages).toEqual([0, 2, 0, 2, 0, 0, 0]);
|
||||
expect(enemyField[0].summonData.statStages).toEqual([0, 1, 0, 1, 0, 0, 0]);
|
||||
const shuckleItems = enemyField[0].getHeldItems();
|
||||
expect(shuckleItems.length).toBe(5);
|
||||
expect(shuckleItems.find(m => m instanceof BerryModifier && m.berryType === BerryType.SITRUS)?.stackCount).toBe(
|
||||
|
|
|
@ -1,30 +1,37 @@
|
|||
import type BattleScene from "#app/battle-scene";
|
||||
import * as BattleAnims from "#app/data/battle-anims";
|
||||
import { TrashToTreasureEncounter } from "#app/data/mystery-encounters/encounters/trash-to-treasure-encounter";
|
||||
import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters";
|
||||
import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils";
|
||||
import {
|
||||
type EnemyPartyConfig,
|
||||
type EnemyPokemonConfig,
|
||||
generateModifierType,
|
||||
} from "#app/data/mystery-encounters/utils/encounter-phase-utils";
|
||||
import { getPokemonSpecies } from "#app/data/pokemon-species";
|
||||
import { Biome } from "#app/enums/biome";
|
||||
import { MysteryEncounterType } from "#app/enums/mystery-encounter-type";
|
||||
import { Species } from "#app/enums/species";
|
||||
import GameManager from "#test/testUtils/gameManager";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { getPokemonSpecies } from "#app/data/pokemon-species";
|
||||
import * as BattleAnims from "#app/data/battle-anims";
|
||||
import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils";
|
||||
import { PokemonMove } from "#app/field/pokemon";
|
||||
import { HealShopCostModifier, HitHealModifier, TurnHealModifier } from "#app/modifier/modifier";
|
||||
import { ModifierTier } from "#app/modifier/modifier-tier";
|
||||
import { modifierTypes, type PokemonHeldItemModifierType } from "#app/modifier/modifier-type";
|
||||
import { CommandPhase } from "#app/phases/command-phase";
|
||||
import { MovePhase } from "#app/phases/move-phase";
|
||||
import { SelectModifierPhase } from "#app/phases/select-modifier-phase";
|
||||
import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import * as Utils from "#app/utils";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode";
|
||||
import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";
|
||||
import {
|
||||
runMysteryEncounterToEnd,
|
||||
skipBattleRunMysteryEncounterRewardsPhase,
|
||||
} from "#test/mystery-encounter/encounter-test-utils";
|
||||
import { Moves } from "#enums/moves";
|
||||
import type BattleScene from "#app/battle-scene";
|
||||
import { PokemonMove } from "#app/field/pokemon";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler";
|
||||
import { HitHealModifier, HealShopCostModifier, TurnHealModifier } from "#app/modifier/modifier";
|
||||
import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode";
|
||||
import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";
|
||||
import GameManager from "#test/testUtils/gameManager";
|
||||
import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils";
|
||||
import { TrashToTreasureEncounter } from "#app/data/mystery-encounters/encounters/trash-to-treasure-encounter";
|
||||
import { ModifierTier } from "#app/modifier/modifier-tier";
|
||||
import { SelectModifierPhase } from "#app/phases/select-modifier-phase";
|
||||
import { CommandPhase } from "#app/phases/command-phase";
|
||||
import { MovePhase } from "#app/phases/move-phase";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const namespace = "mysteryEncounters/trashToTreasure";
|
||||
const defaultParty = [Species.LAPRAS, Species.GENGAR, Species.ABRA];
|
||||
|
@ -73,6 +80,7 @@ describe("Trash to Treasure - Mystery Encounter", () => {
|
|||
});
|
||||
|
||||
it("should initialize fully", async () => {
|
||||
vi.spyOn(Utils, "randSeedInt").mockImplementation((range, min = 0) => min + range - 1);
|
||||
initSceneWithoutEncounterPhase(scene, defaultParty);
|
||||
scene.currentBattle.mysteryEncounter = TrashToTreasureEncounter;
|
||||
const moveInitSpy = vi.spyOn(BattleAnims, "initMoveAnim");
|
||||
|
@ -85,22 +93,61 @@ describe("Trash to Treasure - Mystery Encounter", () => {
|
|||
TrashToTreasureEncounter.populateDialogueTokensFromRequirements();
|
||||
const onInitResult = onInit!();
|
||||
|
||||
expect(TrashToTreasureEncounter.enemyPartyConfigs).toEqual([
|
||||
{
|
||||
levelAdditiveModifier: 0.5,
|
||||
disableSwitch: true,
|
||||
pokemonConfigs: [
|
||||
{
|
||||
species: getPokemonSpecies(Species.GARBODOR),
|
||||
isBoss: true,
|
||||
shiny: false,
|
||||
formIndex: 1,
|
||||
bossSegmentModifier: 1,
|
||||
moveSet: [Moves.PAYBACK, Moves.GUNK_SHOT, Moves.STOMPING_TANTRUM, Moves.DRAIN_PUNCH],
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
const bossSpecies = getPokemonSpecies(Species.GARBODOR);
|
||||
const pokemonConfig: EnemyPokemonConfig = {
|
||||
species: bossSpecies,
|
||||
isBoss: true,
|
||||
shiny: false, // Shiny lock because of custom intro sprite
|
||||
formIndex: 1, // Gmax
|
||||
bossSegmentModifier: 1, // +1 Segment from normal
|
||||
moveSet: [Moves.GUNK_SHOT, Moves.STOMPING_TANTRUM, Moves.HAMMER_ARM, Moves.PAYBACK],
|
||||
modifierConfigs: [
|
||||
{
|
||||
modifier: generateModifierType(modifierTypes.BERRY) as PokemonHeldItemModifierType,
|
||||
},
|
||||
{
|
||||
modifier: generateModifierType(modifierTypes.BERRY) as PokemonHeldItemModifierType,
|
||||
},
|
||||
{
|
||||
modifier: generateModifierType(modifierTypes.BERRY) as PokemonHeldItemModifierType,
|
||||
},
|
||||
{
|
||||
modifier: generateModifierType(modifierTypes.BERRY) as PokemonHeldItemModifierType,
|
||||
},
|
||||
{
|
||||
modifier: generateModifierType(modifierTypes.BASE_STAT_BOOSTER) as PokemonHeldItemModifierType,
|
||||
},
|
||||
{
|
||||
modifier: generateModifierType(modifierTypes.BASE_STAT_BOOSTER) as PokemonHeldItemModifierType,
|
||||
},
|
||||
{
|
||||
modifier: generateModifierType(modifierTypes.TOXIC_ORB) as PokemonHeldItemModifierType,
|
||||
stackCount: Utils.randSeedInt(2, 0),
|
||||
},
|
||||
{
|
||||
modifier: generateModifierType(modifierTypes.SOOTHE_BELL) as PokemonHeldItemModifierType,
|
||||
stackCount: Utils.randSeedInt(2, 1),
|
||||
},
|
||||
{
|
||||
modifier: generateModifierType(modifierTypes.LUCKY_EGG) as PokemonHeldItemModifierType,
|
||||
stackCount: Utils.randSeedInt(3, 1),
|
||||
},
|
||||
{
|
||||
modifier: generateModifierType(modifierTypes.GOLDEN_EGG) as PokemonHeldItemModifierType,
|
||||
stackCount: Utils.randSeedInt(2, 0),
|
||||
},
|
||||
],
|
||||
};
|
||||
const config: EnemyPartyConfig = {
|
||||
levelAdditiveModifier: 0.5,
|
||||
pokemonConfigs: [pokemonConfig],
|
||||
disableSwitch: true,
|
||||
};
|
||||
const enemyPartyConfigs = [config];
|
||||
|
||||
expect(JSON.stringify(TrashToTreasureEncounter.enemyPartyConfigs, undefined, 2)).toEqual(
|
||||
JSON.stringify(enemyPartyConfigs, undefined, 2),
|
||||
);
|
||||
await vi.waitFor(() => expect(moveInitSpy).toHaveBeenCalled());
|
||||
await vi.waitFor(() => expect(moveLoadSpy).toHaveBeenCalled());
|
||||
expect(onInitResult).toBe(true);
|
||||
|
@ -122,7 +169,7 @@ describe("Trash to Treasure - Mystery Encounter", () => {
|
|||
});
|
||||
});
|
||||
|
||||
it("should give 2 Leftovers, 2 Shell Bell, and Black Sludge", async () => {
|
||||
it("should give 2 Leftovers, 1 Shell Bell, and Black Sludge", async () => {
|
||||
await game.runToMysteryEncounter(MysteryEncounterType.TRASH_TO_TREASURE, defaultParty);
|
||||
await runMysteryEncounterToEnd(game, 1);
|
||||
await game.phaseInterceptor.to(SelectModifierPhase, false);
|
||||
|
@ -134,7 +181,7 @@ describe("Trash to Treasure - Mystery Encounter", () => {
|
|||
|
||||
const shellBell = scene.findModifier(m => m instanceof HitHealModifier) as HitHealModifier;
|
||||
expect(shellBell).toBeDefined();
|
||||
expect(shellBell?.stackCount).toBe(2);
|
||||
expect(shellBell?.stackCount).toBe(1);
|
||||
|
||||
const blackSludge = scene.findModifier(m => m instanceof HealShopCostModifier) as HealShopCostModifier;
|
||||
expect(blackSludge).toBeDefined();
|
||||
|
@ -178,17 +225,17 @@ describe("Trash to Treasure - Mystery Encounter", () => {
|
|||
expect(enemyField.length).toBe(1);
|
||||
expect(enemyField[0].species.speciesId).toBe(Species.GARBODOR);
|
||||
expect(enemyField[0].moveset).toEqual([
|
||||
new PokemonMove(Moves.PAYBACK),
|
||||
new PokemonMove(Moves.GUNK_SHOT),
|
||||
new PokemonMove(Moves.STOMPING_TANTRUM),
|
||||
new PokemonMove(Moves.DRAIN_PUNCH),
|
||||
new PokemonMove(Moves.HAMMER_ARM),
|
||||
new PokemonMove(Moves.PAYBACK),
|
||||
]);
|
||||
|
||||
// Should have used moves pre-battle
|
||||
const movePhases = phaseSpy.mock.calls.filter(p => p[0] instanceof MovePhase).map(p => p[0]);
|
||||
expect(movePhases.length).toBe(2);
|
||||
expect(movePhases.filter(p => (p as MovePhase).move.moveId === Moves.TOXIC).length).toBe(1);
|
||||
expect(movePhases.filter(p => (p as MovePhase).move.moveId === Moves.AMNESIA).length).toBe(1);
|
||||
expect(movePhases.filter(p => (p as MovePhase).move.moveId === Moves.STOCKPILE).length).toBe(1);
|
||||
});
|
||||
|
||||
it("should have 2 Rogue, 1 Ultra, 1 Great in rewards", async () => {
|
||||
|
|
Loading…
Reference in New Issue