From f77a36ce3d47decca163e8964216c9a3489817dc Mon Sep 17 00:00:00 2001 From: RedstonewolfX <108761527+RedstonewolfX@users.noreply.github.com> Date: Tue, 17 Sep 2024 20:26:52 -0400 Subject: [PATCH] Add map commit Gives the player a Map in Daily Run mode. Comes with a unit test. --- src/phases/title-phase.ts | 1 + src/test/daily_mode.test.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/phases/title-phase.ts b/src/phases/title-phase.ts index 52503501837..fcb498d21e5 100644 --- a/src/phases/title-phase.ts +++ b/src/phases/title-phase.ts @@ -220,6 +220,7 @@ export class TitlePhase extends Phase { const modifiers: Modifier[] = Array(3).fill(null).map(() => modifierTypes.EXP_SHARE().withIdFromFunc(modifierTypes.EXP_SHARE).newModifier()) .concat(Array(3).fill(null).map(() => modifierTypes.GOLDEN_EXP_CHARM().withIdFromFunc(modifierTypes.GOLDEN_EXP_CHARM).newModifier())) + .concat([modifierTypes.MAP().withIdFromFunc(modifierTypes.MAP).newModifier()]) .concat(getDailyRunStarterModifiers(party)) .filter((m) => m !== null); diff --git a/src/test/daily_mode.test.ts b/src/test/daily_mode.test.ts index 5cc61a62874..4934d5d081c 100644 --- a/src/test/daily_mode.test.ts +++ b/src/test/daily_mode.test.ts @@ -1,5 +1,6 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import GameManager from "./utils/gameManager"; +import { MapModifier } from "#app/modifier/modifier"; describe("Daily Mode", () => { let phaserGame: Phaser.Game; @@ -28,5 +29,6 @@ describe("Daily Mode", () => { expect(pkm.level).toBe(20); expect(pkm.moveset.length).toBeGreaterThan(0); }); + expect(game.scene.getModifiers(MapModifier).length).toBeGreaterThan(0); }); });