diff --git a/package.json b/package.json index e2db1681e0f3..da5bc393c521 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "create-test": "node ./create-test-boilerplate.js", "postinstall": "npx lefthook install && npx lefthook run post-merge", "update-version:patch": "npm version patch --force --no-git-tag-version", - "update-version:minor": "npm version minor --force --no-git-tag-version" + "update-version:minor": "npm version minor --force --no-git-tag-version", + "update-locales:remote": "git submodule update --progress --init --recursive --force --remote" }, "devDependencies": { "@eslint/js": "^9.3.0", diff --git a/public/audio/bgm/battle_champion_kukui.mp3 b/public/audio/bgm/battle_champion_kukui.mp3 new file mode 100644 index 000000000000..9e0739fc4d05 Binary files /dev/null and b/public/audio/bgm/battle_champion_kukui.mp3 differ diff --git a/public/audio/bgm/battle_colress.mp3 b/public/audio/bgm/battle_colress.mp3 new file mode 100644 index 000000000000..49a5557860b5 Binary files /dev/null and b/public/audio/bgm/battle_colress.mp3 differ diff --git a/public/audio/bgm/battle_mustard.mp3 b/public/audio/bgm/battle_mustard.mp3 new file mode 100644 index 000000000000..dccb8f7dcc5f Binary files /dev/null and b/public/audio/bgm/battle_mustard.mp3 differ diff --git a/public/images/trainer/kukui.json b/public/images/trainer/kukui.json new file mode 100644 index 000000000000..139a1456cc57 --- /dev/null +++ b/public/images/trainer/kukui.json @@ -0,0 +1,41 @@ +{ + "textures": [ + { + "image": "kukui.png", + "format": "RGBA8888", + "size": { + "w": 74, + "h": 74 + }, + "scale": 1, + "frames": [ + { + "filename": "0001.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 37, + "h": 74 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 37, + "h": 74 + }, + "frame": { + "x": 0, + "y": 0, + "w": 37, + "h": 74 + } + } + ] + } + ], + "meta": { + "app": "https://www.codeandweb.com/texturepacker", + "version": "3.0", + "smartupdate": "$TexturePacker:SmartUpdate:bccd7af37a8608585716e34d0acb49af:8e1ebc6f022707fbb1e6b4f7d1dbb00c:70bdbf4bca082082ae121aa8ef03c2be$" + } +} diff --git a/public/images/trainer/kukui.png b/public/images/trainer/kukui.png new file mode 100644 index 000000000000..aacf1c197ee8 Binary files /dev/null and b/public/images/trainer/kukui.png differ diff --git a/public/images/trainer/mustard.json b/public/images/trainer/mustard.json new file mode 100644 index 000000000000..5c3a73f0a0ba --- /dev/null +++ b/public/images/trainer/mustard.json @@ -0,0 +1,41 @@ +{ + "textures": [ + { + "image": "mustard.png", + "format": "RGBA8888", + "size": { + "w": 71, + "h": 71 + }, + "scale": 1, + "frames": [ + { + "filename": "0001.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 57, + "h": 71 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 57, + "h": 71 + }, + "frame": { + "x": 0, + "y": 0, + "w": 57, + "h": 71 + } + } + ] + } + ], + "meta": { + "app": "https://www.codeandweb.com/texturepacker", + "version": "3.0", + "smartupdate": "$TexturePacker:SmartUpdate:8e2d109ee2cb1b2a6dda840c5bba1d4e:8116b1de2fd7bc0ca08e2d3e618b3dae:ac5d03e7cabff8ff660969c2bc2f3b36$" + } +} diff --git a/public/images/trainer/mustard.png b/public/images/trainer/mustard.png new file mode 100644 index 000000000000..0acba02db452 Binary files /dev/null and b/public/images/trainer/mustard.png differ diff --git a/public/locales b/public/locales index 5ef993b95fa8..2d3765a4f035 160000 --- a/public/locales +++ b/public/locales @@ -1 +1 @@ -Subproject commit 5ef993b95fa8248adc0fb7d9489baccf546bf8e3 +Subproject commit 2d3765a4f035b4916523bf75b754e153e9d65134 diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 00503da90f2b..7c5f04caf451 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -2113,10 +2113,14 @@ export default class BattleScene extends SceneBase { return 10.145; case "battle_kalos_champion": //XY Kalos Champion Battle return 10.380; + case "battle_champion_kukui": //SM Kukui Battle + return 15.784; case "battle_alola_champion": //USUM Alola Champion Battle return 13.025; case "battle_galar_champion": //SWSH Galar Champion Battle return 61.635; + case "battle_mustard": //SWSH Mustard Battle + return 22.442; case "battle_champion_geeta": //SV Champion Geeta Battle return 37.447; case "battle_champion_nemona": //SV Champion Nemona Battle @@ -2265,6 +2269,8 @@ export default class BattleScene extends SceneBase { return 133.362; case "battle_galactic_admin": //BDSP Team Galactic Admin Battle return 11.997; + case "battle_colress": //B2W2 Colress Battle + return 12.234; case "battle_skull_admin": //SM Team Skull Admin Battle return 15.463; case "battle_oleana": //SWSH Oleana Battle diff --git a/src/battle.ts b/src/battle.ts index 287a981f83dd..fa333040c222 100644 --- a/src/battle.ts +++ b/src/battle.ts @@ -578,14 +578,14 @@ export const classicFixedBattles: FixedBattleConfigs = { [ClassicFixedBossWaves.EVIL_GRUNT_3]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(ClassicFixedBossWaves.EVIL_GRUNT_1) .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_GRUNT, TrainerType.MAGMA_GRUNT, TrainerType.AQUA_GRUNT, TrainerType.GALACTIC_GRUNT, TrainerType.PLASMA_GRUNT, TrainerType.FLARE_GRUNT, TrainerType.AETHER_GRUNT, TrainerType.SKULL_GRUNT, TrainerType.MACRO_GRUNT, TrainerType.STAR_GRUNT ], true)), [ClassicFixedBossWaves.EVIL_ADMIN_1]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(ClassicFixedBossWaves.EVIL_GRUNT_1) - .setGetTrainerFunc(getRandomTrainerFunc([[ TrainerType.ARCHER, TrainerType.ARIANA, TrainerType.PROTON, TrainerType.PETREL ], [ TrainerType.TABITHA, TrainerType.COURTNEY ], [ TrainerType.MATT, TrainerType.SHELLY ], [ TrainerType.JUPITER, TrainerType.MARS, TrainerType.SATURN ], [ TrainerType.ZINZOLIN, TrainerType.ROOD ], [ TrainerType.XEROSIC, TrainerType.BRYONY ], TrainerType.FABA, TrainerType.PLUMERIA, TrainerType.OLEANA, [ TrainerType.GIACOMO, TrainerType.MELA, TrainerType.ATTICUS, TrainerType.ORTEGA, TrainerType.ERI ]], true)), + .setGetTrainerFunc(getRandomTrainerFunc([[ TrainerType.ARCHER, TrainerType.ARIANA, TrainerType.PROTON, TrainerType.PETREL ], [ TrainerType.TABITHA, TrainerType.COURTNEY ], [ TrainerType.MATT, TrainerType.SHELLY ], [ TrainerType.JUPITER, TrainerType.MARS, TrainerType.SATURN ], [ TrainerType.ZINZOLIN, TrainerType.COLRESS ], [ TrainerType.XEROSIC, TrainerType.BRYONY ], TrainerType.FABA, TrainerType.PLUMERIA, TrainerType.OLEANA, [ TrainerType.GIACOMO, TrainerType.MELA, TrainerType.ATTICUS, TrainerType.ORTEGA, TrainerType.ERI ]], true)), [ClassicFixedBossWaves.RIVAL_4]: new FixedBattleConfig().setBattleType(BattleType.TRAINER) .setGetTrainerFunc(() => new Trainer(TrainerType.RIVAL_4, globalScene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT)) .setCustomModifierRewards({ guaranteedModifierTiers: [ ModifierTier.ULTRA, ModifierTier.ULTRA, ModifierTier.ULTRA, ModifierTier.ULTRA ], allowLuckUpgrades: false }), [ClassicFixedBossWaves.EVIL_GRUNT_4]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(ClassicFixedBossWaves.EVIL_GRUNT_1) .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_GRUNT, TrainerType.MAGMA_GRUNT, TrainerType.AQUA_GRUNT, TrainerType.GALACTIC_GRUNT, TrainerType.PLASMA_GRUNT, TrainerType.FLARE_GRUNT, TrainerType.AETHER_GRUNT, TrainerType.SKULL_GRUNT, TrainerType.MACRO_GRUNT, TrainerType.STAR_GRUNT ], true)), [ClassicFixedBossWaves.EVIL_ADMIN_2]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(ClassicFixedBossWaves.EVIL_GRUNT_1) - .setGetTrainerFunc(getRandomTrainerFunc([[ TrainerType.ARCHER, TrainerType.ARIANA, TrainerType.PROTON, TrainerType.PETREL ], [ TrainerType.TABITHA, TrainerType.COURTNEY ], [ TrainerType.MATT, TrainerType.SHELLY ], [ TrainerType.JUPITER, TrainerType.MARS, TrainerType.SATURN ], [ TrainerType.ZINZOLIN, TrainerType.ROOD ], [ TrainerType.XEROSIC, TrainerType.BRYONY ], TrainerType.FABA, TrainerType.PLUMERIA, TrainerType.OLEANA, [ TrainerType.GIACOMO, TrainerType.MELA, TrainerType.ATTICUS, TrainerType.ORTEGA, TrainerType.ERI ]], true, 1)), + .setGetTrainerFunc(getRandomTrainerFunc([[ TrainerType.ARCHER, TrainerType.ARIANA, TrainerType.PROTON, TrainerType.PETREL ], [ TrainerType.TABITHA, TrainerType.COURTNEY ], [ TrainerType.MATT, TrainerType.SHELLY ], [ TrainerType.JUPITER, TrainerType.MARS, TrainerType.SATURN ], [ TrainerType.ZINZOLIN, TrainerType.COLRESS ], [ TrainerType.XEROSIC, TrainerType.BRYONY ], TrainerType.FABA, TrainerType.PLUMERIA, TrainerType.OLEANA, [ TrainerType.GIACOMO, TrainerType.MELA, TrainerType.ATTICUS, TrainerType.ORTEGA, TrainerType.ERI ]], true, 1)), [ClassicFixedBossWaves.EVIL_BOSS_1]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(ClassicFixedBossWaves.EVIL_GRUNT_1) .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_BOSS_GIOVANNI_1, TrainerType.MAXIE, TrainerType.ARCHIE, TrainerType.CYRUS, TrainerType.GHETSIS, TrainerType.LYSANDRE, TrainerType.LUSAMINE, TrainerType.GUZMA, TrainerType.ROSE, TrainerType.PENNY ])) .setCustomModifierRewards({ guaranteedModifierTiers: [ ModifierTier.ROGUE, ModifierTier.ROGUE, ModifierTier.ULTRA, ModifierTier.ULTRA, ModifierTier.ULTRA ], allowLuckUpgrades: false }), @@ -604,7 +604,7 @@ export const classicFixedBattles: FixedBattleConfigs = { [ClassicFixedBossWaves.ELITE_FOUR_4]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(ClassicFixedBossWaves.ELITE_FOUR_1) .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.LANCE, TrainerType.KAREN, TrainerType.DRAKE, TrainerType.LUCIAN, TrainerType.CAITLIN, TrainerType.DRASNA, TrainerType.KAHILI, TrainerType.RAIHAN_ELITE, TrainerType.HASSEL, TrainerType.DRAYTON ])), [ClassicFixedBossWaves.CHAMPION]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(ClassicFixedBossWaves.ELITE_FOUR_1) - .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.BLUE, [ TrainerType.RED, TrainerType.LANCE_CHAMPION ], [ TrainerType.STEVEN, TrainerType.WALLACE ], TrainerType.CYNTHIA, [ TrainerType.ALDER, TrainerType.IRIS ], TrainerType.DIANTHA, TrainerType.HAU, TrainerType.LEON, [ TrainerType.GEETA, TrainerType.NEMONA ], TrainerType.KIERAN ])), + .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.BLUE, [ TrainerType.RED, TrainerType.LANCE_CHAMPION ], [ TrainerType.STEVEN, TrainerType.WALLACE ], TrainerType.CYNTHIA, [ TrainerType.ALDER, TrainerType.IRIS ], TrainerType.DIANTHA, [ TrainerType.KUKUI, TrainerType.HAU ], [ TrainerType.LEON, TrainerType.MUSTARD ], [ TrainerType.GEETA, TrainerType.NEMONA ], TrainerType.KIERAN ])), [ClassicFixedBossWaves.RIVAL_6]: new FixedBattleConfig().setBattleType(BattleType.TRAINER) .setGetTrainerFunc(() => new Trainer(TrainerType.RIVAL_6, globalScene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT)) .setCustomModifierRewards({ guaranteedModifierTiers: [ ModifierTier.ROGUE, ModifierTier.ROGUE, ModifierTier.ULTRA, ModifierTier.ULTRA, ModifierTier.GREAT, ModifierTier.GREAT ], allowLuckUpgrades: false }) diff --git a/src/data/challenge.ts b/src/data/challenge.ts index fab5196601c8..2b2048ca18d9 100644 --- a/src/data/challenge.ts +++ b/src/data/challenge.ts @@ -469,7 +469,7 @@ export class SingleGenerationChallenge extends Challenge { let trainerTypes: (TrainerType | TrainerType[])[] = []; const evilTeamWaves: number[] = [ ClassicFixedBossWaves.EVIL_GRUNT_1, ClassicFixedBossWaves.EVIL_GRUNT_2, ClassicFixedBossWaves.EVIL_GRUNT_3, ClassicFixedBossWaves.EVIL_ADMIN_1, ClassicFixedBossWaves.EVIL_GRUNT_4, ClassicFixedBossWaves.EVIL_ADMIN_2, ClassicFixedBossWaves.EVIL_BOSS_1, ClassicFixedBossWaves.EVIL_BOSS_2 ]; const evilTeamGrunts = [[ TrainerType.ROCKET_GRUNT ], [ TrainerType.ROCKET_GRUNT ], [ TrainerType.MAGMA_GRUNT, TrainerType.AQUA_GRUNT ], [ TrainerType.GALACTIC_GRUNT ], [ TrainerType.PLASMA_GRUNT ], [ TrainerType.FLARE_GRUNT ], [ TrainerType.AETHER_GRUNT, TrainerType.SKULL_GRUNT ], [ TrainerType.MACRO_GRUNT ], [ TrainerType.STAR_GRUNT ]]; - const evilTeamAdmins = [[ TrainerType.ARCHER, TrainerType.ARIANA, TrainerType.PROTON, TrainerType.PETREL ], [ TrainerType.ARCHER, TrainerType.ARIANA, TrainerType.PROTON, TrainerType.PETREL ], [[ TrainerType.TABITHA, TrainerType.COURTNEY ], [ TrainerType.MATT, TrainerType.SHELLY ]], [ TrainerType.JUPITER, TrainerType.MARS, TrainerType.SATURN ], [ TrainerType.ZINZOLIN, TrainerType.ROOD ], [ TrainerType.XEROSIC, TrainerType.BRYONY ], [ TrainerType.FABA, TrainerType.PLUMERIA ], [ TrainerType.OLEANA ], [ TrainerType.GIACOMO, TrainerType.MELA, TrainerType.ATTICUS, TrainerType.ORTEGA, TrainerType.ERI ]]; + const evilTeamAdmins = [[ TrainerType.ARCHER, TrainerType.ARIANA, TrainerType.PROTON, TrainerType.PETREL ], [ TrainerType.ARCHER, TrainerType.ARIANA, TrainerType.PROTON, TrainerType.PETREL ], [[ TrainerType.TABITHA, TrainerType.COURTNEY ], [ TrainerType.MATT, TrainerType.SHELLY ]], [ TrainerType.JUPITER, TrainerType.MARS, TrainerType.SATURN ], [ TrainerType.ZINZOLIN, TrainerType.COLRESS ], [ TrainerType.XEROSIC, TrainerType.BRYONY ], [ TrainerType.FABA, TrainerType.PLUMERIA ], [ TrainerType.OLEANA ], [ TrainerType.GIACOMO, TrainerType.MELA, TrainerType.ATTICUS, TrainerType.ORTEGA, TrainerType.ERI ]]; const evilTeamBosses = [[ TrainerType.ROCKET_BOSS_GIOVANNI_1 ], [ TrainerType.ROCKET_BOSS_GIOVANNI_1 ], [ TrainerType.MAXIE, TrainerType.ARCHIE ], [ TrainerType.CYRUS ], [ TrainerType.GHETSIS ], [ TrainerType.LYSANDRE ], [ TrainerType.LUSAMINE, TrainerType.GUZMA ], [ TrainerType.ROSE ], [ TrainerType.PENNY ]]; const evilTeamBossRematches = [[ TrainerType.ROCKET_BOSS_GIOVANNI_2 ], [ TrainerType.ROCKET_BOSS_GIOVANNI_2 ], [ TrainerType.MAXIE_2, TrainerType.ARCHIE_2 ], [ TrainerType.CYRUS_2 ], [ TrainerType.GHETSIS_2 ], [ TrainerType.LYSANDRE_2 ], [ TrainerType.LUSAMINE_2, TrainerType.GUZMA_2 ], [ TrainerType.ROSE_2 ], [ TrainerType.PENNY_2 ]]; switch (waveIndex) { @@ -509,7 +509,7 @@ export class SingleGenerationChallenge extends Challenge { trainerTypes = [ TrainerType.LANCE, TrainerType.KAREN, TrainerType.DRAKE, TrainerType.LUCIAN, TrainerType.CAITLIN, TrainerType.DRASNA, TrainerType.KAHILI, TrainerType.RAIHAN_ELITE, TrainerType.HASSEL ]; break; case ClassicFixedBossWaves.CHAMPION: - trainerTypes = [ TrainerType.BLUE, Utils.randSeedItem([ TrainerType.RED, TrainerType.LANCE_CHAMPION ]), Utils.randSeedItem([ TrainerType.STEVEN, TrainerType.WALLACE ]), TrainerType.CYNTHIA, Utils.randSeedItem([ TrainerType.ALDER, TrainerType.IRIS ]), TrainerType.DIANTHA, TrainerType.HAU, TrainerType.LEON, Utils.randSeedItem([ TrainerType.GEETA, TrainerType.NEMONA ]) ]; + trainerTypes = [ TrainerType.BLUE, Utils.randSeedItem([ TrainerType.RED, TrainerType.LANCE_CHAMPION ]), Utils.randSeedItem([ TrainerType.STEVEN, TrainerType.WALLACE ]), TrainerType.CYNTHIA, Utils.randSeedItem([ TrainerType.ALDER, TrainerType.IRIS ]), TrainerType.DIANTHA, Utils.randSeedItem([ TrainerType.KUKUI, TrainerType.HAU ]), Utils.randSeedItem([ TrainerType.LEON, TrainerType.MUSTARD ]), Utils.randSeedItem([ TrainerType.GEETA, TrainerType.NEMONA ]) ]; break; } if (trainerTypes.length === 0) { diff --git a/src/data/dialogue.ts b/src/data/dialogue.ts index 3219ce4d058f..b42850fe4de6 100644 --- a/src/data/dialogue.ts +++ b/src/data/dialogue.ts @@ -726,17 +726,17 @@ export const trainerTypeDialogue: TrainerTypeDialogue = { ] } ], - [TrainerType.ROOD]: [ + [TrainerType.COLRESS]: [ { encounter: [ - "dialogue:rood.encounter.1", - "dialogue:rood.encounter.2", - "dialogue:rood.encounter.3", + "dialogue:colress.encounter.1", + "dialogue:colress.encounter.2", + "dialogue:colress.encounter.3", ], victory: [ - "dialogue:rood.victory.1", - "dialogue:rood.victory.2", - "dialogue:rood.victory.3", + "dialogue:colress.victory.1", + "dialogue:colress.victory.2", + "dialogue:colress.victory.3", ] } ], @@ -2505,6 +2505,17 @@ export const trainerTypeDialogue: TrainerTypeDialogue = { "dialogue:iris.defeat.1" ] }, + [TrainerType.KUKUI]: { + encounter: [ + "dialogue:kukui.encounter.1" + ], + victory: [ + "dialogue:kukui.victory.1" + ], + defeat: [ + "dialogue:kukui.defeat.1" + ] + }, [TrainerType.HAU]: { encounter: [ "dialogue:hau.encounter.1" @@ -2549,6 +2560,17 @@ export const trainerTypeDialogue: TrainerTypeDialogue = { "dialogue:leon.defeat.1" ] }, + [TrainerType.MUSTARD]: { + encounter: [ + "dialogue:mustard.encounter.1" + ], + victory: [ + "dialogue:mustard.victory.1" + ], + defeat: [ + "dialogue:mustard.defeat.1" + ] + }, [TrainerType.WHITNEY]: { encounter: [ "dialogue:whitney.encounter.1" diff --git a/src/data/mystery-encounters/encounters/clowning-around-encounter.ts b/src/data/mystery-encounters/encounters/clowning-around-encounter.ts index f6700bb37160..35d8ef0396f9 100644 --- a/src/data/mystery-encounters/encounters/clowning-around-encounter.ts +++ b/src/data/mystery-encounters/encounters/clowning-around-encounter.ts @@ -15,7 +15,7 @@ import { TrainerType } from "#enums/trainer-type"; import { getPokemonSpecies } from "#app/data/pokemon-species"; import { Abilities } from "#enums/abilities"; import { applyAbilityOverrideToPokemon, applyModifierTypeToPlayerPokemon } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; -import type { Type } from "#enums/type"; +import { Type } from "#enums/type"; import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { randSeedInt, randSeedShuffle } from "#app/utils"; @@ -347,7 +347,7 @@ export const ClowningAroundEncounter: MysteryEncounter = priorityTypes = randSeedShuffle(priorityTypes); } - const newTypes = [ originalTypes[0] ]; + const newTypes = [ Type.UNKNOWN ]; let secondType: Type | null = null; while (secondType === null || secondType === newTypes[0] || originalTypes.includes(secondType)) { if (priorityTypes.length > 0) { diff --git a/src/data/mystery-encounters/encounters/weird-dream-encounter.ts b/src/data/mystery-encounters/encounters/weird-dream-encounter.ts index e8a4c405d5f4..e047a7a4f011 100644 --- a/src/data/mystery-encounters/encounters/weird-dream-encounter.ts +++ b/src/data/mystery-encounters/encounters/weird-dream-encounter.ts @@ -1,4 +1,4 @@ -import type { Type } from "#enums/type"; +import { Type } from "#enums/type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { Species } from "#enums/species"; import { globalScene } from "#app/global-scene"; @@ -528,7 +528,7 @@ async function postProcessTransformedPokemon(previousPokemon: PlayerPokemon, new // Randomize the second type of the pokemon // If the pokemon does not normally have a second type, it will gain 1 - const newTypes = [ newPokemon.getTypes()[0] ]; + const newTypes = [ Type.UNKNOWN ]; let newType = randSeedInt(18) as Type; while (newType === newTypes[0]) { newType = randSeedInt(18) as Type; diff --git a/src/data/trainer-config.ts b/src/data/trainer-config.ts index 897231a96110..590a86884286 100644 --- a/src/data/trainer-config.ts +++ b/src/data/trainer-config.ts @@ -614,6 +614,13 @@ export class TrainerConfig { [TrainerPoolTier.RARE]: [ Species.HISUI_ZORUA, Species.AXEW, Species.DEINO, Species.HISUI_BRAVIARY ] }; } + case "plasma_2": { + return { + [TrainerPoolTier.COMMON]: [ Species.MAGNEMITE, Species.GRIMER, Species.VOLTORB, Species.PORYGON, Species.BRONZOR, Species.MUNNA, Species.SOLOSIS, Species.JOLTIK, Species.FERROSEED, Species.TYNAMO, Species.ELGYEM ], + [TrainerPoolTier.UNCOMMON]: [ Species.BELDUM, Species.ROTOM, Species.TIRTOUGA, Species.ARCHEN, Species.GOLETT, Species.DURANT, Species.GRUBBIN, Species.BLIPBUG, Species.VAROOM, Species.ALOLA_GRIMER, Species.HISUI_VOLTORB ], + [TrainerPoolTier.RARE]: [ Species.ELEKID, Species.MAGBY, Species.PAWNIARD, Species.DURALUDON ] + }; + } case "flare": { return { [TrainerPoolTier.COMMON]: [ Species.FLETCHLING, Species.LITLEO, Species.INKAY, Species.FOONGUS, Species.HELIOPTILE, Species.ELECTRIKE, Species.SKORUPI, Species.PURRLOIN, Species.CLAWITZER, Species.PANCHAM, Species.ESPURR, Species.BUNNELBY ], @@ -1538,7 +1545,7 @@ export const trainerConfigs: TrainerConfigs = { [TrainerPoolTier.SUPER_RARE]: [ Species.DRUDDIGON, Species.HISUI_ZORUA, Species.AXEW, Species.DEINO ] }), [TrainerType.ZINZOLIN]: new TrainerConfig(++t).setMoneyMultiplier(1.5).initForEvilTeamAdmin("plasma_sage", "plasma", [ Species.CRYOGONAL ]).setEncounterBgm(TrainerType.PLASMA_GRUNT).setBattleBgm("battle_plasma_grunt").setMixedBattleBgm("battle_plasma_grunt").setVictoryBgm("victory_team_plasma").setPartyTemplateFunc(() => getEvilGruntPartyTemplate()), - [TrainerType.ROOD]: new TrainerConfig(++t).setMoneyMultiplier(1.5).initForEvilTeamAdmin("plasma_sage", "plasma", [ Species.SWOOBAT ]).setEncounterBgm(TrainerType.PLASMA_GRUNT).setBattleBgm("battle_plasma_grunt").setMixedBattleBgm("battle_plasma_grunt").setVictoryBgm("victory_team_plasma").setPartyTemplateFunc(() => getEvilGruntPartyTemplate()), + [TrainerType.COLRESS]: new TrainerConfig(++t).setMoneyMultiplier(1.5).initForEvilTeamAdmin("plasma_boss", "plasma_2", [ Species.KLINKLANG ]).setEncounterBgm(TrainerType.PLASMA_GRUNT).setBattleBgm("battle_colress").setMixedBattleBgm("battle_colress").setVictoryBgm("victory_team_plasma").setPartyTemplateFunc(() => getEvilGruntPartyTemplate()), [TrainerType.FLARE_GRUNT]: new TrainerConfig(++t).setHasGenders("Flare Grunt Female").setHasDouble("Flare Grunts").setMoneyMultiplier(1.0).setEncounterBgm(TrainerType.PLASMA_GRUNT).setBattleBgm("battle_plasma_grunt").setMixedBattleBgm("battle_flare_grunt").setVictoryBgm("victory_team_plasma").setPartyTemplateFunc(() => getEvilGruntPartyTemplate()) .setSpeciesPools({ [TrainerPoolTier.COMMON]: [ Species.FLETCHLING, Species.LITLEO, Species.PONYTA, Species.INKAY, Species.HOUNDOUR, Species.SKORUPI, Species.SCRAFTY, Species.CROAGUNK, Species.SCATTERBUG, Species.ESPURR ], @@ -1935,6 +1942,34 @@ export const trainerConfigs: TrainerConfigs = { const teraPokemon = party[3]; return [ modifierTypes.TERA_SHARD().generateType([], [ teraPokemon.species.type2 ])!.withIdFromFunc(modifierTypes.TERA_SHARD).newModifier(teraPokemon) as PersistentModifier ]; }), + [TrainerType.KUKUI]: new TrainerConfig(++t).initForChampion(true).setMixedBattleBgm("battle_champion_kukui") + .setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.LYCANROC ], TrainerSlot.TRAINER, true, p => { + p.generateAndPopulateMoveset(); + p.formIndex = 2; // Dusk Lycanroc + })) + .setPartyMemberFunc(1, getRandomPartyMemberFunc([ Species.MAGNEZONE, Species.ALOLA_NINETALES ])) + .setPartyMemberFunc(2, getRandomPartyMemberFunc([ Species.TORNADUS, Species.THUNDURUS, Species.LANDORUS ], TrainerSlot.TRAINER, true, p => { + p.formIndex = 1; // Therian Forms + p.generateAndPopulateMoveset(); + p.pokeball = PokeballType.ULTRA_BALL; + })) + .setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.TAPU_KOKO, Species.TAPU_FINI ], TrainerSlot.TRAINER, true, p => { + p.generateAndPopulateMoveset(); + p.setBoss(true, 2); + p.pokeball = PokeballType.ULTRA_BALL; + })) + .setPartyMemberFunc(4, getRandomPartyMemberFunc([ Species.SNORLAX ], TrainerSlot.TRAINER, true, p => { + p.generateAndPopulateMoveset(); + p.formIndex = 1; // G-Max Snorlax + })) + .setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.INCINEROAR, Species.HISUI_DECIDUEYE ], TrainerSlot.TRAINER, true, p => { + p.generateAndPopulateMoveset(); + p.gender = Gender.MALE; + })) + .setGenModifiersFunc(party => { + const teraPokemon = party[5]; + return [ modifierTypes.TERA_SHARD().generateType([], [ teraPokemon.species.type2 ])!.withIdFromFunc(modifierTypes.TERA_SHARD).newModifier(teraPokemon) as PersistentModifier ]; + }), [TrainerType.HAU]: new TrainerConfig(++t).initForChampion(true).setMixedBattleBgm("battle_alola_champion") .setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.ALOLA_RAICHU ], TrainerSlot.TRAINER, true, p => { p.generateAndPopulateMoveset(); @@ -1944,7 +1979,7 @@ export const trainerConfigs: TrainerConfigs = { p.generateAndPopulateMoveset(); p.pokeball = PokeballType.MASTER_BALL; })) - .setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.TAPU_KOKO, Species.TAPU_LELE, Species.TAPU_BULU, Species.TAPU_FINI ], TrainerSlot.TRAINER, true, p => { + .setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.TAPU_LELE, Species.TAPU_BULU ], TrainerSlot.TRAINER, true, p => { p.generateAndPopulateMoveset(); p.pokeball = PokeballType.ULTRA_BALL; })) @@ -1953,7 +1988,7 @@ export const trainerConfigs: TrainerConfigs = { p.generateAndPopulateMoveset(); p.pokeball = PokeballType.ROGUE_BALL; })) - .setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.DECIDUEYE, Species.INCINEROAR, Species.PRIMARINA ], TrainerSlot.TRAINER, true, p => { + .setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.DECIDUEYE, Species.PRIMARINA ], TrainerSlot.TRAINER, true, p => { p.generateAndPopulateMoveset(); p.setBoss(true, 2); p.gender = p.species.speciesId === Species.PRIMARINA ? Gender.FEMALE : Gender.MALE; @@ -1986,6 +2021,39 @@ export const trainerConfigs: TrainerConfigs = { const teraPokemon = party[3]; return [ modifierTypes.TERA_SHARD().generateType([], [ teraPokemon.species.type1 ])!.withIdFromFunc(modifierTypes.TERA_SHARD).newModifier(teraPokemon) as PersistentModifier ]; }), + [TrainerType.MUSTARD]: new TrainerConfig(++t).initForChampion(true).setMixedBattleBgm("battle_mustard") + .setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.CORVIKNIGHT ], TrainerSlot.TRAINER, true, p => { + p.generateAndPopulateMoveset(); + p.pokeball = PokeballType.ULTRA_BALL; + })) + .setPartyMemberFunc(1, getRandomPartyMemberFunc([ Species.KOMMO_O ], TrainerSlot.TRAINER, true, p => { + p.generateAndPopulateMoveset(); + p.pokeball = PokeballType.ULTRA_BALL; + })) + .setPartyMemberFunc(2, getRandomPartyMemberFunc([ Species.GALAR_SLOWBRO, Species.GALAR_SLOWKING ], TrainerSlot.TRAINER, true, p => { + p.generateAndPopulateMoveset(); + p.pokeball = PokeballType.ULTRA_BALL; + })) + .setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.GALAR_DARMANITAN ], TrainerSlot.TRAINER, true, p => { + p.generateAndPopulateMoveset(); + p.pokeball = PokeballType.ULTRA_BALL; + })) + .setPartyMemberFunc(4, getRandomPartyMemberFunc([ Species.BLASTOISE, Species.VENUSAUR ], TrainerSlot.TRAINER, true, p => { + p.generateAndPopulateMoveset(); + p.setBoss(true, 2); + p.pokeball = PokeballType.ULTRA_BALL; + })) + .setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.URSHIFU ], TrainerSlot.TRAINER, true, p => { + p.formIndex = Utils.randSeedInt(2, 2); // Random G-Max Urshifu + p.generateAndPopulateMoveset(); + p.generateName(); + p.gender = Gender.MALE; + p.pokeball = PokeballType.ULTRA_BALL; + })) + .setGenModifiersFunc(party => { + const teraPokemon = party[2]; + return [ modifierTypes.TERA_SHARD().generateType([], [ teraPokemon.species.type2 ])!.withIdFromFunc(modifierTypes.TERA_SHARD).newModifier(teraPokemon) as PersistentModifier ]; + }), [TrainerType.GEETA]: new TrainerConfig(++t).initForChampion(false).setMixedBattleBgm("battle_champion_geeta") .setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.GLIMMORA ], TrainerSlot.TRAINER, true, p => { p.generateAndPopulateMoveset(); @@ -2033,12 +2101,11 @@ export const trainerConfigs: TrainerConfigs = { p.generateAndPopulateMoveset(); })) .setPartyMemberFunc(1, getRandomPartyMemberFunc([ Species.INCINEROAR, Species.GRIMMSNARL ], TrainerSlot.TRAINER, true, p => { - // Intimidate Incineroar, Prankster Grimmsnarl p.generateAndPopulateMoveset(); if (p.species.speciesId === Species.INCINEROAR) { - p.abilityIndex = 2; + p.abilityIndex = 2; // Intimidate } else if (p.species.speciesId === Species.GRIMMSNARL) { - p.abilityIndex = 0; + p.abilityIndex = 0; // Prankster } })) .setPartyMemberFunc(2, getRandomPartyMemberFunc([ Species.TERAPAGOS ], TrainerSlot.TRAINER, true, p => { diff --git a/src/enums/trainer-type.ts b/src/enums/trainer-type.ts index 708faf691962..e22dc5d81c78 100644 --- a/src/enums/trainer-type.ts +++ b/src/enums/trainer-type.ts @@ -68,7 +68,7 @@ export enum TrainerType { SATURN, PLASMA_GRUNT, ZINZOLIN, - ROOD, + COLRESS, FLARE_GRUNT, BRYONY, XEROSIC, @@ -243,8 +243,10 @@ export enum TrainerType { ALDER, IRIS, DIANTHA, + KUKUI, HAU, LEON, + MUSTARD, GEETA, NEMONA, KIERAN, diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 5b7cafeefb80..112665e17239 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -7,7 +7,7 @@ import { variantColorCache } from "#app/data/variant"; import { variantData } from "#app/data/variant"; import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from "#app/ui/battle-info"; import type Move from "#app/data/move"; -import { HighCritAttr, HitsTagAttr, applyMoveAttrs, FixedDamageAttr, VariableAtkAttr, allMoves, MoveCategory, TypelessAttr, CritOnlyAttr, getMoveTargets, OneHitKOAttr, VariableMoveTypeAttr, VariableDefAttr, AttackMove, ModifiedDamageAttr, VariableMoveTypeMultiplierAttr, IgnoreOpponentStatStagesAttr, SacrificialAttr, VariableMoveCategoryAttr, CounterDamageAttr, StatStageChangeAttr, RechargeAttr, IgnoreWeatherTypeDebuffAttr, BypassBurnDamageReductionAttr, SacrificialAttrOnHit, OneHitKOAccuracyAttr, RespectAttackTypeImmunityAttr, MoveTarget, CombinedPledgeStabBoostAttr, VariableMoveTypeChartAttr } from "#app/data/move"; +import { HighCritAttr, HitsTagAttr, applyMoveAttrs, FixedDamageAttr, VariableAtkAttr, allMoves, MoveCategory, TypelessAttr, CritOnlyAttr, getMoveTargets, OneHitKOAttr, VariableMoveTypeAttr, VariableDefAttr, AttackMove, ModifiedDamageAttr, VariableMoveTypeMultiplierAttr, IgnoreOpponentStatStagesAttr, SacrificialAttr, VariableMoveCategoryAttr, CounterDamageAttr, StatStageChangeAttr, RechargeAttr, IgnoreWeatherTypeDebuffAttr, BypassBurnDamageReductionAttr, SacrificialAttrOnHit, OneHitKOAccuracyAttr, RespectAttackTypeImmunityAttr, MoveTarget, CombinedPledgeStabBoostAttr, VariableMoveTypeChartAttr, HpSplitAttr } from "#app/data/move"; import type { PokemonSpeciesForm } from "#app/data/pokemon-species"; import { default as PokemonSpecies, getFusedSpeciesName, getPokemonSpecies, getPokemonSpeciesForm } from "#app/data/pokemon-species"; import { getStarterValueFriendshipCap, speciesStarterCosts } from "#app/data/balance/starters"; @@ -1259,52 +1259,39 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { if (!types.length || !includeTeraType) { if (!ignoreOverride && this.summonData?.types && this.summonData.types.length > 0) { this.summonData.types.forEach(t => types.push(t)); - } else if (this.customPokemonData.types && this.customPokemonData.types.length > 0) { - // "Permanent" override for a Pokemon's normal types, currently only used by Mystery Encounters - types.push(this.customPokemonData.types[0]); - - // Fusing a Pokemon onto something with "permanently changed" types will still apply the fusion's types as normal - const fusionSpeciesForm = this.getFusionSpeciesForm(ignoreOverride); - if (fusionSpeciesForm) { - // Check if the fusion Pokemon also had "permanently changed" types - const fusionMETypes = this.fusionCustomPokemonData?.types; - if (fusionMETypes && fusionMETypes.length >= 2 && fusionMETypes[1] !== types[0]) { - types.push(fusionMETypes[1]); - } else if (fusionMETypes && fusionMETypes.length === 1 && fusionMETypes[0] !== types[0]) { - types.push(fusionMETypes[0]); - } else if (fusionSpeciesForm.type2 !== null && fusionSpeciesForm.type2 !== types[0]) { - types.push(fusionSpeciesForm.type2); - } else if (fusionSpeciesForm.type1 !== types[0]) { - types.push(fusionSpeciesForm.type1); - } - } - - if (types.length === 1 && this.customPokemonData.types.length >= 2) { - types.push(this.customPokemonData.types[1]); - } } else { const speciesForm = this.getSpeciesForm(ignoreOverride); + const fusionSpeciesForm = this.getFusionSpeciesForm(ignoreOverride); + const customTypes = this.customPokemonData.types?.length > 0; - types.push(speciesForm.type1); + // First type, checking for "permanently changed" types from ME + const firstType = (customTypes && this.customPokemonData.types[0] !== Type.UNKNOWN) ? this.customPokemonData.types[0] : speciesForm.type1; + types.push(firstType); + + // Second type + let secondType: Type | null = null; - const fusionSpeciesForm = this.getFusionSpeciesForm(ignoreOverride); if (fusionSpeciesForm) { - // Check if the fusion Pokemon also had "permanently changed" types - // Otherwise, use standard fusion type logic - const fusionMETypes = this.fusionCustomPokemonData?.types; - if (fusionMETypes && fusionMETypes.length >= 2 && fusionMETypes[1] !== types[0]) { - types.push(fusionMETypes[1]); - } else if (fusionMETypes && fusionMETypes.length === 1 && fusionMETypes[0] !== types[0]) { - types.push(fusionMETypes[0]); - } else if (fusionSpeciesForm.type2 !== null && fusionSpeciesForm.type2 !== speciesForm.type1) { - types.push(fusionSpeciesForm.type2); - } else if (fusionSpeciesForm.type1 !== speciesForm.type1) { - types.push(fusionSpeciesForm.type1); + // Check if the fusion Pokemon also has permanent changes from ME when determining the fusion types + const fusionType1 = (this.fusionCustomPokemonData?.types && this.fusionCustomPokemonData.types.length > 0 && this.fusionCustomPokemonData.types[0] !== Type.UNKNOWN) + ? this.fusionCustomPokemonData.types[0] : fusionSpeciesForm.type1; + const fusionType2 = (this.fusionCustomPokemonData?.types && this.fusionCustomPokemonData.types.length > 1 && this.fusionCustomPokemonData.types[1] !== Type.UNKNOWN) + ? this.fusionCustomPokemonData.types[1] : fusionSpeciesForm.type2; + + // Assign second type if the fusion can provide one + if (fusionType2 !== null && fusionType2 !== types[0]) { + secondType = fusionType2; + } else if (fusionType1 !== types[0]) { + secondType = fusionType1; } + } else { + // If not a fusion, just get the second type from the species, checking for permanent changes from ME + secondType = (customTypes && this.customPokemonData.types.length > 1 && this.customPokemonData.types[1] !== Type.UNKNOWN) + ? this.customPokemonData.types[1] : speciesForm.type2; } - if (types.length === 1 && speciesForm.type2 !== null) { - types.push(speciesForm.type2); + if (secondType) { + types.push(secondType); } } } @@ -2237,9 +2224,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } } - // Bosses never get self ko moves + // Bosses never get self ko moves or Pain Split if (this.isBoss()) { movePool = movePool.filter(m => !allMoves[m[0]].hasAttr(SacrificialAttr)); + movePool = movePool.filter(m => !allMoves[m[0]].hasAttr(HpSplitAttr)); } movePool = movePool.filter(m => !allMoves[m[0]].hasAttr(SacrificialAttrOnHit)); if (this.hasTrainer()) { @@ -4564,7 +4552,6 @@ export class PlayerPokemon extends Pokemon { changeForm(formChange: SpeciesFormChange): Promise { return new Promise(resolve => { - const previousFormIndex = this.formIndex; this.formIndex = Math.max(this.species.forms.findIndex(f => f.formKey === formChange.formKey), 0); this.generateName(); const abilityCount = this.getSpeciesForm().getAbilityCount(); @@ -4572,25 +4559,6 @@ export class PlayerPokemon extends Pokemon { this.abilityIndex = abilityCount - 1; } - // In cases where a form change updates the type of a Pokemon from its previous form (Arceus, Silvally, Castform, etc.), - // persist that type change in customPokemonData if necessary - const baseForm = this.species.forms[previousFormIndex]; - const baseFormTypes = [ baseForm.type1, baseForm.type2 ]; - if (this.customPokemonData.types.length > 0) { - if (this.getSpeciesForm().type1 !== baseFormTypes[0]) { - this.customPokemonData.types[0] = this.getSpeciesForm().type1; - } - - const type2 = this.getSpeciesForm().type2; - if (!isNullOrUndefined(type2) && type2 !== baseFormTypes[1]) { - if (this.customPokemonData.types.length > 1) { - this.customPokemonData.types[1] = type2; - } else { - this.customPokemonData.types.push(type2); - } - } - } - this.compatibleTms.splice(0, this.compatibleTms.length); this.generateCompatibleTms(); const updateAndResolve = () => { @@ -4727,7 +4695,7 @@ export class EnemyPokemon extends Pokemon { this.status = new Status(Overrides.OPP_STATUS_OVERRIDE, 0, 4); } - if (Overrides.OPP_GENDER_OVERRIDE) { + if (Overrides.OPP_GENDER_OVERRIDE !== null) { this.gender = Overrides.OPP_GENDER_OVERRIDE; } diff --git a/src/phases/title-phase.ts b/src/phases/title-phase.ts index 219ff441c520..86b5fe04a09e 100644 --- a/src/phases/title-phase.ts +++ b/src/phases/title-phase.ts @@ -150,6 +150,14 @@ export class TitlePhase extends Phase { }, keepOpen: true }, + { + label: i18next.t("menu:runHistory"), + handler: () => { + globalScene.ui.setOverlayMode(Mode.RUN_HISTORY); + return true; + }, + keepOpen: true + }, { label: i18next.t("menu:settings"), handler: () => { diff --git a/src/test/field/pokemon.test.ts b/src/test/field/pokemon.test.ts index 1e3769a35b18..b8b7349c1f8f 100644 --- a/src/test/field/pokemon.test.ts +++ b/src/test/field/pokemon.test.ts @@ -4,6 +4,8 @@ import GameManager from "../utils/gameManager"; import { PokeballType } from "#enums/pokeball"; import type BattleScene from "#app/battle-scene"; import { Moves } from "#app/enums/moves"; +import { Type } from "#app/enums/type"; +import { CustomPokemonData } from "#app/data/custom-pokemon-data"; describe("Spec - Pokemon", () => { let phaserGame: Phaser.Game; @@ -75,4 +77,131 @@ describe("Spec - Pokemon", () => { expect(fanRotom.compatibleTms).not.toContain(Moves.BLIZZARD); expect(fanRotom.compatibleTms).toContain(Moves.AIR_SLASH); }); + + describe("Get correct fusion type", () => { + let scene: BattleScene; + + beforeEach(async () => { + game.override.enemySpecies(Species.ZUBAT); + game.override.starterSpecies(Species.ABRA); + game.override.enableStarterFusion(); + scene = game.scene; + }); + + it("Fusing two mons with a single type", async () => { + game.override.starterFusionSpecies(Species.CHARMANDER); + await game.classicMode.startBattle(); + const pokemon = scene.getPlayerParty()[0]; + + let types = pokemon.getTypes(); + expect(types[0]).toBe(Type.PSYCHIC); + expect(types[1]).toBe(Type.FIRE); + + // Abra Psychic/Grass + pokemon.customPokemonData.types = [ Type.UNKNOWN, Type.GRASS ]; + types = pokemon.getTypes(); + expect(types[0]).toBe(Type.PSYCHIC); + expect(types[1]).toBe(Type.FIRE); + + // Abra Grass + pokemon.customPokemonData.types = [ Type.GRASS, Type.UNKNOWN ]; + types = pokemon.getTypes(); + expect(types[0]).toBe(Type.GRASS); + expect(types[1]).toBe(Type.FIRE); + + if (!pokemon.fusionCustomPokemonData) { + pokemon.fusionCustomPokemonData = new CustomPokemonData(); + } + pokemon.customPokemonData.types = []; + + // Charmander Fire/Grass + pokemon.fusionCustomPokemonData.types = [ Type.UNKNOWN, Type.GRASS ]; + types = pokemon.getTypes(); + expect(types[0]).toBe(Type.PSYCHIC); + expect(types[1]).toBe(Type.GRASS); + + // Charmander Grass + pokemon.fusionCustomPokemonData.types = [ Type.GRASS, Type.UNKNOWN ]; + types = pokemon.getTypes(); + expect(types[0]).toBe(Type.PSYCHIC); + expect(types[1]).toBe(Type.GRASS); + + // Abra Grass + // Charmander Fire/Grass + pokemon.customPokemonData.types = [ Type.GRASS, Type.UNKNOWN ]; + pokemon.fusionCustomPokemonData.types = [ Type.UNKNOWN, Type.GRASS ]; + types = pokemon.getTypes(); + expect(types[0]).toBe(Type.GRASS); + expect(types[1]).toBe(Type.FIRE); + }); + + it("Fusing two mons with same single type", async () => { + game.override.starterFusionSpecies(Species.DROWZEE); + await game.classicMode.startBattle(); + const pokemon = scene.getPlayerParty()[0]; + + const types = pokemon.getTypes(); + expect(types[0]).toBe(Type.PSYCHIC); + expect(types.length).toBe(1); + }); + + it("Fusing mons with one and two types", async () => { + game.override.starterSpecies(Species.CHARMANDER); + game.override.starterFusionSpecies(Species.HOUNDOUR); + await game.classicMode.startBattle(); + const pokemon = scene.getPlayerParty()[0]; + + const types = pokemon.getTypes(); + expect(types[0]).toBe(Type.FIRE); + expect(types[1]).toBe(Type.DARK); + }); + + it("Fusing two mons with two types", async () => { + game.override.starterSpecies(Species.NATU); + game.override.starterFusionSpecies(Species.HOUNDOUR); + await game.classicMode.startBattle(); + const pokemon = scene.getPlayerParty()[0]; + + let types = pokemon.getTypes(); + expect(types[0]).toBe(Type.PSYCHIC); + expect(types[1]).toBe(Type.FIRE); + + // Natu Psychic/Grass + pokemon.customPokemonData.types = [ Type.UNKNOWN, Type.GRASS ]; + types = pokemon.getTypes(); + expect(types[0]).toBe(Type.PSYCHIC); + expect(types[1]).toBe(Type.FIRE); + + // Natu Grass/Flying + pokemon.customPokemonData.types = [ Type.GRASS, Type.UNKNOWN ]; + types = pokemon.getTypes(); + expect(types[0]).toBe(Type.GRASS); + expect(types[1]).toBe(Type.FIRE); + + if (!pokemon.fusionCustomPokemonData) { + pokemon.fusionCustomPokemonData = new CustomPokemonData(); + } + pokemon.customPokemonData.types = []; + + // Houndour Dark/Grass + pokemon.fusionCustomPokemonData.types = [ Type.UNKNOWN, Type.GRASS ]; + types = pokemon.getTypes(); + expect(types[0]).toBe(Type.PSYCHIC); + expect(types[1]).toBe(Type.GRASS); + + // Houndour Grass/Fire + pokemon.fusionCustomPokemonData.types = [ Type.GRASS, Type.UNKNOWN ]; + types = pokemon.getTypes(); + expect(types[0]).toBe(Type.PSYCHIC); + expect(types[1]).toBe(Type.FIRE); + + // Natu Grass/Flying + // Houndour Dark/Grass + pokemon.customPokemonData.types = [ Type.GRASS, Type.UNKNOWN ]; + pokemon.fusionCustomPokemonData.types = [ Type.UNKNOWN, Type.GRASS ]; + types = pokemon.getTypes(); + expect(types[0]).toBe(Type.GRASS); + expect(types[1]).toBe(Type.DARK); + }); + }); }); diff --git a/src/test/mystery-encounter/encounters/clowning-around-encounter.test.ts b/src/test/mystery-encounter/encounters/clowning-around-encounter.test.ts index 562b8322baab..ae52ffc0fef3 100644 --- a/src/test/mystery-encounter/encounters/clowning-around-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/clowning-around-encounter.test.ts @@ -345,9 +345,9 @@ describe("Clowning Around - Mystery Encounter", () => { scene.getPlayerParty()[2].moveset = []; await runMysteryEncounterToEnd(game, 3); - const leadTypesAfter = scene.getPlayerParty()[0].customPokemonData?.types; - const secondaryTypesAfter = scene.getPlayerParty()[1].customPokemonData?.types; - const thirdTypesAfter = scene.getPlayerParty()[2].customPokemonData?.types; + const leadTypesAfter = scene.getPlayerParty()[0].getTypes(); + const secondaryTypesAfter = scene.getPlayerParty()[1].getTypes(); + const thirdTypesAfter = scene.getPlayerParty()[2].getTypes(); expect(leadTypesAfter.length).toBe(2); expect(leadTypesAfter[0]).toBe(Type.WATER); diff --git a/src/ui/menu-ui-handler.ts b/src/ui/menu-ui-handler.ts index 7ea8dbe7a4e6..1a1070122ab2 100644 --- a/src/ui/menu-ui-handler.ts +++ b/src/ui/menu-ui-handler.ts @@ -21,7 +21,6 @@ enum MenuOptions { GAME_SETTINGS, ACHIEVEMENTS, STATS, - RUN_HISTORY, EGG_LIST, EGG_GACHA, MANAGE_DATA, @@ -508,10 +507,6 @@ export default class MenuUiHandler extends MessageUiHandler { ui.setOverlayMode(Mode.GAME_STATS); success = true; break; - case MenuOptions.RUN_HISTORY: - ui.setOverlayMode(Mode.RUN_HISTORY); - success = true; - break; case MenuOptions.EGG_LIST: if (globalScene.gameData.eggs.length) { ui.revertMode();