diff --git a/test/field/pokemon-id-checks.test.ts b/test/field/pokemon-id-checks.test.ts index 937f304cae8..87b5b64d6ef 100644 --- a/test/field/pokemon-id-checks.test.ts +++ b/test/field/pokemon-id-checks.test.ts @@ -1,17 +1,13 @@ -import { allMoves } from "#app/data/data-lists"; import type Pokemon from "#app/field/pokemon"; import { MoveId } from "#enums/move-id"; import { AbilityId } from "#enums/ability-id"; import { SpeciesId } from "#enums/species-id"; -import { BerryModifier } from "#app/modifier/modifier"; import { BattleType } from "#enums/battle-type"; import { BattlerTagType } from "#enums/battler-tag-type"; -import { BerryType } from "#enums/berry-type"; import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { BattlerIndex } from "#app/battle"; -import { StealHeldItemChanceAttr } from "#app/data/moves/move"; describe("Field - Pokemon ID Checks", () => { let phaserGame: Phaser.Game; @@ -55,33 +51,7 @@ describe("Field - Pokemon ID Checks", () => { expect(ids).toHaveLength(uniqueIds.length); }); - it("should not prevent item theft with PID of 0", async () => { - game.override.enemyHeldItems([{ name: "BERRY", count: 1, type: BerryType.APICOT }]); - - // Mock thief's steal chance to be 100% guaranteed - vi.spyOn(allMoves[MoveId.THIEF], "attrs", "get").mockReturnValue([new StealHeldItemChanceAttr(1.0)]); - - await game.classicMode.startBattle([SpeciesId.TREECKO]); - - const player = game.scene.getPlayerPokemon()!; - const enemy = game.scene.getEnemyPokemon()!; - // Override enemy pokemon PID to be 0 - enemy.id = 0; - game.scene.getModifiers(BerryModifier, false).forEach(modifier => { - modifier.pokemonId = enemy.id; - }); - - expect(enemy.getHeldItems()).toHaveLength(1); - expect(player.getHeldItems()).toHaveLength(0); - - game.move.use(MoveId.THIEF); - await game.toNextTurn(); - - expect(enemy.getHeldItems()).toHaveLength(0); - expect(player.getHeldItems()).toHaveLength(1); - }); - - it("should not prevent Destiny Bond from triggering if user has PID of 0", async () => { + it("should not prevent Battler Tags from triggering if user has PID of 0", async () => { await game.classicMode.startBattle([SpeciesId.TREECKO, SpeciesId.AERODACTYL]); const player = game.field.getPlayerPokemon(); @@ -99,6 +69,7 @@ describe("Field - Pokemon ID Checks", () => { const dBondTag = player.getTag(BattlerTagType.DESTINY_BOND)!; expect(dBondTag).toBeDefined(); expect(dBondTag.sourceId).toBe(0); + expect(dBondTag.getSourcePokemon()).toBe(player); await game.phaseInterceptor.to("MoveEndPhase");