[Balance] [ME] Trash to Treasure Option 1 Adjustment (#6341)

* Update trash-to-treasure-encounter.ts

* Update trash-to-treasure-encounter.test.ts tests
This commit is contained in:
damocleas 2025-08-22 17:37:16 -04:00 committed by GitHub
parent 72b09eb7d5
commit 5ee547a39a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 18 deletions

View File

@ -153,7 +153,7 @@ export const TrashToTreasureEncounter: MysteryEncounter = MysteryEncounterBuilde
doGarbageDig(); doGarbageDig();
}) })
.withOptionPhase(async () => { .withOptionPhase(async () => {
// Gain 2 Leftovers and 1 Shell Bell // Gain 1 Leftovers and 1 Shell Bell
await transitionMysteryEncounterIntroVisuals(); await transitionMysteryEncounterIntroVisuals();
await tryApplyDigRewardItems(); await tryApplyDigRewardItems();
@ -231,21 +231,7 @@ async function tryApplyDigRewardItems() {
const party = globalScene.getPlayerParty(); const party = globalScene.getPlayerParty();
// Iterate over the party until an item was successfully given // Iterate over the party until an item was successfully given
// First leftovers // Only Leftovers
for (const pokemon of party) {
const heldItems = globalScene.findModifiers(
m => m instanceof PokemonHeldItemModifier && m.pokemonId === pokemon.id,
true,
) as PokemonHeldItemModifier[];
const existingLeftovers = heldItems.find(m => m instanceof TurnHealModifier) as TurnHealModifier;
if (!existingLeftovers || existingLeftovers.getStackCount() < existingLeftovers.getMaxStackCount()) {
await applyModifierTypeToPlayerPokemon(pokemon, leftovers);
break;
}
}
// Second leftovers
for (const pokemon of party) { for (const pokemon of party) {
const heldItems = globalScene.findModifiers( const heldItems = globalScene.findModifiers(
m => m instanceof PokemonHeldItemModifier && m.pokemonId === pokemon.id, m => m instanceof PokemonHeldItemModifier && m.pokemonId === pokemon.id,

View File

@ -169,7 +169,7 @@ describe("Trash to Treasure - Mystery Encounter", () => {
}); });
}); });
it("should give 2 Leftovers, 1 Shell Bell, and Black Sludge", async () => { it("should give 1 Leftovers, 1 Shell Bell, and Black Sludge", async () => {
await game.runToMysteryEncounter(MysteryEncounterType.TRASH_TO_TREASURE, defaultParty); await game.runToMysteryEncounter(MysteryEncounterType.TRASH_TO_TREASURE, defaultParty);
await runMysteryEncounterToEnd(game, 1); await runMysteryEncounterToEnd(game, 1);
await game.phaseInterceptor.to("SelectModifierPhase", false); await game.phaseInterceptor.to("SelectModifierPhase", false);
@ -177,7 +177,7 @@ describe("Trash to Treasure - Mystery Encounter", () => {
const leftovers = scene.findModifier(m => m instanceof TurnHealModifier) as TurnHealModifier; const leftovers = scene.findModifier(m => m instanceof TurnHealModifier) as TurnHealModifier;
expect(leftovers).toBeDefined(); expect(leftovers).toBeDefined();
expect(leftovers?.stackCount).toBe(2); expect(leftovers?.stackCount).toBe(1);
const shellBell = scene.findModifier(m => m instanceof HitHealModifier) as HitHealModifier; const shellBell = scene.findModifier(m => m instanceof HitHealModifier) as HitHealModifier;
expect(shellBell).toBeDefined(); expect(shellBell).toBeDefined();