From 1cdd3b1377beb17db6548203819209931e9bf1db Mon Sep 17 00:00:00 2001 From: Frank Date: Fri, 27 Dec 2024 22:59:18 -0500 Subject: [PATCH] Merged Psychic_2 macros since checksum doesn't matter here like it does in pret --- .../1.10/convert_battle_frontier_trainers.py | 3 +- .../battle_frontier_trainer_mons.h | 78 +++++++------------ .../battle_frontier_trainers.h | 12 +-- 3 files changed, 33 insertions(+), 60 deletions(-) diff --git a/migration_scripts/1.10/convert_battle_frontier_trainers.py b/migration_scripts/1.10/convert_battle_frontier_trainers.py index 543c0ccfac1..b218c79e313 100644 --- a/migration_scripts/1.10/convert_battle_frontier_trainers.py +++ b/migration_scripts/1.10/convert_battle_frontier_trainers.py @@ -38,8 +38,7 @@ def add_party_data(match): modified_content = destination_pattern.sub(add_party_data, destination_content) # Write the modified content back to battle_frontier_trainers.h -#(const u16[]){FRONTIER_MONS_PARASOL_LADY_1} for file in glob.glob('./src/data/battle_frontier/battle_frontier_trainers.h'): with open(file, 'w') as f: f.write(modified_content) - print("battle_frontier_trainers.h has been updated") \ No newline at end of file + print("battle_frontier_trainers.h has been updated") diff --git a/src/data/battle_frontier/battle_frontier_trainer_mons.h b/src/data/battle_frontier/battle_frontier_trainer_mons.h index c1dab417e73..2cd0283e791 100644 --- a/src/data/battle_frontier/battle_frontier_trainer_mons.h +++ b/src/data/battle_frontier/battle_frontier_trainer_mons.h @@ -1,4 +1,4 @@ -// Also used by early Pkmn Breeder, Collector, and Beauty trainers +// Also used by early PKMN Breeder, Collector, and Beauty trainers #define FRONTIER_MONS_YOUNGSTER_LASS_1 \ FRONTIER_MON_SUNKERN, \ FRONTIER_MON_AZURILL, \ @@ -64,7 +64,7 @@ FRONTIER_MON_VULPIX, \ -1 -// Also used by early Pkmn Breeder, Collector, and Beauty trainers +// Also used by early PKMN Breeder, Collector, and Beauty trainers #define FRONTIER_MONS_SCHOOL_KID_1 \ FRONTIER_MON_PIKACHU, \ FRONTIER_MON_SANDSHREW, \ @@ -152,7 +152,7 @@ FRONTIER_MON_ARIADOS, \ -1 -// Also used by early Pkmn Breeder, Collector, and Beauty trainers +// Also used by early PKMN Breeder, Collector, and Beauty trainers #define FRONTIER_MONS_CAMPER_PICNICKER_1 \ FRONTIER_MON_GRIMER, \ FRONTIER_MON_KRABBY, \ @@ -2833,7 +2833,7 @@ FRONTIER_MON_TYRANITAR_10, \ -1 -// Also used by Pkmn Ranger M/F +// Also used by PKMN Ranger M/F // For both classes, M uses Latios and F uses Latias #define FRONTIER_MONS_COOLTRAINER_2D(lati) \ FRONTIER_MON_ARTICUNO_1, \ @@ -3118,7 +3118,7 @@ FRONTIER_MON_RAPIDASH_4, \ -1 -// Used by Pkmn Ranger M, Gentleman, Running Triathlete, and Cycling Triathlete +// Used by PKMN Ranger M, Gentleman, Running Triathlete, and Cycling Triathlete #define FRONTIER_MONS_GENERAL_A \ FRONTIER_MON_DUGTRIO_4, \ FRONTIER_MON_MEDICHAM_4, \ @@ -3219,7 +3219,7 @@ -1 // Identical to FRONTIER_MONS_GENERAL_A but _3 -// Used by Pkmn Ranger, Running Triathlete, and Cycling Triathlete +// Used by PKMN Ranger, Running Triathlete, and Cycling Triathlete #define FRONTIER_MONS_GENERAL_B \ FRONTIER_MON_DUGTRIO_3, \ FRONTIER_MON_MEDICHAM_3, \ @@ -3320,7 +3320,7 @@ -1 // Similar to FRONTIER_MONS_GENERAL_A/B but _2 -// Used by Pkmn Ranger, Running Triathlete, and Cycling Triathlete +// Used by PKMN Ranger, Running Triathlete, and Cycling Triathlete #define FRONTIER_MONS_GENERAL_C \ FRONTIER_MON_DUGTRIO_2, \ FRONTIER_MON_MEDICHAM_2, \ @@ -3421,7 +3421,7 @@ -1 // Similar to FRONTIER_MONS_GENERAL_C but _1 (would be identical if not for re-ordering) -// Used by Pkmn Ranger, Running Triathlete, Cycling Triathlete +// Used by PKMN Ranger, Running Triathlete, Cycling Triathlete #define FRONTIER_MONS_GENERAL_D \ FRONTIER_MON_DUGTRIO_1, \ FRONTIER_MON_MEDICHAM_1, \ @@ -4245,6 +4245,22 @@ FRONTIER_MON_##legend2##_4, \ FRONTIER_MON_##legend3##_4, \ FRONTIER_MON_##lati##_4, \ + FRONTIER_MON_##legend1##_5, \ + FRONTIER_MON_##legend2##_5, \ + FRONTIER_MON_##legend3##_5, \ + FRONTIER_MON_##lati##_5, \ + FRONTIER_MON_##legend1##_6, \ + FRONTIER_MON_##legend2##_6, \ + FRONTIER_MON_##legend3##_6, \ + FRONTIER_MON_##lati##_6, \ + FRONTIER_MON_##legend1##_7, \ + FRONTIER_MON_##legend2##_7, \ + FRONTIER_MON_##legend3##_7, \ + FRONTIER_MON_##lati##_7, \ + FRONTIER_MON_##legend1##_8, \ + FRONTIER_MON_##legend2##_8, \ + FRONTIER_MON_##legend3##_8, \ + FRONTIER_MON_##lati##_8, \ FRONTIER_MON_GARDEVOIR_5, \ FRONTIER_MON_GARDEVOIR_6, \ FRONTIER_MON_GARDEVOIR_7, \ @@ -4256,49 +4272,7 @@ FRONTIER_MON_METAGROSS_5, \ FRONTIER_MON_METAGROSS_6, \ FRONTIER_MON_METAGROSS_7, \ - FRONTIER_MON_METAGROSS_8, - -#define FRONTIER_MONS_PSYCHIC_2A(lati) \ - FRONTIER_MONS_PSYCHIC_2(lati, ARTICUNO, ZAPDOS, MOLTRES) \ - FRONTIER_MON_##lati##_5, \ - FRONTIER_MON_##lati##_6, \ - FRONTIER_MON_##lati##_7, \ - FRONTIER_MON_##lati##_8, \ - FRONTIER_MON_ARTICUNO_5, \ - FRONTIER_MON_ARTICUNO_6, \ - FRONTIER_MON_ZAPDOS_5, \ - FRONTIER_MON_ZAPDOS_6, \ - FRONTIER_MON_MOLTRES_5, \ - FRONTIER_MON_MOLTRES_6, \ - -1 - -#define FRONTIER_MONS_PSYCHIC_2B(lati) \ - FRONTIER_MONS_PSYCHIC_2(lati, RAIKOU, ENTEI, SUICUNE) \ - FRONTIER_MON_##lati##_5, \ - FRONTIER_MON_##lati##_6, \ - FRONTIER_MON_##lati##_7, \ - FRONTIER_MON_##lati##_8, \ - FRONTIER_MON_RAIKOU_5, \ - FRONTIER_MON_RAIKOU_6, \ - FRONTIER_MON_ENTEI_5, \ - FRONTIER_MON_ENTEI_6, \ - FRONTIER_MON_SUICUNE_5, \ - FRONTIER_MON_SUICUNE_6, \ - -1 - -// Because the Regis/Latis are swapped here they can't all be merged into the same macro and match -#define FRONTIER_MONS_PSYCHIC_2C(lati) \ - FRONTIER_MONS_PSYCHIC_2(lati, REGIROCK, REGICE, REGISTEEL) \ - FRONTIER_MON_REGIROCK_5, \ - FRONTIER_MON_REGIROCK_6, \ - FRONTIER_MON_REGICE_5, \ - FRONTIER_MON_REGICE_6, \ - FRONTIER_MON_REGISTEEL_5, \ - FRONTIER_MON_REGISTEEL_6, \ - FRONTIER_MON_##lati##_5, \ - FRONTIER_MON_##lati##_6, \ - FRONTIER_MON_##lati##_7, \ - FRONTIER_MON_##lati##_8, \ + FRONTIER_MON_METAGROSS_8, \ -1 #define FRONTIER_MONS_HEX_MANIAC_2A \ @@ -4453,7 +4427,7 @@ -1 // For whatever reason FRONTIER_MON_MAROWAK_2 is in a different order than _1 _3 and _4 -// This order change is the only difference btween FRONITER_MONS_POKEMANIAC_2A and FRONTIER_MONS_POKEMANIAC_2B other than the numbered suffixes +// This order change is the only difference between FRONITER_MONS_POKEMANIAC_2A and FRONTIER_MONS_POKEMANIAC_2B other than the numbered suffixes #define FRONTIER_MONS_POKEMANIAC_2A \ FRONTIER_MON_ZANGOOSE_2, \ FRONTIER_MON_GRANBULL_1, \ diff --git a/src/data/battle_frontier/battle_frontier_trainers.h b/src/data/battle_frontier/battle_frontier_trainers.h index d6e200a8ab8..1014ffaae2a 100644 --- a/src/data/battle_frontier/battle_frontier_trainers.h +++ b/src/data/battle_frontier/battle_frontier_trainers.h @@ -2001,7 +2001,7 @@ const struct BattleFrontierTrainer gBattleFrontierTrainers[FRONTIER_TRAINERS_COU .speechBefore = {EC_WORD_I_AM, EC_WORD_A, EC_WORD_SUPER, EC_WORD_POKEMON, EC_WORD_HERO, EC_WORD_EXCL}, .speechWin = {EC_WORD_WAS, EC_WORD_THAT, EC_WORD_ENOUGH, EC_WORD_FOR, EC_WORD_YOU, EC_WORD_QUES}, .speechLose = {EC_WORD_YOU, EC_WORD_SHOULD, EC_WORD_NOT, EC_WORD_BEAT, EC_WORD_A, EC_WORD_HERO}, - .monSet = (const u16[]){FRONTIER_MONS_PSYCHIC_2A(LATIOS)} + .monSet = (const u16[]){FRONTIER_MONS_PSYCHIC_2(LATIOS, ARTICUNO, ZAPDOS, MOLTRES)} }, [FRONTIER_TRAINER_STANLY] = { .facilityClass = FACILITY_CLASS_PSYCHIC_M, @@ -2009,7 +2009,7 @@ const struct BattleFrontierTrainer gBattleFrontierTrainers[FRONTIER_TRAINERS_COU .speechBefore = {EC_WORD_THIS, EC_WORD_SHOULD, EC_WORD_BE, EC_WORD_AN, EC_WORD_EASY, EC_WORD_MATCH}, .speechWin = {EC_WORD_IT, EC_WORD_REALLY, EC_WORD_WAS, EC_WORD_EASY, EC_EMPTY_WORD, EC_EMPTY_WORD}, .speechLose = {EC_WORD_ARE, EC_WORD_YOU, EC_WORD_HAPPY, EC_WORD_NOW, EC_WORD_QUES, EC_EMPTY_WORD}, - .monSet = (const u16[]){FRONTIER_MONS_PSYCHIC_2B(LATIOS)} + .monSet = (const u16[]){FRONTIER_MONS_PSYCHIC_2(LATIOS, RAIKOU, ENTEI, SUICUNE)} }, [FRONTIER_TRAINER_DARIO] = { .facilityClass = FACILITY_CLASS_PSYCHIC_M, @@ -2017,7 +2017,7 @@ const struct BattleFrontierTrainer gBattleFrontierTrainers[FRONTIER_TRAINERS_COU .speechBefore = {EC_WORD_MY, EC_MOVE2(FORESIGHT), EC_WORD_SAYS, EC_WORD_I, EC_WORD_WILL, EC_WORD_WIN}, .speechWin = {EC_WORD_MY, EC_MOVE2(FORESIGHT), EC_WORD_HAS, EC_WORD_BEEN, EC_WORD_PERFECT, EC_EMPTY_WORD}, .speechLose = {EC_WORD_I, EC_WORD_DIDN_T, EC_WORD_SEE, EC_WORD_THIS, EC_MOVE(REVERSAL), EC_WORD_ELLIPSIS}, - .monSet = (const u16[]){FRONTIER_MONS_PSYCHIC_2C(LATIOS)} + .monSet = (const u16[]){FRONTIER_MONS_PSYCHIC_2(LATIOS, REGIROCK, REGICE, REGISTEEL)} }, [FRONTIER_TRAINER_KARLEE] = { .facilityClass = FACILITY_CLASS_PSYCHIC_F, @@ -2025,7 +2025,7 @@ const struct BattleFrontierTrainer gBattleFrontierTrainers[FRONTIER_TRAINERS_COU .speechBefore = {EC_WORD_SOMETHING, EC_WORD_GOOD, EC_WORD_WILL, EC_WORD_COME, EC_WORD_OF, EC_WORD_THIS}, .speechWin = {EC_WORD_YOU, EC_WORD_SEE, EC_WORD_QUES, EC_WORD_FANTASTIC, EC_WORD_EXCL, EC_EMPTY_WORD}, .speechLose = {EC_WORD_THAT, EC_WORD_SOMETHING, EC_WORD_GOOD, EC_WORD_WENT, EC_WORD_TO, EC_WORD_YOU}, - .monSet = (const u16[]){FRONTIER_MONS_PSYCHIC_2A(LATIAS)} + .monSet = (const u16[]){FRONTIER_MONS_PSYCHIC_2(LATIAS, ARTICUNO, ZAPDOS, MOLTRES)} }, [FRONTIER_TRAINER_JAYLIN] = { .facilityClass = FACILITY_CLASS_PSYCHIC_F, @@ -2033,7 +2033,7 @@ const struct BattleFrontierTrainer gBattleFrontierTrainers[FRONTIER_TRAINERS_COU .speechBefore = {EC_WORD_EVERY, EC_WORD_TRAINER, EC_WORD_HAS, EC_WORD_BEEN, EC_WORD_TOO_WEAK, EC_WORD_ELLIPSIS}, .speechWin = {EC_WORD_IT_S, EC_WORD_MAKING, EC_WORD_ME, EC_MOVE(YAWN), EC_WORD_THAT, EC_WORD_BATTLE}, .speechLose = {EC_WORD_I, EC_WORD_SLEPT, EC_WORD_AND, EC_WORD_SO, EC_WORD_I, EC_WORD_LOST}, - .monSet = (const u16[]){FRONTIER_MONS_PSYCHIC_2B(LATIAS)} + .monSet = (const u16[]){FRONTIER_MONS_PSYCHIC_2(LATIAS, RAIKOU, ENTEI, SUICUNE)} }, [FRONTIER_TRAINER_INGRID] = { .facilityClass = FACILITY_CLASS_PSYCHIC_F, @@ -2041,7 +2041,7 @@ const struct BattleFrontierTrainer gBattleFrontierTrainers[FRONTIER_TRAINERS_COU .speechBefore = {EC_WORD_I_AM, EC_WORD_NOT, EC_WORD_A, EC_WORD_VERY, EC_WORD_MEAN, EC_WORD_TRAINER}, .speechWin = {EC_WORD_WASN_T, EC_WORD_THAT, EC_WORD_A, EC_WORD_GOOD, EC_WORD_MATCH, EC_WORD_QUES}, .speechLose = {EC_WORD_I, EC_WORD_LOST, EC_WORD_CAUSE, EC_WORD_YOU_RE, EC_WORD_MEAN, EC_WORD_ELLIPSIS}, - .monSet = (const u16[]){FRONTIER_MONS_PSYCHIC_2C(LATIAS)} + .monSet = (const u16[]){FRONTIER_MONS_PSYCHIC_2(LATIAS, REGIROCK, REGICE, REGISTEEL)} }, [FRONTIER_TRAINER_DELILAH] = { .facilityClass = FACILITY_CLASS_HEX_MANIAC,