From 9a31fdf7becd6e1e3e59ee5f0b9589469f81837f Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 26 Feb 2022 11:38:08 -0300 Subject: [PATCH 01/18] Updated Applin, Sinistea and Galarian Slowpoke evolution data --- src/data/pokemon/evolution.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/data/pokemon/evolution.h b/src/data/pokemon/evolution.h index b431b88a3b..093fcce98b 100644 --- a/src/data/pokemon/evolution.h +++ b/src/data/pokemon/evolution.h @@ -467,15 +467,15 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_YAMPER] = {{EVO_LEVEL, 25, SPECIES_BOLTUND}}, [SPECIES_ROLYCOLY] = {{EVO_LEVEL, 18, SPECIES_CARKOL}}, [SPECIES_CARKOL] = {{EVO_LEVEL, 34, SPECIES_COALOSSAL}}, - [SPECIES_APPLIN] = {{EVO_ITEM, ITEM_NONE, SPECIES_FLAPPLE}, - {EVO_ITEM, ITEM_NONE, SPECIES_APPLETUN}}, + [SPECIES_APPLIN] = {{EVO_ITEM, ITEM_TART_APPLE, SPECIES_FLAPPLE}, + {EVO_ITEM, ITEM_SWEET_APPLE, SPECIES_APPLETUN}}, [SPECIES_SILICOBRA] = {{EVO_LEVEL, 36, SPECIES_SANDACONDA}}, [SPECIES_ARROKUDA] = {{EVO_LEVEL, 26, SPECIES_BARRASKEWDA}}, [SPECIES_TOXEL] = {{EVO_LEVEL_NATURE_AMPED, 30, SPECIES_TOXTRICITY}, {EVO_LEVEL_NATURE_LOW_KEY, 30, SPECIES_TOXTRICITY_LOW_KEY}}, [SPECIES_SIZZLIPEDE] = {{EVO_LEVEL, 28, SPECIES_CENTISKORCH}}, [SPECIES_CLOBBOPUS] = {{EVO_MOVE, MOVE_TAUNT, SPECIES_GRAPPLOCT}}, - [SPECIES_SINISTEA] = {{EVO_ITEM, ITEM_NONE, SPECIES_POLTEAGEIST}}, + [SPECIES_SINISTEA] = {{EVO_ITEM, ITEM_CRACKED_POT, SPECIES_POLTEAGEIST}}, [SPECIES_HATENNA] = {{EVO_LEVEL, 32, SPECIES_HATTREM}}, [SPECIES_HATTREM] = {{EVO_LEVEL, 42, SPECIES_HATTERENE}}, [SPECIES_IMPIDIMP] = {{EVO_LEVEL, 32, SPECIES_MORGREM}}, @@ -505,8 +505,8 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_GRIMER_ALOLAN] = {{EVO_LEVEL, 38, SPECIES_MUK_ALOLAN}}, [SPECIES_MEOWTH_GALARIAN] = {{EVO_LEVEL, 28, SPECIES_PERRSERKER}}, [SPECIES_PONYTA_GALARIAN] = {{EVO_LEVEL, 40, SPECIES_RAPIDASH_GALARIAN}}, - [SPECIES_SLOWPOKE_GALARIAN] = {{EVO_ITEM, ITEM_NONE, SPECIES_SLOWBRO_GALARIAN}, - {EVO_ITEM, ITEM_NONE, SPECIES_SLOWKING_GALARIAN}}, + [SPECIES_SLOWPOKE_GALARIAN] = {{EVO_ITEM, ITEM_GALARICA_CUFF, SPECIES_SLOWBRO_GALARIAN}, + {EVO_ITEM, ITEM_GALARICA_WREATH, SPECIES_SLOWKING_GALARIAN}}, [SPECIES_FARFETCHD_GALARIAN] = {{EVO_LEVEL, 0, SPECIES_SIRFETCHD}}, [SPECIES_MR_MIME_GALARIAN] = {{EVO_LEVEL, 42, SPECIES_MR_RIME}}, [SPECIES_CORSOLA_GALARIAN] = {{EVO_LEVEL, 38, SPECIES_CURSOLA}}, @@ -534,5 +534,5 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_PUMPKABOO_LARGE] = {{EVO_TRADE, 0, SPECIES_GOURGEIST_LARGE}}, [SPECIES_PUMPKABOO_SUPER] = {{EVO_TRADE, 0, SPECIES_GOURGEIST_SUPER}}, [SPECIES_ROCKRUFF_OWN_TEMPO] = {{EVO_LEVEL_DUSK, 25, SPECIES_LYCANROC_DUSK}}, - [SPECIES_SINISTEA_ANTIQUE] = {{EVO_ITEM, ITEM_NONE, SPECIES_POLTEAGEIST_ANTIQUE}}, + [SPECIES_SINISTEA_ANTIQUE] = {{EVO_ITEM, ITEM_CHIPPED_POT, SPECIES_POLTEAGEIST_ANTIQUE}}, }; From 755b31bee0a500a963f5c4de137c9b8c9953b03f Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 26 Feb 2022 12:19:38 -0300 Subject: [PATCH 02/18] Enable form change for the Forces of Nature --- include/constants/pokemon_config.h | 4 +-- src/data/pokemon/form_change_table_pointers.h | 10 +++--- src/data/pokemon/form_change_tables.h | 35 +++++-------------- 3 files changed, 15 insertions(+), 34 deletions(-) diff --git a/include/constants/pokemon_config.h b/include/constants/pokemon_config.h index 257c06b7c0..91561ab7c1 100644 --- a/include/constants/pokemon_config.h +++ b/include/constants/pokemon_config.h @@ -159,8 +159,8 @@ //FORM_ITEM_USE #define ITEM_GRACIDEA 10125 - // #define ITEM_REVEAL_GLASS 10126 - // #define ITEM_PRISON_BOTTLE 10127 + #define ITEM_REVEAL_GLASS 10126 + #define ITEM_PRISON_BOTTLE 10127 #define ITEM_RED_NECTAR 10128 #define ITEM_YELLOW_NECTAR 10129 #define ITEM_PINK_NECTAR 10130 diff --git a/src/data/pokemon/form_change_table_pointers.h b/src/data/pokemon/form_change_table_pointers.h index 39fcc7aee2..d44b70dce8 100644 --- a/src/data/pokemon/form_change_table_pointers.h +++ b/src/data/pokemon/form_change_table_pointers.h @@ -3,7 +3,7 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = [SPECIES_GIRATINA] = sGiratinaFormChangeTable, [SPECIES_GIRATINA_ORIGIN] = sGiratinaFormChangeTable, [SPECIES_SHAYMIN] = sShayminFormChangeTable, - [SPECIES_SHAYMIN_SKY] = sShayminSkyFormChangeTable, + [SPECIES_SHAYMIN_SKY] = sShayminFormChangeTable, [SPECIES_ARCEUS] = sArceusFormChangeTable, [SPECIES_ARCEUS_FIGHTING] = sArceusFormChangeTable, [SPECIES_ARCEUS_FLYING] = sArceusFormChangeTable, @@ -23,13 +23,13 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = [SPECIES_ARCEUS_DARK] = sArceusFormChangeTable, [SPECIES_ARCEUS_FAIRY] = sArceusFormChangeTable, [SPECIES_TORNADUS] = sTornadusFormChangeTable, - [SPECIES_TORNADUS_THERIAN] = sTornadusTherianFormChangeTable, + [SPECIES_TORNADUS_THERIAN] = sTornadusFormChangeTable, [SPECIES_THUNDURUS] = sThundurusFormChangeTable, - [SPECIES_THUNDURUS_THERIAN] = sThundurusTherianFormChangeTable, + [SPECIES_THUNDURUS_THERIAN] = sThundurusFormChangeTable, [SPECIES_LANDORUS] = sLandorusFormChangeTable, - [SPECIES_LANDORUS_THERIAN] = sLandorusTherianFormChangeTable, + [SPECIES_LANDORUS_THERIAN] = sLandorusFormChangeTable, [SPECIES_KELDEO] = sKeldeoFormChangeTable, - [SPECIES_KELDEO_RESOLUTE] = sKeldeoResoluteFormChangeTable, + [SPECIES_KELDEO_RESOLUTE] = sKeldeoFormChangeTable, [SPECIES_GENESECT] = sGenesectFormChangeTable, [SPECIES_GENESECT_DOUSE_DRIVE] = sGenesectFormChangeTable, [SPECIES_GENESECT_SHOCK_DRIVE] = sGenesectFormChangeTable, diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index f980f14b89..a333d62c18 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -47,10 +47,6 @@ static const struct FormChange sGiratinaFormChangeTable[] = { static const struct FormChange sShayminFormChangeTable[] = { {FORM_ITEM_USE_TIME, SPECIES_SHAYMIN_SKY, ITEM_GRACIDEA, DAY}, - {FORM_CHANGE_END}, -}; - -static const struct FormChange sShayminSkyFormChangeTable[] = { {FORM_WITHDRAW, SPECIES_SHAYMIN}, {FORM_CHANGE_END}, }; @@ -95,41 +91,25 @@ static const struct FormChange sArceusFormChangeTable[] = { }; static const struct FormChange sTornadusFormChangeTable[] = { - // {FORM_ITEM_USE, SPECIES_TORNADUS_THERIAN, ITEM_REVEAL_GLASS}, - {FORM_CHANGE_END}, -}; - -static const struct FormChange sTornadusTherianFormChangeTable[] = { - // {FORM_ITEM_USE, SPECIES_TORNADUS, ITEM_REVEAL_GLASS}, + {FORM_ITEM_USE, SPECIES_TORNADUS_THERIAN, ITEM_REVEAL_GLASS}, + {FORM_ITEM_USE, SPECIES_TORNADUS, ITEM_REVEAL_GLASS}, {FORM_CHANGE_END}, }; static const struct FormChange sThundurusFormChangeTable[] = { - // {FORM_ITEM_USE, SPECIES_THUNDURUS_THERIAN, ITEM_REVEAL_GLASS}, - {FORM_CHANGE_END}, -}; - -static const struct FormChange sThundurusTherianFormChangeTable[] = { - // {FORM_ITEM_USE, SPECIES_THUNDURUS, ITEM_REVEAL_GLASS}, + {FORM_ITEM_USE, SPECIES_THUNDURUS_THERIAN, ITEM_REVEAL_GLASS}, + {FORM_ITEM_USE, SPECIES_THUNDURUS, ITEM_REVEAL_GLASS}, {FORM_CHANGE_END}, }; static const struct FormChange sLandorusFormChangeTable[] = { - // {FORM_ITEM_USE, SPECIES_LANDORUS_THERIAN, ITEM_REVEAL_GLASS}, - {FORM_CHANGE_END}, -}; - -static const struct FormChange sLandorusTherianFormChangeTable[] = { - // {FORM_ITEM_USE, SPECIES_LANDORUS, ITEM_REVEAL_GLASS}, + {FORM_ITEM_USE, SPECIES_LANDORUS_THERIAN, ITEM_REVEAL_GLASS}, + {FORM_ITEM_USE, SPECIES_LANDORUS, ITEM_REVEAL_GLASS}, {FORM_CHANGE_END}, }; static const struct FormChange sKeldeoFormChangeTable[] = { {FORM_MOVE, SPECIES_KELDEO_RESOLUTE, MOVE_SECRET_SWORD, WHEN_LEARNED}, - {FORM_CHANGE_END}, -}; - -static const struct FormChange sKeldeoResoluteFormChangeTable[] = { {FORM_MOVE, SPECIES_KELDEO, MOVE_SECRET_SWORD, WHEN_FORGOTTEN}, {FORM_CHANGE_END}, }; @@ -144,7 +124,8 @@ static const struct FormChange sGenesectFormChangeTable[] = { }; static const struct FormChange sHoopaFormChangeTable[] = { - // {FORM_ITEM_USE, SPECIES_HOOPA_UNBOUND, ITEM_PRISON_BOTTLE, SPECIES_HOOPA}, + {FORM_ITEM_USE, SPECIES_HOOPA_UNBOUND, ITEM_PRISON_BOTTLE, SPECIES_HOOPA}, + {FORM_WITHDRAW, SPECIES_HOOPA}, {FORM_CHANGE_END}, }; From e2daf2c258bb9a9971a76a12d978e0f530aaa0f6 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 26 Feb 2022 12:23:37 -0300 Subject: [PATCH 03/18] Fixed bug where switching between 2 forms with the same method would cause only one to change --- src/pokemon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pokemon.c b/src/pokemon.c index 73df906c28..658f88519a 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8267,6 +8267,8 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *mon, u16 method, u32 arg } break; } + if (species != targetSpecies) + break; } } } From b1227af13b27ee235c0f23dac7a0864577fd76f5 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 26 Feb 2022 12:58:49 -0300 Subject: [PATCH 04/18] Reverted to separate form change tables for Forces of Nature. It was causing form changes with holding items to break --- src/data/pokemon/form_change_table_pointers.h | 8 +++---- src/data/pokemon/form_change_tables.h | 23 +++++++++++++++++-- src/pokemon.c | 2 -- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/data/pokemon/form_change_table_pointers.h b/src/data/pokemon/form_change_table_pointers.h index d44b70dce8..d40d332abf 100644 --- a/src/data/pokemon/form_change_table_pointers.h +++ b/src/data/pokemon/form_change_table_pointers.h @@ -23,13 +23,13 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = [SPECIES_ARCEUS_DARK] = sArceusFormChangeTable, [SPECIES_ARCEUS_FAIRY] = sArceusFormChangeTable, [SPECIES_TORNADUS] = sTornadusFormChangeTable, - [SPECIES_TORNADUS_THERIAN] = sTornadusFormChangeTable, + [SPECIES_TORNADUS_THERIAN] = sTornadusTherianFormChangeTable, [SPECIES_THUNDURUS] = sThundurusFormChangeTable, - [SPECIES_THUNDURUS_THERIAN] = sThundurusFormChangeTable, + [SPECIES_THUNDURUS_THERIAN] = sThundurusTherianFormChangeTable, [SPECIES_LANDORUS] = sLandorusFormChangeTable, - [SPECIES_LANDORUS_THERIAN] = sLandorusFormChangeTable, + [SPECIES_LANDORUS_THERIAN] = sLandorusTherianFormChangeTable, [SPECIES_KELDEO] = sKeldeoFormChangeTable, - [SPECIES_KELDEO_RESOLUTE] = sKeldeoFormChangeTable, + [SPECIES_KELDEO_RESOLUTE] = sKeldeoResoluteFormChangeTable, [SPECIES_GENESECT] = sGenesectFormChangeTable, [SPECIES_GENESECT_DOUSE_DRIVE] = sGenesectFormChangeTable, [SPECIES_GENESECT_SHOCK_DRIVE] = sGenesectFormChangeTable, diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index a333d62c18..c224a1a028 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -1,4 +1,8 @@ /* +For cycling between forms with the same method and parameters but different target species (eg. Tornadus using the +Reveal Glass to change between its two forms), a separate form change table is required for each form. +Otherwise, only the last form change on the table will trigger. + FORM_ITEM_HOLD: Form change activates when the item is given to or taken from the selected Pokémon. param1 = item to hold @@ -92,24 +96,40 @@ static const struct FormChange sArceusFormChangeTable[] = { static const struct FormChange sTornadusFormChangeTable[] = { {FORM_ITEM_USE, SPECIES_TORNADUS_THERIAN, ITEM_REVEAL_GLASS}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sTornadusTherianFormChangeTable[] = { {FORM_ITEM_USE, SPECIES_TORNADUS, ITEM_REVEAL_GLASS}, {FORM_CHANGE_END}, }; static const struct FormChange sThundurusFormChangeTable[] = { {FORM_ITEM_USE, SPECIES_THUNDURUS_THERIAN, ITEM_REVEAL_GLASS}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sThundurusTherianFormChangeTable[] = { {FORM_ITEM_USE, SPECIES_THUNDURUS, ITEM_REVEAL_GLASS}, {FORM_CHANGE_END}, }; static const struct FormChange sLandorusFormChangeTable[] = { {FORM_ITEM_USE, SPECIES_LANDORUS_THERIAN, ITEM_REVEAL_GLASS}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sLandorusTherianFormChangeTable[] = { {FORM_ITEM_USE, SPECIES_LANDORUS, ITEM_REVEAL_GLASS}, {FORM_CHANGE_END}, }; static const struct FormChange sKeldeoFormChangeTable[] = { {FORM_MOVE, SPECIES_KELDEO_RESOLUTE, MOVE_SECRET_SWORD, WHEN_LEARNED}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sKeldeoResoluteFormChangeTable[] = { {FORM_MOVE, SPECIES_KELDEO, MOVE_SECRET_SWORD, WHEN_FORGOTTEN}, {FORM_CHANGE_END}, }; @@ -124,8 +144,7 @@ static const struct FormChange sGenesectFormChangeTable[] = { }; static const struct FormChange sHoopaFormChangeTable[] = { - {FORM_ITEM_USE, SPECIES_HOOPA_UNBOUND, ITEM_PRISON_BOTTLE, SPECIES_HOOPA}, - {FORM_WITHDRAW, SPECIES_HOOPA}, + // {FORM_ITEM_USE, SPECIES_HOOPA_UNBOUND, ITEM_PRISON_BOTTLE, SPECIES_HOOPA}, {FORM_CHANGE_END}, }; diff --git a/src/pokemon.c b/src/pokemon.c index 658f88519a..73df906c28 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8267,8 +8267,6 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *mon, u16 method, u32 arg } break; } - if (species != targetSpecies) - break; } } } From 12082e033ddf0a141676fd581318aee283c51da9 Mon Sep 17 00:00:00 2001 From: sneed Date: Mon, 2 May 2022 04:02:58 +0300 Subject: [PATCH 05/18] Fix potential dex pic bug --- src/pokedex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokedex.c b/src/pokedex.c index 176934935b..e3d2f988ba 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -3989,7 +3989,7 @@ static void Task_DisplayCaughtMonDexPage(u8 taskId) gTasks[taskId].tState++; break; case 4: - spriteId = CreateMonPicSprite(dexNum, 0, ((u16)gTasks[taskId].tPersonalityHi << 16) | (u16)gTasks[taskId].tPersonalityLo, TRUE, MON_PAGE_X, MON_PAGE_Y, 0, TAG_NONE); + spriteId = CreateMonPicSprite(NationalPokedexNumToSpecies(dexNum), 0, ((u16)gTasks[taskId].tPersonalityHi << 16) | (u16)gTasks[taskId].tPersonalityLo, TRUE, MON_PAGE_X, MON_PAGE_Y, 0, TAG_NONE); gSprites[spriteId].oam.priority = 0; BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK); SetVBlankCallback(gPokedexVBlankCB); From 7d42f9386151eabd2b471f591b28b55a519dbb62 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Thu, 5 May 2022 11:55:31 -0700 Subject: [PATCH 06/18] added special overworld evo changes --- asm/macros/event.inc | 9 +++++++++ include/constants/pokemon.h | 12 +++++++---- src/data/pokemon/evolution.h | 6 +++--- src/pokemon.c | 39 ++++++++++++++++++++++++++++++++++++ 4 files changed, 59 insertions(+), 7 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 661e675c97..9d99d0432f 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1939,3 +1939,12 @@ setvar VAR_0x8006, \item special CreateEventLegalEnemyMon .endm + + @ Attempts to trigger a special evolution method. + @ 'evoMethod' is the evolution you want to trigger. + @ There may be other conditions required which are coded for in GetEvolutionTargetSpecies. + @ EX: tryspecialevo EVO_WATER_SCROLL will trigger an evolution for Kubfu. + .macro tryspecialevo evoMethod:req + setvar VAR_0x8000, \evoMethod + special TrySpecialOverworldEvo + .endm \ No newline at end of file diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index ba9495158a..2c2c98987d 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -352,14 +352,18 @@ #define EVO_SPECIFIC_MAP 32 // Pokémon levels up on specified map #define EVO_LEVEL_NATURE_AMPED 33 // Pokémon reaches the specified level, it has a Hardy, Brave, Adamant, Naughty, Docile, Impish, Lax, Hasty, Jolly, Naive, Rash, Sassy, or Quirky nature. #define EVO_LEVEL_NATURE_LOW_KEY 34 // Pokémon reaches the specified level, it has a Lonely, Bold, Relaxed, Timid, Serious, Modest, Mild, Quiet, Bashful, Calm, Gentle, or Careful nature. +#define EVO_SCRIPT_TRIGGER_DMG 35 // Pokémon has specified HP below max, then player interacts trigger +#define EVO_DARK_SCROLL 36 // interacts with Scroll of Darkness +#define EVO_WATER_SCROLL 37 // interacts with Scroll of Waters #define EVOS_PER_MON 10 // Evolution 'modes,' for GetEvolutionTargetSpecies -#define EVO_MODE_NORMAL 0 -#define EVO_MODE_TRADE 1 -#define EVO_MODE_ITEM_USE 2 -#define EVO_MODE_ITEM_CHECK 3 // If an Everstone is being held, still want to show that the stone *could* be used on that Pokémon to evolve +#define EVO_MODE_NORMAL 0 +#define EVO_MODE_TRADE 1 +#define EVO_MODE_ITEM_USE 2 +#define EVO_MODE_ITEM_CHECK 3 // If an Everstone is being held, still want to show that the stone *could* be used on that Pokémon to evolve +#define EVO_MODE_OVERWORLD_SPECIAL 4 // Form change types #define FORM_CHANGE_END 0 diff --git a/src/data/pokemon/evolution.h b/src/data/pokemon/evolution.h index b431b88a3b..475e7fc911 100644 --- a/src/data/pokemon/evolution.h +++ b/src/data/pokemon/evolution.h @@ -493,8 +493,8 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_CUFANT] = {{EVO_LEVEL, 34, SPECIES_COPPERAJAH}}, [SPECIES_DREEPY] = {{EVO_LEVEL, 50, SPECIES_DRAKLOAK}}, [SPECIES_DRAKLOAK] = {{EVO_LEVEL, 60, SPECIES_DRAGAPULT}}, - [SPECIES_KUBFU] = {{EVO_LEVEL, 0, SPECIES_URSHIFU}, - {EVO_LEVEL, 0, SPECIES_URSHIFU_RAPID_STRIKE_STYLE}}, + [SPECIES_KUBFU] = {{EVO_DARK_SCROLL, 0, SPECIES_URSHIFU}, + {EVO_WATER_SCROLL, 0, SPECIES_URSHIFU_RAPID_STRIKE_STYLE}}, [SPECIES_RATTATA_ALOLAN] = {{EVO_LEVEL_NIGHT, 20, SPECIES_RATICATE_ALOLAN}}, [SPECIES_SANDSHREW_ALOLAN] = {{EVO_ITEM, ITEM_ICE_STONE, SPECIES_SANDSLASH_ALOLAN}}, [SPECIES_VULPIX_ALOLAN] = {{EVO_ITEM, ITEM_ICE_STONE, SPECIES_NINETALES_ALOLAN}}, @@ -513,7 +513,7 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_ZIGZAGOON_GALARIAN] = {{EVO_LEVEL, 20, SPECIES_LINOONE_GALARIAN}}, [SPECIES_LINOONE_GALARIAN] = {{EVO_LEVEL_NIGHT, 35, SPECIES_OBSTAGOON}}, [SPECIES_DARUMAKA_GALARIAN] = {{EVO_ITEM, ITEM_ICE_STONE, SPECIES_DARMANITAN_GALARIAN}}, - [SPECIES_YAMASK_GALARIAN] = {{EVO_LEVEL, 0, SPECIES_RUNERIGUS}}, + [SPECIES_YAMASK_GALARIAN] = {{EVO_SCRIPT_TRIGGER_DMG, 49, SPECIES_RUNERIGUS}}, [SPECIES_BURMY_SANDY_CLOAK] = {{EVO_LEVEL_FEMALE, 20, SPECIES_WORMADAM_SANDY_CLOAK}, {EVO_LEVEL_MALE, 20, SPECIES_MOTHIM}}, [SPECIES_BURMY_TRASH_CLOAK] = {{EVO_LEVEL_FEMALE, 20, SPECIES_WORMADAM_TRASH_CLOAK}, diff --git a/src/pokemon.c b/src/pokemon.c index 5b40275035..05047caec7 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -6755,6 +6755,28 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s } } break; + // Overworld evolution without leveling; evolution method is being passed into the evolutionItem arg. + case EVO_MODE_OVERWORLD_SPECIAL: + for (i = 0; i < EVOS_PER_MON; i++) + { + switch (gEvolutionTable[species][i].method) + { + case EVO_SCRIPT_TRIGGER_DMG: + if (evolutionItem == EVO_SCRIPT_TRIGGER_DMG + && (GetMonData(mon, MON_DATA_MAX_HP, NULL) - GetMonData(mon, MON_DATA_HP, NULL) >= gEvolutionTable[species][i].param)) + targetSpecies = gEvolutionTable[species][i].targetSpecies; + break; + case EVO_DARK_SCROLL: + if (evolutionItem == EVO_DARK_SCROLL) + targetSpecies = gEvolutionTable[species][i].targetSpecies; + break; + case EVO_WATER_SCROLL: + if (evolutionItem == EVO_WATER_SCROLL) + targetSpecies = gEvolutionTable[species][i].targetSpecies; + break; + } + } + break; } return targetSpecies; @@ -8431,3 +8453,20 @@ static void RemoveIVIndexFromList(u8 *ivs, u8 selectedIv) ivs[j++] = temp[i]; } } + +// Attempts to perform non-level/item related overworld evolutions; called by tryspecialevo command. +void TrySpecialOverworldEvo(void) +{ + u8 i; + u8 evoMethod = gSpecialVar_0x8000; + + for (i = 0; i < PARTY_SIZE; i++) + { + u16 targetSpecies = GetEvolutionTargetSpecies(&gPlayerParty[i], EVO_MODE_OVERWORLD_SPECIAL, evoMethod, SPECIES_NONE); + if (targetSpecies != SPECIES_NONE) + { + gCB2_AfterEvolution = CB2_ReturnToField; + BeginEvolutionScene(&gPlayerParty[i], targetSpecies, TRUE, i); + } + } +} From 616e26121ffa51f3737ca3ce06565700fdb6a929 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Thu, 5 May 2022 12:02:34 -0700 Subject: [PATCH 07/18] added new line --- asm/macros/event.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 9d99d0432f..2bdfc55672 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1947,4 +1947,4 @@ .macro tryspecialevo evoMethod:req setvar VAR_0x8000, \evoMethod special TrySpecialOverworldEvo - .endm \ No newline at end of file + .endm From 03c48b4f3f0998dbe3fc03789d26abe8df6d2f9b Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Thu, 5 May 2022 15:46:53 -0700 Subject: [PATCH 08/18] compatibility with evo_battle --- include/constants/pokemon.h | 8 ++++---- src/data/pokemon/evolution.h | 6 +++++- src/pokemon.c | 15 +++++++++++++++ 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 2c2c98987d..f4fa1f8003 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -352,9 +352,9 @@ #define EVO_SPECIFIC_MAP 32 // Pokémon levels up on specified map #define EVO_LEVEL_NATURE_AMPED 33 // Pokémon reaches the specified level, it has a Hardy, Brave, Adamant, Naughty, Docile, Impish, Lax, Hasty, Jolly, Naive, Rash, Sassy, or Quirky nature. #define EVO_LEVEL_NATURE_LOW_KEY 34 // Pokémon reaches the specified level, it has a Lonely, Bold, Relaxed, Timid, Serious, Modest, Mild, Quiet, Bashful, Calm, Gentle, or Careful nature. -#define EVO_SCRIPT_TRIGGER_DMG 35 // Pokémon has specified HP below max, then player interacts trigger -#define EVO_DARK_SCROLL 36 // interacts with Scroll of Darkness -#define EVO_WATER_SCROLL 37 // interacts with Scroll of Waters +#define EVO_SCRIPT_TRIGGER_DMG 36 // Pokémon has specified HP below max, then player interacts trigger +#define EVO_DARK_SCROLL 37 // interacts with Scroll of Darkness +#define EVO_WATER_SCROLL 38 // interacts with Scroll of Waters #define EVOS_PER_MON 10 @@ -363,7 +363,7 @@ #define EVO_MODE_TRADE 1 #define EVO_MODE_ITEM_USE 2 #define EVO_MODE_ITEM_CHECK 3 // If an Everstone is being held, still want to show that the stone *could* be used on that Pokémon to evolve -#define EVO_MODE_OVERWORLD_SPECIAL 4 +#define EVO_MODE_OVERWORLD_SPECIAL 5 // Form change types #define FORM_CHANGE_END 0 diff --git a/src/data/pokemon/evolution.h b/src/data/pokemon/evolution.h index 475e7fc911..d38b54074a 100644 --- a/src/data/pokemon/evolution.h +++ b/src/data/pokemon/evolution.h @@ -507,7 +507,11 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_PONYTA_GALARIAN] = {{EVO_LEVEL, 40, SPECIES_RAPIDASH_GALARIAN}}, [SPECIES_SLOWPOKE_GALARIAN] = {{EVO_ITEM, ITEM_NONE, SPECIES_SLOWBRO_GALARIAN}, {EVO_ITEM, ITEM_NONE, SPECIES_SLOWKING_GALARIAN}}, - [SPECIES_FARFETCHD_GALARIAN] = {{EVO_LEVEL, 0, SPECIES_SIRFETCHD}}, + #ifdef BATTLE_ENGINE + [SPECIES_FARFETCHD_GALARIAN] = {{EVO_CRITICAL_HITS, 3, SPECIES_SIRFETCHD}}, + #else + [SPECIES_FARFETCHD_GALARIAN] = {{EVO_LEVEL, 0, SPECIES_SIRFETCHD}}, + #endif [SPECIES_MR_MIME_GALARIAN] = {{EVO_LEVEL, 42, SPECIES_MR_RIME}}, [SPECIES_CORSOLA_GALARIAN] = {{EVO_LEVEL, 38, SPECIES_CURSOLA}}, [SPECIES_ZIGZAGOON_GALARIAN] = {{EVO_LEVEL, 20, SPECIES_LINOONE_GALARIAN}}, diff --git a/src/pokemon.c b/src/pokemon.c index 05047caec7..abb7f7e049 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -6755,6 +6755,21 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s } } break; + #ifdef BATTLE_ENGINE + // Battle evolution without leveling; party slot is being passed into the evolutionItem arg. + case EVO_MODE_BATTLE_SPECIAL: + for (i = 0; i < EVOS_PER_MON; i++) + { + switch (gEvolutionTable[species][i].method) + { + case EVO_CRITICAL_HITS: + if (gPartyCriticalHits[evolutionItem] >= gEvolutionTable[species][i].param) + targetSpecies = gEvolutionTable[species][i].targetSpecies; + break; + } + } + break; + #endif // Overworld evolution without leveling; evolution method is being passed into the evolutionItem arg. case EVO_MODE_OVERWORLD_SPECIAL: for (i = 0; i < EVOS_PER_MON; i++) From 8a0a2a5a39832010d3182ffa135e60a31df8fe0f Mon Sep 17 00:00:00 2001 From: AgustinGDLV <103095241+AgustinGDLV@users.noreply.github.com> Date: Sat, 7 May 2022 09:36:03 -0700 Subject: [PATCH 09/18] Apply suggestions from code review Co-authored-by: Eduardo Quezada D'Ottone --- include/constants/pokemon.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index f4fa1f8003..bd5fe81511 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -352,6 +352,7 @@ #define EVO_SPECIFIC_MAP 32 // Pokémon levels up on specified map #define EVO_LEVEL_NATURE_AMPED 33 // Pokémon reaches the specified level, it has a Hardy, Brave, Adamant, Naughty, Docile, Impish, Lax, Hasty, Jolly, Naive, Rash, Sassy, or Quirky nature. #define EVO_LEVEL_NATURE_LOW_KEY 34 // Pokémon reaches the specified level, it has a Lonely, Bold, Relaxed, Timid, Serious, Modest, Mild, Quiet, Bashful, Calm, Gentle, or Careful nature. +#define EVO_CRITICAL_HITS 35 // Pokémon performs specified number of critical hits in one battle #define EVO_SCRIPT_TRIGGER_DMG 36 // Pokémon has specified HP below max, then player interacts trigger #define EVO_DARK_SCROLL 37 // interacts with Scroll of Darkness #define EVO_WATER_SCROLL 38 // interacts with Scroll of Waters @@ -363,6 +364,7 @@ #define EVO_MODE_TRADE 1 #define EVO_MODE_ITEM_USE 2 #define EVO_MODE_ITEM_CHECK 3 // If an Everstone is being held, still want to show that the stone *could* be used on that Pokémon to evolve +#define EVO_MODE_BATTLE_SPECIAL 4 #define EVO_MODE_OVERWORLD_SPECIAL 5 // Form change types From 54163240d89431f9c5da9b57e948a3d6f9faf2ad Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Sun, 8 May 2022 20:55:29 -0700 Subject: [PATCH 10/18] implemented toggelable cancellation / multi-evo --- asm/macros/event.inc | 11 +++++---- data/specials.inc | 1 + src/data/pokemon/evolution.h | 6 +---- src/data/pokemon/level_up_learnsets.h | 1 - src/pokemon.c | 33 +++++++++++++++++++++++---- 5 files changed, 37 insertions(+), 15 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 2bdfc55672..a2d974fbeb 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1940,11 +1940,14 @@ special CreateEventLegalEnemyMon .endm - @ Attempts to trigger a special evolution method. - @ 'evoMethod' is the evolution you want to trigger. + @ Attempts to trigger a special evolution method in the overworld. @ There may be other conditions required which are coded for in GetEvolutionTargetSpecies. - @ EX: tryspecialevo EVO_WATER_SCROLL will trigger an evolution for Kubfu. - .macro tryspecialevo evoMethod:req + @ EX: tryspecialevo EVO_WATER_SCROLL, FALSE, FALSE triggers Kubfu's EVO_WATER_SCROLL evolution + @ method, cannot be cancelled in the evolution scene, and will only evolve one Kubfu if there + @ are multiple in the player's party. + .macro tryspecialevo evoMethod:req, canStopEvo=TRUE, tryMultiple=TRUE setvar VAR_0x8000, \evoMethod + setvar VAR_0x8001, \canStopEvo + setvar VAR_0x8002, \tryMultiple special TrySpecialOverworldEvo .endm diff --git a/data/specials.inc b/data/specials.inc index a863b6e137..30ad25cb4d 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -535,3 +535,4 @@ gSpecials:: def_special RemoveRecordsWindow def_special CloseDeptStoreElevatorWindow def_special TrySetBattleTowerLinkType + def_special TrySpecialOverworldEvo diff --git a/src/data/pokemon/evolution.h b/src/data/pokemon/evolution.h index d38b54074a..aff4ff04fa 100644 --- a/src/data/pokemon/evolution.h +++ b/src/data/pokemon/evolution.h @@ -507,11 +507,7 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_PONYTA_GALARIAN] = {{EVO_LEVEL, 40, SPECIES_RAPIDASH_GALARIAN}}, [SPECIES_SLOWPOKE_GALARIAN] = {{EVO_ITEM, ITEM_NONE, SPECIES_SLOWBRO_GALARIAN}, {EVO_ITEM, ITEM_NONE, SPECIES_SLOWKING_GALARIAN}}, - #ifdef BATTLE_ENGINE - [SPECIES_FARFETCHD_GALARIAN] = {{EVO_CRITICAL_HITS, 3, SPECIES_SIRFETCHD}}, - #else - [SPECIES_FARFETCHD_GALARIAN] = {{EVO_LEVEL, 0, SPECIES_SIRFETCHD}}, - #endif + [SPECIES_FARFETCHD_GALARIAN] = {{EVO_CRITICAL_HITS, 3, SPECIES_SIRFETCHD}}, [SPECIES_MR_MIME_GALARIAN] = {{EVO_LEVEL, 42, SPECIES_MR_RIME}}, [SPECIES_CORSOLA_GALARIAN] = {{EVO_LEVEL, 38, SPECIES_CURSOLA}}, [SPECIES_ZIGZAGOON_GALARIAN] = {{EVO_LEVEL, 20, SPECIES_LINOONE_GALARIAN}}, diff --git a/src/data/pokemon/level_up_learnsets.h b/src/data/pokemon/level_up_learnsets.h index c774cc3127..8df5886bd2 100644 --- a/src/data/pokemon/level_up_learnsets.h +++ b/src/data/pokemon/level_up_learnsets.h @@ -1,5 +1,4 @@ #define LEVEL_UP_MOVE(lvl, moveLearned) {.move = moveLearned, .level = lvl} -#define LEVEL_UP_END (0xffff) static const struct LevelUpMove sBulbasaurLevelUpLearnset[] = { LEVEL_UP_MOVE( 1, MOVE_TACKLE), diff --git a/src/pokemon.c b/src/pokemon.c index abb7f7e049..e1a391b90e 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -66,6 +66,7 @@ static u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move); static bool8 ShouldSkipFriendshipChange(void); static u8 SendMonToPC(struct Pokemon* mon); static void RemoveIVIndexFromList(u8 *ivs, u8 selectedIv); +void TrySpecialOverworldEvo(); EWRAM_DATA static u8 sLearningMoveTableID = 0; EWRAM_DATA u8 gPlayerPartyCount = 0; @@ -74,6 +75,7 @@ EWRAM_DATA struct Pokemon gPlayerParty[PARTY_SIZE] = {0}; EWRAM_DATA struct Pokemon gEnemyParty[PARTY_SIZE] = {0}; EWRAM_DATA struct SpriteTemplate gMultiuseSpriteTemplate = {0}; EWRAM_DATA static struct MonSpritesGfxManager *sMonSpritesGfxManagers[MON_SPR_GFX_MANAGERS_COUNT] = {NULL}; +EWRAM_DATA static u8 sTriedEvolving = 0; #include "data/battle_moves.h" @@ -6777,10 +6779,14 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s switch (gEvolutionTable[species][i].method) { case EVO_SCRIPT_TRIGGER_DMG: - if (evolutionItem == EVO_SCRIPT_TRIGGER_DMG - && (GetMonData(mon, MON_DATA_MAX_HP, NULL) - GetMonData(mon, MON_DATA_HP, NULL) >= gEvolutionTable[species][i].param)) + { + u16 currentHp = GetMonData(mon, MON_DATA_HP, NULL); + if (evolutionItem == EVO_SCRIPT_TRIGGER_DMG + && currentHp != 0 + && (GetMonData(mon, MON_DATA_MAX_HP, NULL) - currentHp >= gEvolutionTable[species][i].param)) targetSpecies = gEvolutionTable[species][i].targetSpecies; break; + } case EVO_DARK_SCROLL: if (evolutionItem == EVO_DARK_SCROLL) targetSpecies = gEvolutionTable[species][i].targetSpecies; @@ -8469,19 +8475,36 @@ static void RemoveIVIndexFromList(u8 *ivs, u8 selectedIv) } } +static void CB2_DoSpecialOverworldEvo(void) +{ + TrySpecialOverworldEvo(); +} + // Attempts to perform non-level/item related overworld evolutions; called by tryspecialevo command. void TrySpecialOverworldEvo(void) { u8 i; u8 evoMethod = gSpecialVar_0x8000; + u16 canStopEvo = gSpecialVar_0x8001; + u16 tryMultiple = gSpecialVar_0x8002; for (i = 0; i < PARTY_SIZE; i++) { u16 targetSpecies = GetEvolutionTargetSpecies(&gPlayerParty[i], EVO_MODE_OVERWORLD_SPECIAL, evoMethod, SPECIES_NONE); - if (targetSpecies != SPECIES_NONE) + if (targetSpecies != SPECIES_NONE && !(sTriedEvolving & gBitTable[i])) { - gCB2_AfterEvolution = CB2_ReturnToField; - BeginEvolutionScene(&gPlayerParty[i], targetSpecies, TRUE, i); + if (tryMultiple) + { + gCB2_AfterEvolution = CB2_DoSpecialOverworldEvo; + sTriedEvolving |= gBitTable[i]; + } + else + gCB2_AfterEvolution = CB2_ReturnToField; + BeginEvolutionScene(&gPlayerParty[i], targetSpecies, canStopEvo, i); + return; } } + + sTriedEvolving = 0; + SetMainCallback2(CB2_ReturnToField); } From e50d5661cdf303f685738542a7e9fa1995f4daec Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Sun, 8 May 2022 20:57:12 -0700 Subject: [PATCH 11/18] removed unneccesary preproc --- src/pokemon.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/pokemon.c b/src/pokemon.c index e1a391b90e..bf07718413 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -6757,7 +6757,6 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s } } break; - #ifdef BATTLE_ENGINE // Battle evolution without leveling; party slot is being passed into the evolutionItem arg. case EVO_MODE_BATTLE_SPECIAL: for (i = 0; i < EVOS_PER_MON; i++) @@ -6771,7 +6770,6 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s } } break; - #endif // Overworld evolution without leveling; evolution method is being passed into the evolutionItem arg. case EVO_MODE_OVERWORLD_SPECIAL: for (i = 0; i < EVOS_PER_MON; i++) From 502ce4bb33d4eafb70537f2e77cc20abe64474f1 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Sun, 8 May 2022 21:16:16 -0700 Subject: [PATCH 12/18] fixed graphics bug and reverted last commit --- src/pokemon.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/pokemon.c b/src/pokemon.c index bf07718413..c41b9fdb95 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -6757,6 +6757,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s } } break; + #ifdef BATTLE_ENGINE // Battle evolution without leveling; party slot is being passed into the evolutionItem arg. case EVO_MODE_BATTLE_SPECIAL: for (i = 0; i < EVOS_PER_MON; i++) @@ -6770,6 +6771,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s } } break; + #endif // Overworld evolution without leveling; evolution method is being passed into the evolutionItem arg. case EVO_MODE_OVERWORLD_SPECIAL: for (i = 0; i < EVOS_PER_MON; i++) @@ -8473,11 +8475,6 @@ static void RemoveIVIndexFromList(u8 *ivs, u8 selectedIv) } } -static void CB2_DoSpecialOverworldEvo(void) -{ - TrySpecialOverworldEvo(); -} - // Attempts to perform non-level/item related overworld evolutions; called by tryspecialevo command. void TrySpecialOverworldEvo(void) { @@ -8491,14 +8488,15 @@ void TrySpecialOverworldEvo(void) u16 targetSpecies = GetEvolutionTargetSpecies(&gPlayerParty[i], EVO_MODE_OVERWORLD_SPECIAL, evoMethod, SPECIES_NONE); if (targetSpecies != SPECIES_NONE && !(sTriedEvolving & gBitTable[i])) { + sTriedEvolving |= gBitTable[i]; + if(gMain.callback2 == TrySpecialOverworldEvo) // This fixes small graphics glitches. + EvolutionScene(&gPlayerParty[i], targetSpecies, canStopEvo, i); + else + BeginEvolutionScene(&gPlayerParty[i], targetSpecies, canStopEvo, i); if (tryMultiple) - { - gCB2_AfterEvolution = CB2_DoSpecialOverworldEvo; - sTriedEvolving |= gBitTable[i]; - } + gCB2_AfterEvolution = TrySpecialOverworldEvo; else gCB2_AfterEvolution = CB2_ReturnToField; - BeginEvolutionScene(&gPlayerParty[i], targetSpecies, canStopEvo, i); return; } } From b43dfd59768c203608ef7b83f8f04ec346a34365 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Mon, 9 May 2022 17:04:28 -0400 Subject: [PATCH 13/18] Quick formatting --- src/pokemon.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pokemon.c b/src/pokemon.c index c41b9fdb95..8735488503 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -6789,12 +6789,12 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s } case EVO_DARK_SCROLL: if (evolutionItem == EVO_DARK_SCROLL) - targetSpecies = gEvolutionTable[species][i].targetSpecies; - break; + targetSpecies = gEvolutionTable[species][i].targetSpecies; + break; case EVO_WATER_SCROLL: - if (evolutionItem == EVO_WATER_SCROLL) - targetSpecies = gEvolutionTable[species][i].targetSpecies; - break; + if (evolutionItem == EVO_WATER_SCROLL) + targetSpecies = gEvolutionTable[species][i].targetSpecies; + break; } } break; From 5b1c31bbc90e312d1c73b7bdf364de1d9b815ee9 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 10 May 2022 12:39:36 -0300 Subject: [PATCH 14/18] Update tutor_learnsets.h --- src/data/pokemon/tutor_learnsets.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/data/pokemon/tutor_learnsets.h b/src/data/pokemon/tutor_learnsets.h index 0e63c8d58f..f6ad5b26e8 100644 --- a/src/data/pokemon/tutor_learnsets.h +++ b/src/data/pokemon/tutor_learnsets.h @@ -37,12 +37,7 @@ const u16 gTutorMoves[] = static const u32 sTutorLearnsets[] = { - [SPECIES_NONE] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) - | TUTOR(MOVE_MEGA_KICK) - | TUTOR(MOVE_MEGA_PUNCH) - | TUTOR(MOVE_SEISMIC_TOSS) - | TUTOR(MOVE_SWORDS_DANCE) - | TUTOR(MOVE_THUNDER_WAVE)), + [SPECIES_NONE] = (0), [SPECIES_BULBASAUR] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) | TUTOR(MOVE_DEFENSE_CURL) From 059dc02aef796a1118db4ba9874a34d737578cc1 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 18 May 2022 11:03:57 -0300 Subject: [PATCH 15/18] Update pokemon.c --- src/pokemon.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pokemon.c b/src/pokemon.c index 8735488503..85bb048312 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8143,7 +8143,10 @@ bool8 HasTwoFramesAnimation(u16 species) return (species != SPECIES_CASTFORM && species != SPECIES_SPINDA && species != SPECIES_UNOWN - && species != SPECIES_CHERRIM); + && species != SPECIES_CHERRIM + && species != SPECIES_CASTFORM_SUNNY + && species != SPECIES_CASTFORM_RAINY + && species != SPECIES_CASTFORM_SNOWY); } static bool8 ShouldSkipFriendshipChange(void) From 8c15c5b6d73b20440a19f5657c7f9f50ddd5fea9 Mon Sep 17 00:00:00 2001 From: sneed Date: Wed, 18 May 2022 20:47:14 +0300 Subject: [PATCH 16/18] fix castform sprite --- .../castform/{ => normal}/anim_front.png | Bin .../pokemon/castform/{ => normal}/back.png | Bin .../pokemon/castform/{ => normal}/front.png | Bin .../pokemon/castform/{ => normal}/normal.pal | 0 .../pokemon/castform/{ => normal}/shiny.pal | 0 graphics_file_rules.mk | 30 ++++++++++++++++++ 6 files changed, 30 insertions(+) rename graphics/pokemon/castform/{ => normal}/anim_front.png (100%) rename graphics/pokemon/castform/{ => normal}/back.png (100%) rename graphics/pokemon/castform/{ => normal}/front.png (100%) rename graphics/pokemon/castform/{ => normal}/normal.pal (100%) rename graphics/pokemon/castform/{ => normal}/shiny.pal (100%) diff --git a/graphics/pokemon/castform/anim_front.png b/graphics/pokemon/castform/normal/anim_front.png similarity index 100% rename from graphics/pokemon/castform/anim_front.png rename to graphics/pokemon/castform/normal/anim_front.png diff --git a/graphics/pokemon/castform/back.png b/graphics/pokemon/castform/normal/back.png similarity index 100% rename from graphics/pokemon/castform/back.png rename to graphics/pokemon/castform/normal/back.png diff --git a/graphics/pokemon/castform/front.png b/graphics/pokemon/castform/normal/front.png similarity index 100% rename from graphics/pokemon/castform/front.png rename to graphics/pokemon/castform/normal/front.png diff --git a/graphics/pokemon/castform/normal.pal b/graphics/pokemon/castform/normal/normal.pal similarity index 100% rename from graphics/pokemon/castform/normal.pal rename to graphics/pokemon/castform/normal/normal.pal diff --git a/graphics/pokemon/castform/shiny.pal b/graphics/pokemon/castform/normal/shiny.pal similarity index 100% rename from graphics/pokemon/castform/shiny.pal rename to graphics/pokemon/castform/normal/shiny.pal diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index db9a5b1fe6..97dac5b636 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -25,7 +25,37 @@ STARTERGFXDIR := graphics/starter_choose types := normal fight flying poison ground rock bug ghost steel mystery fire water grass electric psychic ice dragon dark fairy contest_types := cool beauty cute smart tough +### Castform ### +$(CASTFORMGFXDIR)/front.4bpp: $(CASTFORMGFXDIR)/normal/front.4bpp \ + $(CASTFORMGFXDIR)/sunny/front.4bpp \ + $(CASTFORMGFXDIR)/rainy/front.4bpp \ + $(CASTFORMGFXDIR)/snowy/front.4bpp + @cat $^ >$@ + +$(CASTFORMGFXDIR)/back.4bpp: $(CASTFORMGFXDIR)/back_normal.4bpp \ + $(CASTFORMGFXDIR)/sunny/back.4bpp \ + $(CASTFORMGFXDIR)/rainy/back.4bpp \ + $(CASTFORMGFXDIR)/snowy/back.4bpp + @cat $^ >$@ + +$(CASTFORMGFXDIR)/anim_front.4bpp: $(CASTFORMGFXDIR)/normal/anim_front.4bpp \ + $(CASTFORMGFXDIR)/sunny/anim_front.4bpp \ + $(CASTFORMGFXDIR)/rainy/anim_front.4bpp \ + $(CASTFORMGFXDIR)/snowy/anim_front.4bpp + @cat $^ >$@ + +$(CASTFORMGFXDIR)/normal.gbapal: $(CASTFORMGFXDIR)/normal/normal.gbapal \ + $(CASTFORMGFXDIR)/sunny/normal.4bpp \ + $(CASTFORMGFXDIR)/rainy/normal.4bpp \ + $(CASTFORMGFXDIR)/snowy/normal.4bpp + @cat $^ >$@ + +$(CASTFORMGFXDIR)/shiny.gbapal: $(CASTFORMGFXDIR)/normal/shiny.gbapal \ + $(CASTFORMGFXDIR)/sunny/shiny.4bpp \ + $(CASTFORMGFXDIR)/rainy/shiny.4bpp \ + $(CASTFORMGFXDIR)/snowy/shiny.4bpp + @cat $^ >$@ ### Tilesets ### From 49abca345d9d6baf8670c0c31fb525e2a0de26a7 Mon Sep 17 00:00:00 2001 From: sneed Date: Wed, 18 May 2022 21:11:39 +0300 Subject: [PATCH 17/18] back_normal.4bpp to normal/back.4bpp --- graphics_file_rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index 97dac5b636..8784d0b694 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -33,7 +33,7 @@ $(CASTFORMGFXDIR)/front.4bpp: $(CASTFORMGFXDIR)/normal/front.4bpp \ $(CASTFORMGFXDIR)/snowy/front.4bpp @cat $^ >$@ -$(CASTFORMGFXDIR)/back.4bpp: $(CASTFORMGFXDIR)/back_normal.4bpp \ +$(CASTFORMGFXDIR)/back.4bpp: $(CASTFORMGFXDIR)/normal/back.4bpp \ $(CASTFORMGFXDIR)/sunny/back.4bpp \ $(CASTFORMGFXDIR)/rainy/back.4bpp \ $(CASTFORMGFXDIR)/snowy/back.4bpp From 5a4c165beaa5b5511065a611e008f4f76f475a35 Mon Sep 17 00:00:00 2001 From: sneed Date: Wed, 18 May 2022 21:27:47 +0300 Subject: [PATCH 18/18] fix 4bpp instead of gbapal --- graphics_file_rules.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index 8784d0b694..f46db21abc 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -46,15 +46,15 @@ $(CASTFORMGFXDIR)/anim_front.4bpp: $(CASTFORMGFXDIR)/normal/anim_front.4bpp \ @cat $^ >$@ $(CASTFORMGFXDIR)/normal.gbapal: $(CASTFORMGFXDIR)/normal/normal.gbapal \ - $(CASTFORMGFXDIR)/sunny/normal.4bpp \ - $(CASTFORMGFXDIR)/rainy/normal.4bpp \ - $(CASTFORMGFXDIR)/snowy/normal.4bpp + $(CASTFORMGFXDIR)/sunny/normal.gbapal \ + $(CASTFORMGFXDIR)/rainy/normal.gbapal \ + $(CASTFORMGFXDIR)/snowy/normal.gbapal @cat $^ >$@ $(CASTFORMGFXDIR)/shiny.gbapal: $(CASTFORMGFXDIR)/normal/shiny.gbapal \ - $(CASTFORMGFXDIR)/sunny/shiny.4bpp \ - $(CASTFORMGFXDIR)/rainy/shiny.4bpp \ - $(CASTFORMGFXDIR)/snowy/shiny.4bpp + $(CASTFORMGFXDIR)/sunny/shiny.gbapal \ + $(CASTFORMGFXDIR)/rainy/shiny.gbapal \ + $(CASTFORMGFXDIR)/snowy/shiny.gbapal @cat $^ >$@ ### Tilesets ###