From 0b5b481de63bbca03e1c6c45237d1d2decbd87f6 Mon Sep 17 00:00:00 2001 From: schmidtc1 <62030095+schmidtc1@users.noreply.github.com> Date: Mon, 8 Jul 2024 22:49:52 -0400 Subject: [PATCH 1/3] [Test] Prevent flying types/levitate from breaking Ceaseless Edge test (#2931) * Modifies ceaseless edge test to account for flying types/levitate ability * Removes .js from imports --- src/test/moves/ceaseless_edge.test.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/test/moves/ceaseless_edge.test.ts b/src/test/moves/ceaseless_edge.test.ts index de47027ccd5..6443e34d8d2 100644 --- a/src/test/moves/ceaseless_edge.test.ts +++ b/src/test/moves/ceaseless_edge.test.ts @@ -9,9 +9,10 @@ import { import {getMovePosition} from "#app/test/utils/gameManagerUtils"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import { ArenaTagType } from "#app/enums/arena-tag-type.js"; -import { allMoves } from "#app/data/move.js"; -import { ArenaTagSide, ArenaTrapTag } from "#app/data/arena-tag.js"; +import { ArenaTagType } from "#app/enums/arena-tag-type"; +import { allMoves } from "#app/data/move"; +import { ArenaTagSide, ArenaTrapTag } from "#app/data/arena-tag"; +import { Abilities } from "#app/enums/abilities"; const TIMEOUT = 20 * 1000; @@ -33,6 +34,8 @@ describe("Moves - Ceaseless Edge", () => { game = new GameManager(phaserGame); vi.spyOn(overrides, "SINGLE_BATTLE_OVERRIDE", "get").mockReturnValue(true); vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.RATTATA); + vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.RUN_AWAY); + vi.spyOn(overrides, "OPP_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.RUN_AWAY); vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100); vi.spyOn(overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100); vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([ Moves.CEASELESS_EDGE, Moves.SPLASH, Moves.ROAR ]); @@ -103,9 +106,8 @@ describe("Moves - Ceaseless Edge", () => { async () => { vi.spyOn(overrides, "STARTING_HELD_ITEMS_OVERRIDE", "get").mockReturnValue([{name: "MULTI_LENS"}]); vi.spyOn(overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(5); - vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(0); - await game.startBattle([ Species.SNORLAX, Species.MUNCHLAX ]); + await game.startBattle([ Species.ILLUMISE ]); const leadPokemon = game.scene.getPlayerPokemon(); expect(leadPokemon).toBeDefined(); From 0c18e95fa4e47808b7014cfc546049efe3810050 Mon Sep 17 00:00:00 2001 From: AJ Fontaine <36677462+Fontbane@users.noreply.github.com> Date: Tue, 9 Jul 2024 09:58:16 -0400 Subject: [PATCH 2/3] [Bug] Fix Meditite back and female variant sprites (#2929) --- .../images/pokemon/variant/_masterlist.json | 10 ++++++ public/images/pokemon/variant/back/307.json | 20 +++++------ .../pokemon/variant/back/female/307.json | 22 ++++++++++++ public/images/pokemon/variant/female/307.json | 34 +++++++++++++++++++ 4 files changed, 76 insertions(+), 10 deletions(-) create mode 100644 public/images/pokemon/variant/back/female/307.json create mode 100644 public/images/pokemon/variant/female/307.json diff --git a/public/images/pokemon/variant/_masterlist.json b/public/images/pokemon/variant/_masterlist.json index f3e690395e1..e2feeaa9e55 100644 --- a/public/images/pokemon/variant/_masterlist.json +++ b/public/images/pokemon/variant/_masterlist.json @@ -3300,6 +3300,11 @@ 1, 1 ], + "307": [ + 0, + 1, + 1 + ], "308": [ 0, 1, @@ -6678,6 +6683,11 @@ 1, 1 ], + "307": [ + 0, + 1, + 1 + ], "308": [ 0, 1, diff --git a/public/images/pokemon/variant/back/307.json b/public/images/pokemon/variant/back/307.json index 3c2ef92171c..3bdadaa8e16 100644 --- a/public/images/pokemon/variant/back/307.json +++ b/public/images/pokemon/variant/back/307.json @@ -1,15 +1,5 @@ { "1": { - "7b6b6b": "314b76", - "b5adad": "677d98", - "e6dede": "c2cfdb", - "000000": "000000", - "3a84b5": "51876e", - "3a4a5a": "113926", - "6bcee6": "7edfb7", - "5aa5ce": "66c3a3" - }, - "2": { "7b6b6b": "7a5f5f", "b5adad": "9f8383", "e6dede": "deccc3", @@ -18,5 +8,15 @@ "3a4a5a": "5a2859", "6bcee6": "f4a8c8", "5aa5ce": "ce7bb0" + }, + "2": { + "7b6b6b": "314b76", + "b5adad": "677d98", + "e6dede": "c2cfdb", + "000000": "000000", + "3a84b5": "51876e", + "3a4a5a": "113926", + "6bcee6": "7edfb7", + "5aa5ce": "66c3a3" } } \ No newline at end of file diff --git a/public/images/pokemon/variant/back/female/307.json b/public/images/pokemon/variant/back/female/307.json new file mode 100644 index 00000000000..3bdadaa8e16 --- /dev/null +++ b/public/images/pokemon/variant/back/female/307.json @@ -0,0 +1,22 @@ +{ + "1": { + "7b6b6b": "7a5f5f", + "b5adad": "9f8383", + "e6dede": "deccc3", + "000000": "000000", + "3a84b5": "7e4377", + "3a4a5a": "5a2859", + "6bcee6": "f4a8c8", + "5aa5ce": "ce7bb0" + }, + "2": { + "7b6b6b": "314b76", + "b5adad": "677d98", + "e6dede": "c2cfdb", + "000000": "000000", + "3a84b5": "51876e", + "3a4a5a": "113926", + "6bcee6": "7edfb7", + "5aa5ce": "66c3a3" + } +} \ No newline at end of file diff --git a/public/images/pokemon/variant/female/307.json b/public/images/pokemon/variant/female/307.json new file mode 100644 index 00000000000..d3e6a2437f1 --- /dev/null +++ b/public/images/pokemon/variant/female/307.json @@ -0,0 +1,34 @@ +{ + "1": { + "7b6b6b": "7a5f5f", + "000000": "000000", + "e6dede": "deccc3", + "b5adad": "9f8383", + "4a4242": "4a4242", + "ffffff": "ffffff", + "3a4a5a": "5a2859", + "b5d6ff": "f4a8c8", + "6bcee6": "ce7bb0", + "d65252": "d65287", + "84424a": "84424a", + "3a84b5": "7e4377", + "5aa5ce": "b95ba1", + "d65273": "d65273" + }, + "2": { + "7b6b6b": "314b76", + "000000": "000000", + "e6dede": "c2cfdb", + "b5adad": "6f89aa", + "4a4242": "1e2f52", + "ffffff": "ffffff", + "3a4a5a": "113926", + "b5d6ff": "7edfb7", + "6bcee6": "66c3a3", + "d65252": "c067c7", + "84424a": "84424a", + "3a84b5": "375a47", + "5aa5ce": "579578", + "d65273": "d65273" + } +} \ No newline at end of file From 18dcef5b4a35bd41c5227f0d3d8cdd85b5e66f52 Mon Sep 17 00:00:00 2001 From: flx-sta <50131232+flx-sta@users.noreply.github.com> Date: Tue, 9 Jul 2024 11:05:45 -0700 Subject: [PATCH 3/3] [Bug] fix starter select alpha in challenge modes (#2924) * fix starter select alpha in challenge modes * [NIT] resolve review comment https://github.com/pagefaultgames/pokerogue/pull/2924#discussion_r1670587051 * chore --- src/ui/starter-select-ui-handler.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 25d1060f23e..0caf9ef6fa6 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -2322,10 +2322,13 @@ export default class StarterSelectUiHandler extends MessageUiHandler { const isValidForChallenge = new Utils.BooleanHolder(true); + const currentPartyValue = this.starterGens.reduce((total: number, gen: number, i: number) => total += this.scene.gameData.getSpeciesStarterValue(this.genSpecies[gen][this.starterCursors[i]].speciesId), 0); + const cursorCost = this.scene.gameData.getSpeciesStarterValue(species.speciesId); + const isValidNextPartyValue = (currentPartyValue + cursorCost) <= this.getValueLimit(); Challenge.applyChallenges(this.scene.gameMode, Challenge.ChallengeType.STARTER_CHOICE, species, isValidForChallenge, this.scene.gameData.getSpeciesDexAttrProps(species, this.dexAttrCursor), this.starterGens.length); const starterSprite = this.starterSelectGenIconContainers[this.getGenCursorWithScroll()].getAt(this.cursor) as Phaser.GameObjects.Sprite; starterSprite.setTexture(species.getIconAtlasKey(formIndex, shiny, variant), species.getIconId(female, formIndex, shiny, variant)); - starterSprite.setAlpha(isValidForChallenge.value ? 1 : 0.375); + starterSprite.setAlpha(isValidForChallenge.value && isValidNextPartyValue ? 1 : 0.375); this.checkIconId((this.starterSelectGenIconContainers[this.getGenCursorWithScroll()].getAt(this.cursor) as Phaser.GameObjects.Sprite), species, female, formIndex, shiny, variant); this.canCycleShiny = !!(dexEntry.caughtAttr & DexAttr.NON_SHINY && dexEntry.caughtAttr & DexAttr.SHINY); this.canCycleGender = !!(dexEntry.caughtAttr & DexAttr.MALE && dexEntry.caughtAttr & DexAttr.FEMALE);