Skip to content

Commit cf52122

Browse files
MourouhDayKev
andauthored
fix(ability): Supersweet Syrup is not blocked by Own Tempo et al
#7073 * Add false to Supersweet's Intimidate attribute * Add test and change fix to modify `PostSummonStatStageChangeAbAttr` Now the `intimidate` param defaults to `false` --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
1 parent dbe9c71 commit cf52122

File tree

2 files changed

+50
-1
lines changed

2 files changed

+50
-1
lines changed

src/data/abilities/ab-attrs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2370,7 +2370,7 @@ export class PostSummonStatStageChangeAbAttr extends PostSummonAbAttr {
23702370
private readonly selfTarget: boolean;
23712371
private readonly intimidate: boolean;
23722372

2373-
constructor(stats: readonly BattleStat[], stages: number, selfTarget = false, intimidate = true) {
2373+
constructor(stats: readonly BattleStat[], stages: number, selfTarget = false, intimidate = false) {
23742374
super(true);
23752375

23762376
this.stats = stats;
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2024-2026 Pagefault Games
3+
*
4+
* SPDX-License-Identifier: AGPL-3.0-only
5+
*/
6+
7+
import { AbilityId } from "#enums/ability-id";
8+
import { MoveId } from "#enums/move-id";
9+
import { SpeciesId } from "#enums/species-id";
10+
import { Stat } from "#enums/stat";
11+
import { GameManager } from "#test/test-utils/game-manager";
12+
import Phaser from "phaser";
13+
import { beforeAll, beforeEach, describe, expect, it } from "vitest";
14+
15+
describe("Ability - Supersweet Syrup", () => {
16+
let phaserGame: Phaser.Game;
17+
let game: GameManager;
18+
19+
beforeAll(() => {
20+
phaserGame = new Phaser.Game({
21+
type: Phaser.HEADLESS,
22+
});
23+
});
24+
25+
beforeEach(() => {
26+
game = new GameManager(phaserGame);
27+
game.override
28+
.ability(AbilityId.SUPERSWEET_SYRUP)
29+
.battleStyle("single")
30+
.criticalHits(false)
31+
.enemySpecies(SpeciesId.MAGIKARP)
32+
.enemyAbility(AbilityId.BALL_FETCH)
33+
.enemyMoveset(MoveId.SPLASH)
34+
.startingLevel(100)
35+
.enemyLevel(100);
36+
});
37+
38+
it("should lower the opponent's evasion by 1 stage", async () => {
39+
// Guard Dog ability override used for regression test, cf https://github.com/pagefaultgames/pokerogue/pull/7073
40+
game.override.enemyAbility(AbilityId.GUARD_DOG);
41+
await game.classicMode.startBattle(SpeciesId.FEEBAS);
42+
43+
const enemy = game.field.getEnemyPokemon();
44+
45+
expect(enemy).toHaveStatStage(Stat.ATK, 0);
46+
expect(enemy).toHaveStatStage(Stat.EVA, -1);
47+
expect(enemy).not.toHaveAbilityApplied(AbilityId.GUARD_DOG);
48+
});
49+
});

0 commit comments

Comments
 (0)