From 76a6df43c4b262015eb570985b658c2c6cf44515 Mon Sep 17 00:00:00 2001 From: Madmadness65 Date: Thu, 22 Feb 2024 23:24:44 -0600 Subject: [PATCH] Fix off-by-one champions; implement Strong Jaw This fix currently has the unintended side effect of making Champion Leon unable to be fought, but every other set of Elite Fours is now followed by the proper Champions as intended. --- src/battle.ts | 2 +- src/data/ability.ts | 3 ++- src/data/biomes.ts | 2 +- src/data/enums/trainer-type.ts | 2 +- src/data/trainer-config.ts | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/battle.ts b/src/battle.ts index ceb552e5593..5652a9b8674 100644 --- a/src/battle.ts +++ b/src/battle.ts @@ -250,7 +250,7 @@ export const fixedBattles: FixedBattleConfigs = { [188]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(182) .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.LANCE, TrainerType.KAREN, TrainerType.DRAKE, TrainerType.LUCIAN, TrainerType.CAITLIN, TrainerType.DRASNA, TrainerType.KAHILI, TrainerType.HASSEL, TrainerType.DRAYTON ])), [190]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(182) - .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.HAU, [ TrainerType.GEETA, TrainerType.NEMONA ], TrainerType.KIERAN, TrainerType.LEON ])), [195]: new FixedBattleConfig().setBattleType(BattleType.TRAINER) .setGetTrainerFunc(scene => new Trainer(scene, TrainerType.RIVAL_6, scene.gameData.gender === PlayerGender.MALE)) }; \ No newline at end of file diff --git a/src/data/ability.ts b/src/data/ability.ts index 5a62775ab13..c020dc97e54 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -1851,7 +1851,8 @@ export function initAbilities() { new Ability(Abilities.BULLETPROOF, "Bulletproof", "Protects the Pokémon from some ball and bomb moves.", 6) .attr(MoveImmunityAbAttr, (pokemon, attacker, move) => pokemon !== attacker && move.getMove().hasFlag(MoveFlags.BALLBOMB_MOVE)), new Ability(Abilities.COMPETITIVE, "Competitive (N)", "Boosts the Sp. Atk stat sharply when a stat is lowered.", 6), - new Ability(Abilities.STRONG_JAW, "Strong Jaw (N)", "The Pokémon's strong jaw boosts the power of its biting moves.", 6), + new Ability(Abilities.STRONG_JAW, "Strong Jaw", "The Pokémon's strong jaw boosts the power of its biting moves.", 6) + .attr(MovePowerBoostAbAttr, (user, target, move) => move.hasFlag(MoveFlags.BITING_MOVE), 1.5), new Ability(Abilities.REFRIGERATE, "Refrigerate (N)", "Normal-type moves become Ice-type moves. The power of those moves is boosted a little.", 6), new Ability(Abilities.SWEET_VEIL, "Sweet Veil (N)", "Prevents itself and ally Pokémon from falling asleep.", 6), new Ability(Abilities.STANCE_CHANGE, "Stance Change (N)", "The Pokémon changes its form to Blade Forme when it uses an attack move and changes to Shield Forme when it uses King's Shield.", 6), diff --git a/src/data/biomes.ts b/src/data/biomes.ts index 4ce054b3392..9d15dcb7a69 100644 --- a/src/data/biomes.ts +++ b/src/data/biomes.ts @@ -7610,10 +7610,10 @@ export const biomeTrainerPools: BiomeTrainerPools = { [ TrainerType.IRIS, [] ], [ TrainerType.DIANTHA, [] ], [ TrainerType.HAU, [] ], - [ TrainerType.LEON, [] ], [ TrainerType.GEETA, [] ], [ TrainerType.NEMONA, [] ], [ TrainerType.KIERAN, [] ], + [ TrainerType.LEON, [] ], [ TrainerType.RIVAL, [] ] ]; diff --git a/src/data/enums/trainer-type.ts b/src/data/enums/trainer-type.ts index 27a352eeeca..d4826736604 100644 --- a/src/data/enums/trainer-type.ts +++ b/src/data/enums/trainer-type.ts @@ -170,10 +170,10 @@ export enum TrainerType { IRIS, DIANTHA, HAU, - LEON, GEETA, NEMONA, KIERAN, + LEON, // He's problematic right now because he has no corresponding Elite Four RIVAL = 375, RIVAL_2, RIVAL_3, diff --git a/src/data/trainer-config.ts b/src/data/trainer-config.ts index 4aa37b84c22..66b2d0c1906 100644 --- a/src/data/trainer-config.ts +++ b/src/data/trainer-config.ts @@ -764,10 +764,10 @@ export const trainerConfigs: TrainerConfigs = { [TrainerType.IRIS]: new TrainerConfig(++t).initForChampion([ Species.HAXORUS, Species.YVELTAL, Species.DRUDDIGON, Species.ARON, Species.LAPRAS ]), [TrainerType.DIANTHA]: new TrainerConfig(++t).initForChampion([ Species.HAWLUCHA, Species.XERNEAS, Species.GOURGEIST, Species.GOODRA, Species.GARDEVOIR ]), [TrainerType.HAU]: new TrainerConfig(++t).initForChampion([ Species.ALOLA_RAICHU, [ Species.SOLGALEO, Species.LUNALA ], Species.NOIVERN, [ Species.DECIDUEYE, Species.INCINEROAR, Species.PRIMARINA ], Species.CRABOMINABLE ]), - [TrainerType.LEON]: new TrainerConfig(++t).initForChampion([ Species.DRAGAPULT, [ Species.ZACIAN, Species.ZAMAZENTA ], Species.SEISMITOAD, Species.AEGISLASH, Species.MR_RIME ]), [TrainerType.GEETA]: new TrainerConfig(++t).initForChampion([ Species.GLIMMORA, Species.MIRAIDON, Species.ESPATHRA, Species.VELUZA, Species.KINGAMBIT ]), [TrainerType.NEMONA]: new TrainerConfig(++t).initForChampion([ Species.LYCANROC, Species.KORAIDON, Species.KOMMO_O, Species.PAWMOT, Species.DUSKNOIR ]), [TrainerType.KIERAN]: new TrainerConfig(++t).initForChampion([ Species.POLITOED, Species.TERAPAGOS, Species.HYDRAPPLE, Species.PORYGON_Z, Species.GRIMMSNARL ]), + [TrainerType.LEON]: new TrainerConfig(++t).initForChampion([ Species.DRAGAPULT, [ Species.ZACIAN, Species.ZAMAZENTA ], Species.SEISMITOAD, Species.AEGISLASH, Species.MR_RIME ]), [TrainerType.RIVAL]: new TrainerConfig((t = TrainerType.RIVAL)).setName('Finn').setHasGenders('Ivy').setHasCharSprite().setTitle('Rival').setStaticParty().setEncounterBgm(TrainerType.RIVAL).setBattleBgm('battle_rival').setPartyTemplates(trainerPartyTemplates.RIVAL) .setModifierRewardFuncs(() => modifierTypes.SUPER_EXP_CHARM, () => modifierTypes.EXP_SHARE).setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE, Species.CHIKORITA, Species.CYNDAQUIL, Species.TOTODILE, Species.TREECKO, Species.TORCHIC, Species.MUDKIP, Species.TURTWIG, Species.CHIMCHAR, Species.PIPLUP, Species.SNIVY, Species.TEPIG, Species.OSHAWOTT, Species.CHESPIN, Species.FENNEKIN, Species.FROAKIE, Species.ROWLET, Species.LITTEN, Species.POPPLIO, Species.GROOKEY, Species.SCORBUNNY, Species.SOBBLE, Species.SPRIGATITO, Species.FUECOCO, Species.QUAXLY ]))