changed documentation wording, added test for stuff cheeks

This commit is contained in:
muscode13 2024-10-09 19:40:15 -06:00
parent 8a1e82e168
commit 7ce52f9655
2 changed files with 16 additions and 5 deletions

View File

@ -3793,7 +3793,7 @@ export class PostDancingMoveAbAttr extends PostMoveUsedAbAttr {
}
/**
* Ability attribute for Unburden, triggers upon berry consumption
* Ability attribute for Unburden, triggers when a Pokemon consumes a berry they are holding
* @extends PostTurnAbAttr
* @see {@linkcode applyPostTurn}
* @see {@linkcode getCondition}

View File

@ -166,4 +166,15 @@ describe("Abilities - Unburden", () => {
expect(playerPokemon.getHeldItems().length).toBeLessThan(playerHeldItems);
expect(playerPokemon.getEffectiveStat(Stat.SPD)).toBeCloseTo(initialPlayerSpeed);
});
it("should activate when a move that consumes a berry is used", async () => {
game.override.enemyMoveset([ Moves.STUFF_CHEEKS ]);
await game.classicMode.startBattle();
const enemyPokemon = game.scene.getEnemyPokemon()!;
const enemyHeldItemCt = enemyPokemon.getHeldItems().length;
const initialEnemySpeed = enemyPokemon.getStat(Stat.SPD);
game.move.select(Moves.STUFF_CHEEKS);
await game.toNextTurn();
expect(enemyPokemon.getHeldItems().length).toBeLessThan(enemyHeldItemCt);
expect(enemyPokemon.getEffectiveStat(Stat.SPD)).toBeCloseTo(initialEnemySpeed * 2);
});
});