diff --git a/.github/ISSUE_TEMPLATE/01_battle_engine_bugs.yaml b/.github/ISSUE_TEMPLATE/01_battle_engine_bugs.yaml index 9ed5ade154..24b57d117e 100644 --- a/.github/ISSUE_TEMPLATE/01_battle_engine_bugs.yaml +++ b/.github/ISSUE_TEMPLATE/01_battle_engine_bugs.yaml @@ -23,9 +23,10 @@ body: label: Version description: What version of pokeemerald-expansion are you using as a base? options: - - 1.8.1 (Latest release) + - 1.8.2 (Latest release) - master (default, unreleased bugfixes) - upcoming (Edge) + - 1.8.1 - 1.8.0 - 1.7.4 - 1.7.3 diff --git a/.github/ISSUE_TEMPLATE/02_battle_ai_issues.yaml b/.github/ISSUE_TEMPLATE/02_battle_ai_issues.yaml index 53cfa2ca1f..562468cce1 100644 --- a/.github/ISSUE_TEMPLATE/02_battle_ai_issues.yaml +++ b/.github/ISSUE_TEMPLATE/02_battle_ai_issues.yaml @@ -23,9 +23,10 @@ body: label: Version description: What version of pokeemerald-expansion are you using as a base? options: - - 1.8.1 (Latest release) + - 1.8.2 (Latest release) - master (default, unreleased bugfixes) - upcoming (Edge) + - 1.8.1 - 1.8.0 - 1.7.4 - 1.7.3 diff --git a/.github/ISSUE_TEMPLATE/04_other_errors.yaml b/.github/ISSUE_TEMPLATE/04_other_errors.yaml index 4d729b15be..4658ecfb69 100644 --- a/.github/ISSUE_TEMPLATE/04_other_errors.yaml +++ b/.github/ISSUE_TEMPLATE/04_other_errors.yaml @@ -23,9 +23,10 @@ body: label: Version description: What version of pokeemerald-expansion are you using as a base? options: - - 1.8.1 (Latest release) + - 1.8.2 (Latest release) - master (default, unreleased bugfixes) - upcoming (Edge) + - 1.8.1 - 1.8.0 - 1.7.4 - 1.7.3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 001a2b02cc..dea05701d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Pokeemerald-Expansion Changelogs ## 1.8.x +- ### [Version 1.8.2](docs/changelogs/1.8.2.md) - Bugfix Release 🧹 - ### [Version 1.8.1](docs/changelogs/1.8.1.md) - HOTFIX Release 🔥 - ### [Version 1.8.0](docs/changelogs/1.8.0.md) - Feature Release ✨ diff --git a/README.md b/README.md index d7bcb43d00..6487086183 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,7 @@ Based off RHH's pokeemerald-expansion v1.8.0 https://github.com/rh-hideout/pokee - *Dark Mode*. - [Nature Colors](https://github.com/DizzyEggg/pokeemerald/tree/nature_color) in summary screen by @DizzyEggg - [Dynamic Multichoice](https://github.com/SBird1337/pokeemerald/tree/feature/dynmulti) by @SBird1337 + - [Saveblock Cleansing](https://github.com/ghoulslash/pokeemerald/tree/saveblock) by @ghoulslash - ***Other features*** - Pressing B while holding a Pokémon drops them like in modern games (configurable). - Running indoors (configurable). @@ -166,7 +167,14 @@ With this, you'll get the latest version of pokeemerald-expansion, plus a couple ## **How do I update my version of pokeemerald-expansion?** - If you haven't set up a remote, run the command `git remote add RHH https://github.com/rh-hideout/pokeemerald-expansion`. -- Once you have your remote set up, run the command `git pull RHH expansion/1.8.1`. +- Check your current version. + - You can check in the debug menu's `Utilities -> Expansion Version` option. + - If the option is not available, you possibly have version 1.6.2 or older. In that case, please check the [changelogs](CHANGELOG.md) to determine your version based on the features available on your repository. +- Once you have your remote set up, run the command `git pull RHH expansion/X.Y.Z`, replacing X, Y and Z with the digits of the respective version you want to update to (eg, to update to 1.8.2, use `git pull RHH expansion/1.8.2`). + - ***Important:*** If you are several versions behind, we recommend updating one minor version at a time, skipping directly to the latest patch version (eg, 1.5.3 -> 1.6.2 -> 1.7.4 and so on) +- Alternatively, you can update to unreleased versions of the expansion. + - ***master (stable):*** It contains unreleased **bugfixes** that will come in the next patch version. To merge, use `git pull RHH master`. + - ***upcoming (unstable, with potential bugs):*** It contains unreleased **features** that will come in the next minor version. To merge, use `git pull RHH upcoming`. ### Please consider crediting the entire [list of contributors](https://github.com/rh-hideout/pokeemerald-expansion/wiki/Credits) in your project, as they have all worked hard to develop this project :) diff --git a/data/event_scripts.s b/data/event_scripts.s index 0524ec684a..3bab068983 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -579,6 +579,7 @@ gStdScripts_End:: .include "data/scripts/new_game.inc" .include "data/scripts/hall_of_fame.inc" + .include "data/scripts/config.inc" .include "data/scripts/debug.inc" EventScript_WhiteOut:: diff --git a/data/scripts/config.inc b/data/scripts/config.inc new file mode 100644 index 0000000000..dc80b1824a --- /dev/null +++ b/data/scripts/config.inc @@ -0,0 +1,12 @@ +Debug_FlagsAndVarNotSetBattleConfigMessage:: + lockall + message Debug_FlagsAndVarNotSetBattleConfigMessage_Text + waitmessage + waitbuttonpress + releaseall + end + +Debug_FlagsAndVarNotSetBattleConfigMessage_Text: + .string "Feature unavailable! Please define a\n" + .string "usable flag and a usable var in:\l" + .string "'include/config/battle.h'!$" diff --git a/data/scripts/debug.inc b/data/scripts/debug.inc index 3dcb7f7896..09ae1404c4 100644 --- a/data/scripts/debug.inc +++ b/data/scripts/debug.inc @@ -281,21 +281,6 @@ DebugText_BerryWeedsDisabled: .string "OW_BERRY_WEEDS is disabled.\n" .string "Unable to force weeds onto berry trees.$" -.endif - -Debug_FlagsAndVarNotSetBattleConfigMessage:: - lockall - message Debug_FlagsAndVarNotSetBattleConfigMessage_Text - waitmessage - waitbuttonpress - releaseall - end - -Debug_FlagsAndVarNotSetBattleConfigMessage_Text: - .string "Feature unavailable! Please define a\n" - .string "usable flag and a usable var in:\l" - .string "'include/config/battle.h'!$" - Debug_EventScript_InflictStatus1:: lockall getpartysize @@ -445,3 +430,5 @@ Debug_EventScript_InflictStatus1_Text_Freeze: Debug_EventScript_InflictStatus1_Text_Frostbite: .string "Frostbite$" + +.endif diff --git a/docs/changelogs/1.8.0.md b/docs/changelogs/1.8.0.md index afe6a03bf1..e1a50896e7 100644 --- a/docs/changelogs/1.8.0.md +++ b/docs/changelogs/1.8.0.md @@ -312,7 +312,7 @@ * Included there's `DYN_MULTICHOICE_CB_SHOW_ITEM`, which shows icons of the items defined by your script. * Compatible with Poryscript. * For more information and how to use it, please visit the [Pokécommunity thread](https://www.pokecommunity.com/threads/event-scripts-dynamic-multichoice.489984/). -### ***Incorporated @ghoulslash's save block branch*** by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4113 +### ***Incorporated @ghoulslash's Saveblock Cleansing branch*** by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4113 * Differences from the the standalone branch: - Moved configs to dedicated file (`include/config/save.h`). - Fixed comments to the proper amount of space saved. diff --git a/docs/changelogs/1.8.2.md b/docs/changelogs/1.8.2.md new file mode 100644 index 0000000000..31d8e257f1 --- /dev/null +++ b/docs/changelogs/1.8.2.md @@ -0,0 +1,144 @@ +# Version 1.8.2 + +```md +## How to update +- If you haven't set up a remote, run the command `git remote add RHH https://github.com/rh-hideout/pokeemerald-expansion`. +- Once you have your remote set up, run the command `git pull RHH expansion/1.8.2`. +``` +## 🌋 Important changes 🌋 +* ***Added check during compilation to make sure that the code is inside a git directory before building*** by @SBird1337 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4363 + * *If you downloaded the code using the "Download ZIP" option on GitHub, you will not be able to update your expansion version or merge any other feature brances, which is why we added this check to make sure that users don't fall into this trap.* + +## 💥 *Softlock/Crash fixes* 💥 +* Fixed Battle Pyramid freeze when `BATTLE_PYRAMID_RANDOM_ENCOUNTERS` is set to `TRUE` by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4326 +* Fixed switch-in AI infinite loop when calculating amount of hits to faint the opponent by @Pawkkie and @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4338 +* Fixed softlock with weather-triggered form changes and Cloud Nine by @skolgrahd in https://github.com/rh-hideout/pokeemerald-expansion/pull/4382 +* Fixes Eject Pack softlock when there are no other party members left to switch to by @skolgrahd and @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4387 + +## 🧬 General 🧬 +### Changed +* Changed Frostbite's abbreviation from `FSB` to `FRB` by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4355 +### Fixed +* Fixed `BATTLE_PYRAMID_RANDOM_ENCOUNTERS` not including species past `FORMS_START`, including Gen 9 Pokémon by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4326 +* Fixed potential compile issue that occurs when `gba/types.h` is included before `gba/defines.h` by @mrgriffin in https://github.com/rh-hideout/pokeemerald-expansion/pull/4364 +* Fixed `givemon` setting every move despite only specifying a couple by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4377 + * Level up moves will be used when no move is specified. +* Rewrite `GiveBoxMonInitialMoveset_Fast` to match `GiveBoxMonInitialMoveset` results (but still faster) by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4373 +* Fixed Teachable Learnset helper crashing in some environments by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4389 + +## ✨ Feature Branches ✨ +### ***TheXaman's Debug Menu***: +#### Fixed +* Fixed compile issue when disabling Debug Menu by @damon-murdoch in https://github.com/rh-hideout/pokeemerald-expansion/pull/4372 +### ***TheXaman's HGSS Pokédex Plus***: +#### Changed +* Male icons and front pics are now the default by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4390 +#### Fixed +* Fixed showing graphical errors for icons by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4390 +* Fixed disabled forms appearing in form list by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4395 + +## 🐉 Pokémon 🐉 +### Added +* Added missing Pecharunt sprite [from PokéCommunity](https://www.pokecommunity.com/threads/ds-style-gen-vii-and-beyond-pok%C3%A9mon-sprite-repository-in-64x64.368703/post-10814369) by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4324 +* Added missing icons for multiple Pokémon by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4290 + * Archaludon + * Partner Eevee + * Gouging Fire + * Iron Boulder + * Iron Crown + * Cornerstone Ogerpon + * Hearthflame Ogerpon + * Wellspring Ogerpon + * Pecharunt + * Partner Pikachu + * Raging Bolt + * Terapagos (all forms) + * Bloodmoon Ursaluna +### Changed +* Updated almost all Gen 9 icon sprites to cleaner ones by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4290 + * Original Source (there were some tweaks): https://www.deviantart.com/ezerart/art/Pokemon-Gen-9-Icon-sprites-3DS-Style-944211258 + * GBA Pal sprites source: https://whackahack.com/foro/threads/9-gen-sprites.67492/page-46#post-493662 + * Further tweaks were made after that. +### Fixed +* Fixed Gengar's missing cries by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4385 +* Fixed silent Klefki cry by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4392 + +## ⚔️ Battle General ⚔️ ## +### Fixed +* Level Cap issues + * Fixed Soft Level Caps not properly working by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4327 + * Fixed issue that caused Level Caps to give 0 Exp when below the cap and `B_LEVEL_CAP_EXP_UP` set to `FALSE` by @ravepossum in https://github.com/rh-hideout/pokeemerald-expansion/pull/4305 +* Fixed graphical bug in Battle Arena windows by @Bassoonian and @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4307 +* Fixed Totem Boosts not triggering by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4328 +* Fixed Trainer Slide message for Low HP appearing when the HP was above 25% HP instead of below by @MelonSpeedruns and @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4353 +* Fixed Pokémon Mega Evolving/Gigantamaxing/Fusing into `SPECIES_NONE` when the respective form toggles are set to `FALSE` by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4395 + +## 🤹 Moves 🤹 +### Fixed +* Fixed Z-Mirror Move's base power being set to 0 instead of the mirrored move's base power by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4308 +* Fixed Searing Sunraze Smash, Menacing Moonraze Maelstrom and Light That Burns The Sky not bypassing abilities by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4360 +* Fixed multiple Future Sight issues by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4350 + * Fixed Future Sight using the active Pokémon's stats if the original user switches out. + * Fixed Future Sight not being boosted by the user's item when the user is active when the move hits. + * Fixed Future Sight not failing when the target of the attack faints before it hits. +* Fixed Belch not being usable even if a berry was eating via Stuff Cheeks by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4376 +## 🎭 Abilities 🎭 +### Added +* Added missing Disguise Gen8+ HP loss behavior by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4360 +### Fixed +* Fixed No Guard checking the wrong battler by @GraionDilach in https://github.com/rh-hideout/pokeemerald-expansion/pull/4320 +* Fixed Intimidate's ability pop up appearing even when `B_ABILITY_POP_UP` is set to `FALSE` by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4339 +* Fixed Guts preventing Frostbite's Sp. Attack reduction by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4351 +* Fixed Iron Barbs/Rough Skin and confusion self-damage breaking Disguise by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4360 +* Fixed Gulp Missile not changing Cramorant's form when Dive is triggered in a single turn using Power Herb by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4371 +* Fixed Cud Chew showing its ability pop up but not triggering its berry again by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4379 +* Fixed Ability flags by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4381 + * Gulp Missle can't be copied. + * Commander can't be supressed. + +## 🧶 Items 🧶 +### Fixed +* Fixed multiple White Herb Known issues by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4258 + * Fixed White Herb not activating after Intimidade. + * Fixed White Herb not activating after all hits of a multi-hit move. + * Fixed White Herb activating when Knocked Off on the same turn as the lowering of the stat (eg. via Weak Armor) + * Fixed White Herb activating even if Magician steals it + * Fixed White Herb activating before Defiant and Competitive. +* Fixed Protective Pads ignoring Fluffy by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4340 +* Fixed Ability Shield not preventing Neutralizing Gas from supressing the holder's ability by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4391 + +## 🤖 Battle AI 🤖 +### Fixed +* Fixed AI not considering Earth Eater by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4352 +* Fixed AI not considering Memento an effect that reduces stats by adding it to `IsStatLoweringEffect` by @PCG06 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4386 + +## 🧹 Other Cleanup 🧹 +### Added +* Clarify in `README.md` to not use the "Download ZIP" option by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4336 +### Fixed +* Fixed formatting of plate items in type table by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4318 +* Fixed style of some bit definitions by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4319 + +## 🧪 Test Runner 🧪 +### Added +* Added missing Defiant tests by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4331 +* Added missing parametrized Gastro Acid tests by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4381 +* Added missing parametrized Role Play tests by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4381 + +## 📦 Pret merges 📦 +* Pret merge (2024/03/24) by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4304 + * Simplify weirdly matching division/substraction code by @DizzyEggg in https://github.com/pret/pokeemerald/pull/1982 + * Document camera sprite functions by @GriffinRichards in https://github.com/pret/pokeemerald/pull/1961 + * Renamed "fateful encounter" commands for consistency reasons by @LOuroboros in https://github.com/pret/pokeemerald/pull/1983 +* Mid-April pret merge (2024/04/12) by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4380 + * Incorporated @ghoulslash's [Surfing Dismount graphical fix](https://github.com/pret/pokeemerald/wiki/Surfing-Dismount-Ground-Effects) by @pkmnsnfrn in https://github.com/pret/pokeemerald/pull/1985 + * Updated value of `gMain.inBattle` at `OpponentHandleEndLinkBattle` by @LOuroboros in https://github.com/pret/pokeemerald/pull/1986 + * Added fix to Keep the Camera from Making Waves by @pkmnsnfrn in https://github.com/pret/pokeemerald/pull/1987 + + +## New Contributors +* @skolgrahd made their first contribution in https://github.com/rh-hideout/pokeemerald-expansion/pull/4382 + +**Full Changelog**: https://github.com/rh-hideout/pokeemerald-expansion/compare/expansion/1.8.1...expansion/1.8.2 + + diff --git a/docs/changelogs/template.md b/docs/changelogs/template.md index 57edc6ec6a..6d1ce784a2 100644 --- a/docs/changelogs/template.md +++ b/docs/changelogs/template.md @@ -9,6 +9,9 @@ ## 🌋 *IMPORTANT CHANGES* 🌋 * We deleted the whole repo LOL by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/3367 +## 💥 *Softlock/Crash fixes* 💥 +* N/A + ## 🧬 General 🧬 ### Added * N/A @@ -18,11 +21,33 @@ * N/A ## ✨ Feature Branches ✨ -### Added +### ***TheXaman's Debug Menu***: +#### Added * N/A -### Changed +#### Changed * N/A -### Fixed +#### Fixed +* N/A +### ***TheXaman's HGSS Pokédex Plus***: +#### Added +* N/A +#### Changed +* N/A +#### Fixed +* N/A +### ***SBird/Karathan's Dynamic Multichoices***: +#### Added +* N/A +#### Changed +* N/A +#### Fixed +* N/A +### ***ghoulslash's Saveblock Cleansing***: +#### Added +* N/A +#### Changed +* N/A +#### Fixed * N/A ## 🐉 Pokémon 🐉 diff --git a/include/battle_util.h b/include/battle_util.h index 13e03c58dd..1fb6d6a8f7 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -165,6 +165,8 @@ u32 SetRandomTarget(u32 battler); u32 GetMoveTarget(u16 move, u8 setTarget); u8 IsMonDisobedient(void); u32 GetBattlerHoldEffect(u32 battler, bool32 checkNegating); +u32 GetBattlerHoldEffectIgnoreAbility(u32 battler, bool32 checkNegating); +u32 GetBattlerHoldEffectInternal(u32 battler, bool32 checkNegating, bool32 checkAbility); u32 GetBattlerHoldEffectParam(u32 battler); bool32 IsMoveMakingContact(u32 move, u32 battlerAtk); bool32 IsBattlerGrounded(u32 battler); diff --git a/include/config/species_enabled.h b/include/config/species_enabled.h index 9720f78f0e..23bb6d9d54 100644 --- a/include/config/species_enabled.h +++ b/include/config/species_enabled.h @@ -1,6 +1,9 @@ #ifndef GUARD_CONFIG_SPECIES_ENABLED_H #define GUARD_CONFIG_SPECIES_ENABLED_H +// WARNING: For some reason, using 1/0 instead of TRUE/FALSE causes cry IDs to be shifted. +// Please use TRUE/FALSE when using the family toggles. + // Modifying the latest generation WILL change the saveblock due to Dex flags and will require a new save file. // Generations of Pokémon are defined by the first member introduced, // so Pikachu depends on the Gen 1 setting despite Pichu being the lowest member of the evolution tree. diff --git a/include/constants/expansion.h b/include/constants/expansion.h index 6bd59b5be6..b72429d619 100644 --- a/include/constants/expansion.h +++ b/include/constants/expansion.h @@ -1,10 +1,10 @@ #ifndef GUARD_CONSTANTS_EXPANSION_H #define GUARD_CONSTANTS_EXPANSION_H -// 1.8.1 +// 1.8.2 #define EXPANSION_VERSION_MAJOR 1 #define EXPANSION_VERSION_MINOR 8 -#define EXPANSION_VERSION_PATCH 1 +#define EXPANSION_VERSION_PATCH 2 // FALSE if this this version of Expansion is not a tagged commit, i.e. // it contains unreleased changes. diff --git a/sound/cry_tables.inc b/sound/cry_tables.inc index 450b9ee584..c98e0ec746 100644 --- a/sound/cry_tables.inc +++ b/sound/cry_tables.inc @@ -1707,7 +1707,7 @@ gCryTable:: cry Cry_Goodra .endif @ P_FAMILY_GOOMY .if P_FAMILY_KLEFKI == TRUE - cry Cry_Klefki + cry_uncomp Cry_Klefki @ Cannot be heard unless we use cry_uncomp here. .endif @ P_FAMILY_KLEFKI .if P_FAMILY_PHANTUMP == TRUE cry Cry_Phantump @@ -4133,7 +4133,7 @@ gCryTable_Reverse:: cry_reverse Cry_Goodra .endif @ P_FAMILY_GOOMY .if P_FAMILY_KLEFKI == TRUE - cry_reverse Cry_Klefki + cry_reverse_uncomp Cry_Klefki @ Cannot be heard unless we use cry_reverse_uncomp here. .endif @ P_FAMILY_KLEFKI .if P_FAMILY_PHANTUMP == TRUE cry_reverse Cry_Phantump diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index cc3f8bd93c..40f3da2b5a 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -2049,6 +2049,7 @@ bool32 IsStatLoweringEffect(u32 effect) case EFFECT_TICKLE: case EFFECT_CAPTIVATE: case EFFECT_NOBLE_ROAR: + case EFFECT_MEMENTO: return TRUE; default: return FALSE; diff --git a/src/battle_util.c b/src/battle_util.c index dc7c6352c1..36f0379a1c 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -6142,7 +6142,9 @@ u32 GetBattlerAbility(u32 battler) if (gStatuses3[battler] & STATUS3_GASTRO_ACID) return ABILITY_NONE; - if (IsNeutralizingGasOnField() && gBattleMons[battler].ability != ABILITY_NEUTRALIZING_GAS) + if (IsNeutralizingGasOnField() + && gBattleMons[battler].ability != ABILITY_NEUTRALIZING_GAS + && GetBattlerHoldEffectIgnoreAbility(battler, TRUE) != HOLD_EFFECT_ABILITY_SHIELD) return ABILITY_NONE; if (IsMyceliumMightOnField()) @@ -7260,6 +7262,7 @@ u8 ItemBattleEffects(u8 caseID, u32 battler, bool32 moveTurn) case HOLD_EFFECT_EJECT_PACK: if (gProtectStructs[battler].statFell && gProtectStructs[battler].disableEjectPack == 0 + && CountUsablePartyMons(battler) > 0 && !(gCurrentMove == MOVE_PARTING_SHOT && CanBattlerSwitch(gBattlerAttacker))) // Does not activate if attacker used Parting Shot and can switch out { gProtectStructs[battler].statFell = FALSE; @@ -8188,6 +8191,16 @@ u8 IsMonDisobedient(void) } u32 GetBattlerHoldEffect(u32 battler, bool32 checkNegating) +{ + return GetBattlerHoldEffectInternal(battler, checkNegating, TRUE); +} + +u32 GetBattlerHoldEffectIgnoreAbility(u32 battler, bool32 checkNegating) +{ + return GetBattlerHoldEffectInternal(battler, checkNegating, FALSE); +} + +u32 GetBattlerHoldEffectInternal(u32 battler, bool32 checkNegating, bool32 checkAbility) { if (checkNegating) { @@ -8195,7 +8208,7 @@ u32 GetBattlerHoldEffect(u32 battler, bool32 checkNegating) return HOLD_EFFECT_NONE; if (gFieldStatuses & STATUS_FIELD_MAGIC_ROOM) return HOLD_EFFECT_NONE; - if (GetBattlerAbility(battler) == ABILITY_KLUTZ) + if (checkAbility && GetBattlerAbility(battler) == ABILITY_KLUTZ) return HOLD_EFFECT_NONE; } @@ -10486,7 +10499,8 @@ u16 GetBattleFormChangeTargetSpecies(u32 battler, u16 method) targetSpecies = formChanges[i].targetSpecies; } // Otherwise, just check for a match between the weather and the form change table. - else if (gBattleWeather & formChanges[i].param1 + // Added a check for whether the weather is in effect to prevent end-of-turn soft locks with Cloud Nine / Air Lock + else if (((gBattleWeather & formChanges[i].param1) && WEATHER_HAS_EFFECT) || (gBattleWeather == B_WEATHER_NONE && formChanges[i].param1 == B_WEATHER_NONE)) { targetSpecies = formChanges[i].targetSpecies; diff --git a/src/data/abilities.h b/src/data/abilities.h index fad9b9f039..8c26934d9a 100644 --- a/src/data/abilities.h +++ b/src/data/abilities.h @@ -1902,6 +1902,7 @@ const struct Ability gAbilitiesInfo[ABILITIES_COUNT] = .name = _("Gulp Missile"), .description = COMPOUND_STRING("If hit, spits prey from sea."), .aiRating = 3, + .cantBeCopied = TRUE, .cantBeSuppressed = TRUE, .cantBeOverwritten = TRUE, .failsOnImposter = TRUE, @@ -2265,6 +2266,7 @@ const struct Ability gAbilitiesInfo[ABILITIES_COUNT] = .cantBeCopied = TRUE, .cantBeSwapped = TRUE, .cantBeTraced = TRUE, + .cantBeSuppressed = TRUE, }, [ABILITY_ELECTROMORPHOSIS] = diff --git a/src/data/pokemon/form_change_table_pointers.h b/src/data/pokemon/form_change_table_pointers.h index 282ea29d3a..4d26837b28 100644 --- a/src/data/pokemon/form_change_table_pointers.h +++ b/src/data/pokemon/form_change_table_pointers.h @@ -1,5 +1,6 @@ const struct Fusion *const gFusionTablePointers[NUM_SPECIES] = { +#if P_FUSION_FORMS #if P_FAMILY_KYUREM [SPECIES_KYUREM] = sKyuremFusionTable, #if P_FAMILY_RESHIRAM @@ -31,4 +32,5 @@ const struct Fusion *const gFusionTablePointers[NUM_SPECIES] = [SPECIES_GLASTRIER] = sCalyrexFusionTable, #endif //P_FAMILY_GLASTRIER #endif //P_FAMILY_CALYREX +#endif //P_FUSION_FORMS }; diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index d285ad85f4..5edd6f42b5 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -1,24 +1,36 @@ #if P_FAMILY_BULBASAUR static const struct FormChange sVenusaurFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_VENUSAUR_MEGA, ITEM_VENUSAURITE}, +#endif +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_VENUSAUR_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_BULBASAUR #if P_FAMILY_CHARMANDER static const struct FormChange sCharizardFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_CHARIZARD_MEGA_X, ITEM_CHARIZARDITE_X}, {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_CHARIZARD_MEGA_Y, ITEM_CHARIZARDITE_Y}, +#endif +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_CHARIZARD_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_CHARMANDER #if P_FAMILY_SQUIRTLE static const struct FormChange sBlastoiseFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_BLASTOISE_MEGA, ITEM_BLASTOISINITE}, +#endif +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_BLASTOISE_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_SQUIRTLE @@ -26,21 +38,27 @@ static const struct FormChange sBlastoiseFormChangeTable[] = { #if P_FAMILY_CATERPIE static const struct FormChange sButterfreeFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_BUTTERFREE_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_CATERPIE #if P_FAMILY_WEEDLE static const struct FormChange sBeedrillFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_BEEDRILL_MEGA, ITEM_BEEDRILLITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_WEEDLE #if P_FAMILY_PIDGEY static const struct FormChange sPidgeotFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_PIDGEOT_MEGA, ITEM_PIDGEOTITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_PIDGEY @@ -48,7 +66,9 @@ static const struct FormChange sPidgeotFormChangeTable[] = { #if P_FAMILY_PIKACHU static const struct FormChange sPikachuFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_PIKACHU_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_PIKACHU @@ -56,14 +76,18 @@ static const struct FormChange sPikachuFormChangeTable[] = #if P_FAMILY_MEOWTH static const struct FormChange sMeowthFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_MEOWTH_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_MEOWTH #if P_FAMILY_ABRA static const struct FormChange sAlakazamFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_ALAKAZAM_MEGA, ITEM_ALAKAZITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_ABRA @@ -71,22 +95,30 @@ static const struct FormChange sAlakazamFormChangeTable[] = { #if P_FAMILY_MACHOP static const struct FormChange sMachampFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_MACHAMP_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_MACHOP #if P_FAMILY_SLOWPOKE static const struct FormChange sSlowbroFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SLOWBRO_MEGA, ITEM_SLOWBRONITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_SLOWPOKE #if P_FAMILY_GASTLY static const struct FormChange sGengarFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_GENGAR_MEGA, ITEM_GENGARITE}, +#endif +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_GENGAR_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_GASTLY @@ -94,7 +126,9 @@ static const struct FormChange sGengarFormChangeTable[] = { #if P_FAMILY_ONIX #if P_GEN_2_CROSS_EVOS static const struct FormChange sSteelixFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_STEELIX_MEGA, ITEM_STEELIXITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_GEN_2_CROSS_EVOS @@ -103,14 +137,18 @@ static const struct FormChange sSteelixFormChangeTable[] = { #if P_FAMILY_KRABBY static const struct FormChange sKinglerFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_KINGLER_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_KRABBY #if P_FAMILY_KANGASKHAN static const struct FormChange sKangaskhanFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_KANGASKHAN_MEGA, ITEM_KANGASKHANITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_KANGASKHAN @@ -118,7 +156,9 @@ static const struct FormChange sKangaskhanFormChangeTable[] = { #if P_FAMILY_SCYTHER #if P_GEN_2_CROSS_EVOS static const struct FormChange sScizorFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SCIZOR_MEGA, ITEM_SCIZORITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_GEN_2_CROSS_EVOS @@ -126,112 +166,144 @@ static const struct FormChange sScizorFormChangeTable[] = { #if P_FAMILY_PINSIR static const struct FormChange sPinsirFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_PINSIR_MEGA, ITEM_PINSIRITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_PINSIR #if P_FAMILY_MAGIKARP static const struct FormChange sGyaradosFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_GYARADOS_MEGA, ITEM_GYARADOSITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_MAGIKARP #if P_FAMILY_LAPRAS static const struct FormChange sLaprasFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_LAPRAS_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_LAPRAS #if P_FAMILY_EEVEE static const struct FormChange sEeveeFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_EEVEE_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_EEVEE #if P_FAMILY_AERODACTYL static const struct FormChange sAerodactylFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_AERODACTYL_MEGA, ITEM_AERODACTYLITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_AERODACTYL #if P_FAMILY_SNORLAX static const struct FormChange sSnorlaxFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_SNORLAX_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_SNORLAX #if P_FAMILY_MEWTWO static const struct FormChange sMewtwoFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_MEWTWO_MEGA_X, ITEM_MEWTWONITE_X}, {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_MEWTWO_MEGA_Y, ITEM_MEWTWONITE_Y}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_MEWTWO #if P_FAMILY_MAREEP static const struct FormChange sAmpharosFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_AMPHAROS_MEGA, ITEM_AMPHAROSITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_MAREEP #if P_FAMILY_HERACROSS static const struct FormChange sHeracrossFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_HERACROSS_MEGA, ITEM_HERACRONITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_HERACROSS #if P_FAMILY_HOUNDOUR static const struct FormChange sHoundoomFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_HOUNDOOM_MEGA, ITEM_HOUNDOOMINITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_HOUNDOUR #if P_FAMILY_LARVITAR static const struct FormChange sTyranitarFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_TYRANITAR_MEGA, ITEM_TYRANITARITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_LARVITAR #if P_FAMILY_TREECKO static const struct FormChange sSceptileFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SCEPTILE_MEGA, ITEM_SCEPTILITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_TREECKO #if P_FAMILY_TORCHIC static const struct FormChange sBlazikenFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_BLAZIKEN_MEGA, ITEM_BLAZIKENITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_TORCHIC #if P_FAMILY_MUDKIP static const struct FormChange sSwampertFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SWAMPERT_MEGA, ITEM_SWAMPERTITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_MUDKIP #if P_FAMILY_RALTS static const struct FormChange sGardevoirFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_GARDEVOIR_MEGA, ITEM_GARDEVOIRITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #if P_GEN_4_CROSS_EVOS static const struct FormChange sGalladeFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_GALLADE_MEGA, ITEM_GALLADITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_GEN_4_CROSS_EVOS @@ -239,77 +311,99 @@ static const struct FormChange sGalladeFormChangeTable[] = { #if P_FAMILY_SABLEYE static const struct FormChange sSableyeFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SABLEYE_MEGA, ITEM_SABLENITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_SABLEYE #if P_FAMILY_MAWILE static const struct FormChange sMawileFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_MAWILE_MEGA, ITEM_MAWILITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_MAWILE #if P_FAMILY_ARON static const struct FormChange sAggronFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_AGGRON_MEGA, ITEM_AGGRONITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_ARON #if P_FAMILY_MEDITITE static const struct FormChange sMedichamFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_MEDICHAM_MEGA, ITEM_MEDICHAMITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_MEDITITE #if P_FAMILY_ELECTRIKE static const struct FormChange sManectricFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_MANECTRIC_MEGA, ITEM_MANECTITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_ELECTRIKE #if P_FAMILY_CARVANHA static const struct FormChange sSharpedoFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SHARPEDO_MEGA, ITEM_SHARPEDONITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_CARVANHA #if P_FAMILY_NUMEL static const struct FormChange sCameruptFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_CAMERUPT_MEGA, ITEM_CAMERUPTITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_NUMEL #if P_FAMILY_SWABLU static const struct FormChange sAltariaFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_ALTARIA_MEGA, ITEM_ALTARIANITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_SWABLU #if P_FAMILY_SHUPPET static const struct FormChange sBanetteFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_BANETTE_MEGA, ITEM_BANETTITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_SHUPPET #if P_FAMILY_ABSOL static const struct FormChange sAbsolFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_ABSOL_MEGA, ITEM_ABSOLITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_ABSOL #if P_FAMILY_SNORUNT static const struct FormChange sGlalieFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_GLALIE_MEGA, ITEM_GLALITITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_SNORUNT @@ -338,49 +432,63 @@ static const struct FormChange sCastformFormChangeTable[] = { #if P_FAMILY_BAGON static const struct FormChange sSalamenceFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SALAMENCE_MEGA, ITEM_SALAMENCITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_BAGON #if P_FAMILY_BELDUM static const struct FormChange sMetagrossFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_METAGROSS_MEGA, ITEM_METAGROSSITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_BELDUM #if P_FAMILY_LATIAS static const struct FormChange sLatiasFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_LATIAS_MEGA, ITEM_LATIASITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_LATIAS #if P_FAMILY_LATIOS static const struct FormChange sLatiosFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_LATIOS_MEGA, ITEM_LATIOSITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_LATIOS #if P_FAMILY_KYOGRE static const struct FormChange sKyogreFormChangeTable[] = { +#if P_PRIMAL_REVERSIONS {FORM_CHANGE_BATTLE_PRIMAL_REVERSION, SPECIES_KYOGRE_PRIMAL, ITEM_BLUE_ORB}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_KYOGRE #if P_FAMILY_GROUDON static const struct FormChange sGroudonFormChangeTable[] = { +#if P_PRIMAL_REVERSIONS {FORM_CHANGE_BATTLE_PRIMAL_REVERSION, SPECIES_GROUDON_PRIMAL, ITEM_RED_ORB}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_GROUDON #if P_FAMILY_RAYQUAZA static const struct FormChange sRayquazaFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_MOVE, SPECIES_RAYQUAZA_MEGA, MOVE_DRAGON_ASCENT}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_RAYQUAZA @@ -441,28 +549,36 @@ static const struct FormChange sCherrimFormChangeTable[] = { #if P_FAMILY_BUNEARY static const struct FormChange sLopunnyFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_LOPUNNY_MEGA, ITEM_LOPUNNITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_BUNEARY #if P_FAMILY_GIBLE static const struct FormChange sGarchompFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_GARCHOMP_MEGA, ITEM_GARCHOMPITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_GIBLE #if P_FAMILY_RIOLU static const struct FormChange sLucarioFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_LUCARIO_MEGA, ITEM_LUCARIONITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_RIOLU #if P_FAMILY_SNOVER static const struct FormChange sAbomasnowFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_ABOMASNOW_MEGA, ITEM_ABOMASITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_SNOVER @@ -559,7 +675,9 @@ static const struct FormChange sArceusFormChangeTable[] = { #if P_FAMILY_AUDINO static const struct FormChange sAudinoFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_AUDINO_MEGA, ITEM_AUDINITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_AUDINO @@ -587,7 +705,9 @@ static const struct FormChange sDarmanitanGalarianFormChangeTable[] = { #if P_FAMILY_TRUBBISH static const struct FormChange sGarbodorFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_GARBODOR_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_TRUBBISH @@ -712,7 +832,9 @@ static const struct FormChange sZygardeCompleteFormChangeTable[] = { #if P_FAMILY_DIANCIE static const struct FormChange sDiancieFormChangeTable[] = { +#if P_MEGA_EVOLUTIONS {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_DIANCIE_MEGA, ITEM_DIANCITE}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_DIANCIE @@ -851,11 +973,15 @@ static const struct Fusion sNecrozmaFusionTable[] = { }; static const struct FormChange sNecrozmaDuskManeFormChangeTable[] = { +#if P_ULTRA_BURST_FORMS {FORM_CHANGE_BATTLE_ULTRA_BURST, SPECIES_NECROZMA_ULTRA, ITEM_ULTRANECROZIUM_Z}, +#endif {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sNecrozmaDawnWingsFormChangeTable[] = { +#if P_ULTRA_BURST_FORMS {FORM_CHANGE_BATTLE_ULTRA_BURST, SPECIES_NECROZMA_ULTRA, ITEM_ULTRANECROZIUM_Z}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_NECROZMA @@ -863,7 +989,9 @@ static const struct FormChange sNecrozmaDawnWingsFormChangeTable[] = { #if P_FAMILY_MELTAN static const struct FormChange sMelmetalFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_MELMETAL_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_MELTAN @@ -871,7 +999,9 @@ static const struct FormChange sMelmetalFormChangeTable[] = #if P_FAMILY_GROOKEY static const struct FormChange sRillaboomFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_RILLABOOM_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_GROOKEY @@ -879,7 +1009,9 @@ static const struct FormChange sRillaboomFormChangeTable[] = #if P_FAMILY_SCORBUNNY static const struct FormChange sCinderaceFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_CINDERACE_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_SCORBUNNY @@ -887,7 +1019,9 @@ static const struct FormChange sCinderaceFormChangeTable[] = #if P_FAMILY_SOBBLE static const struct FormChange sInteleonFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_INTELEON_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_SOBBLE @@ -895,7 +1029,9 @@ static const struct FormChange sInteleonFormChangeTable[] = #if P_FAMILY_ROOKIDEE static const struct FormChange sCorviknightFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_CORVIKNIGHT_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_ROOKIDEE @@ -903,7 +1039,9 @@ static const struct FormChange sCorviknightFormChangeTable[] = #if P_FAMILY_BLIPBUG static const struct FormChange sOrbeetleFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_ORBEETLE_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_BLIPBUG @@ -911,7 +1049,9 @@ static const struct FormChange sOrbeetleFormChangeTable[] = #if P_FAMILY_CHEWTLE static const struct FormChange sDrednawFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_DREDNAW_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_CHEWTLE @@ -919,7 +1059,9 @@ static const struct FormChange sDrednawFormChangeTable[] = #if P_FAMILY_ROLYCOLY static const struct FormChange sCoalossalFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_COALOSSAL_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_ROLYCOLY @@ -927,13 +1069,17 @@ static const struct FormChange sCoalossalFormChangeTable[] = #if P_FAMILY_APPLIN static const struct FormChange sFlappleFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_FLAPPLE_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sAppletunFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_APPLETUN_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_APPLIN @@ -941,7 +1087,9 @@ static const struct FormChange sAppletunFormChangeTable[] = #if P_FAMILY_SILICOBRA static const struct FormChange sSandacondaFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_SANDACONDA_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_SILICOBRA @@ -960,13 +1108,17 @@ static const struct FormChange sCramorantFormChangeTable[] = { #if P_FAMILY_TOXEL static const struct FormChange sToxtricityAmpedFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_TOXTRICITY_AMPED_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sToxtricityLowKeyFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_TOXTRICITY_LOW_KEY_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_TOXEL @@ -974,7 +1126,9 @@ static const struct FormChange sToxtricityLowKeyFormChangeTable[] = #if P_FAMILY_SIZZLIPEDE static const struct FormChange sCentiskorchFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_CENTISKORCH_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_SIZZLIPEDE @@ -982,7 +1136,9 @@ static const struct FormChange sCentiskorchFormChangeTable[] = #if P_FAMILY_HATENNA static const struct FormChange sHattereneFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_HATTERENE_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_HATENNA @@ -990,7 +1146,9 @@ static const struct FormChange sHattereneFormChangeTable[] = #if P_FAMILY_IMPIDIMP static const struct FormChange sGrimmsnarlFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_GRIMMSNARL_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_IMPIDIMP @@ -998,7 +1156,9 @@ static const struct FormChange sGrimmsnarlFormChangeTable[] = #if P_FAMILY_MILCERY static const struct FormChange sAlcremieFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_ALCREMIE_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_MILCERY @@ -1024,14 +1184,18 @@ static const struct FormChange sMorpekoFormChangeTable[] = { #if P_FAMILY_CUFANT static const struct FormChange sCopperajahFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_COPPERAJAH_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_CUFANT #if P_FAMILY_DURALUDON static const struct FormChange sDuraludonFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_DURALUDON_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_DURALUDON @@ -1054,12 +1218,16 @@ static const struct FormChange sZamazentaFormChangeTable[] = { #if P_FAMILY_KUBFU static const struct FormChange sUrshifuSingleStrikeFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_URSHIFU_SINGLE_STRIKE_STYLE_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sUrshifuRapidStrikeFormChangeTable[] = { +#if P_GIGANTAMAX_FORMS {FORM_CHANGE_BATTLE_GIGANTAMAX, SPECIES_URSHIFU_RAPID_STRIKE_STYLE_GIGANTAMAX}, +#endif {FORM_CHANGE_TERMINATOR}, }; #endif //P_FAMILY_KUBFU @@ -1101,7 +1269,9 @@ static const struct FormChange sOgerponFormChangeTable[] = { #if P_FAMILY_TERAPAGOS static const struct FormChange sTerapagosFormChangeTable[] = { {FORM_CHANGE_BEGIN_BATTLE, SPECIES_TERAPAGOS_TERASTAL}, //needs to be tied to the ability +#if P_TERA_FORMS //{FORM_CHANGE_TERASTALLIZATION, SPECIES_TERAPAGOS_STELLAR}, +#endif {FORM_CHANGE_END_BATTLE, SPECIES_TERAPAGOS_NORMAL}, {FORM_CHANGE_TERMINATOR}, }; diff --git a/src/data/pokemon/form_species_tables.h b/src/data/pokemon/form_species_tables.h index 736a7abe70..9ae2c3ebdb 100644 --- a/src/data/pokemon/form_species_tables.h +++ b/src/data/pokemon/form_species_tables.h @@ -1,8 +1,12 @@ #if P_FAMILY_BULBASAUR static const u16 sVenusaurFormSpeciesIdTable[] = { SPECIES_VENUSAUR, +#if P_MEGA_EVOLUTIONS SPECIES_VENUSAUR_MEGA, +#endif +#if P_GIGANTAMAX_FORMS SPECIES_VENUSAUR_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_BULBASAUR @@ -10,9 +14,13 @@ static const u16 sVenusaurFormSpeciesIdTable[] = { #if P_FAMILY_CHARMANDER static const u16 sCharizardFormSpeciesIdTable[] = { SPECIES_CHARIZARD, +#if P_MEGA_EVOLUTIONS SPECIES_CHARIZARD_MEGA_X, SPECIES_CHARIZARD_MEGA_Y, +#endif +#if P_GIGANTAMAX_FORMS SPECIES_CHARIZARD_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_CHARMANDER @@ -20,8 +28,12 @@ static const u16 sCharizardFormSpeciesIdTable[] = { #if P_FAMILY_SQUIRTLE static const u16 sBlastoiseFormSpeciesIdTable[] = { SPECIES_BLASTOISE, +#if P_MEGA_EVOLUTIONS SPECIES_BLASTOISE_MEGA, +#endif +#if P_GIGANTAMAX_FORMS SPECIES_BLASTOISE_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_SQUIRTLE @@ -29,7 +41,9 @@ static const u16 sBlastoiseFormSpeciesIdTable[] = { #if P_FAMILY_CATERPIE static const u16 sButterfreeFormSpeciesIdTable[] = { SPECIES_BUTTERFREE, +#if P_GIGANTAMAX_FORMS SPECIES_BUTTERFREE_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_CATERPIE @@ -37,7 +51,9 @@ static const u16 sButterfreeFormSpeciesIdTable[] = { #if P_FAMILY_WEEDLE static const u16 sBeedrillFormSpeciesIdTable[] = { SPECIES_BEEDRILL, +#if P_MEGA_EVOLUTIONS SPECIES_BEEDRILL_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_WEEDLE @@ -45,7 +61,9 @@ static const u16 sBeedrillFormSpeciesIdTable[] = { #if P_FAMILY_PIDGEY static const u16 sPidgeotFormSpeciesIdTable[] = { SPECIES_PIDGEOT, +#if P_MEGA_EVOLUTIONS SPECIES_PIDGEOT_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_PIDGEY @@ -53,14 +71,18 @@ static const u16 sPidgeotFormSpeciesIdTable[] = { #if P_FAMILY_RATTATA static const u16 sRattataFormSpeciesIdTable[] = { SPECIES_RATTATA, +#if P_ALOLAN_FORMS SPECIES_RATTATA_ALOLAN, +#endif FORM_SPECIES_END, }; static const u16 sRaticateFormSpeciesIdTable[] = { SPECIES_RATICATE, +#if P_ALOLAN_FORMS SPECIES_RATICATE_ALOLAN, SPECIES_RATICATE_ALOLAN_TOTEM, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_RATTATA @@ -76,12 +98,15 @@ static const u16 sPichuFormSpeciesIdTable[] = { static const u16 sPikachuFormSpeciesIdTable[] = { SPECIES_PIKACHU, +#if P_COSPLAY_PIKACHU_FORMS SPECIES_PIKACHU_COSPLAY, SPECIES_PIKACHU_ROCK_STAR, SPECIES_PIKACHU_BELLE, SPECIES_PIKACHU_POP_STAR, SPECIES_PIKACHU_PH_D, SPECIES_PIKACHU_LIBRE, +#endif +#if P_CAP_PIKACHU_FORMS SPECIES_PIKACHU_ORIGINAL_CAP, SPECIES_PIKACHU_HOENN_CAP, SPECIES_PIKACHU_SINNOH_CAP, @@ -90,14 +115,19 @@ static const u16 sPikachuFormSpeciesIdTable[] = { SPECIES_PIKACHU_ALOLA_CAP, SPECIES_PIKACHU_PARTNER_CAP, SPECIES_PIKACHU_WORLD_CAP, +#endif +#if P_GIGANTAMAX_FORMS SPECIES_PIKACHU_GIGANTAMAX, +#endif SPECIES_PIKACHU_PARTNER, FORM_SPECIES_END, }; static const u16 sRaichuFormSpeciesIdTable[] = { SPECIES_RAICHU, +#if P_ALOLAN_FORMS SPECIES_RAICHU_ALOLAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_PIKACHU @@ -105,13 +135,17 @@ static const u16 sRaichuFormSpeciesIdTable[] = { #if P_FAMILY_SANDSHREW static const u16 sSandshrewFormSpeciesIdTable[] = { SPECIES_SANDSHREW, +#if P_ALOLAN_FORMS SPECIES_SANDSHREW_ALOLAN, +#endif FORM_SPECIES_END, }; static const u16 sSandslashFormSpeciesIdTable[] = { SPECIES_SANDSLASH, +#if P_ALOLAN_FORMS SPECIES_SANDSLASH_ALOLAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_SANDSHREW @@ -119,13 +153,17 @@ static const u16 sSandslashFormSpeciesIdTable[] = { #if P_FAMILY_VULPIX static const u16 sVulpixFormSpeciesIdTable[] = { SPECIES_VULPIX, +#if P_ALOLAN_FORMS SPECIES_VULPIX_ALOLAN, +#endif FORM_SPECIES_END, }; static const u16 sNinetalesFormSpeciesIdTable[] = { SPECIES_NINETALES, +#if P_ALOLAN_FORMS SPECIES_NINETALES_ALOLAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_VULPIX @@ -133,13 +171,17 @@ static const u16 sNinetalesFormSpeciesIdTable[] = { #if P_FAMILY_DIGLETT static const u16 sDiglettFormSpeciesIdTable[] = { SPECIES_DIGLETT, +#if P_ALOLAN_FORMS SPECIES_DIGLETT_ALOLAN, +#endif FORM_SPECIES_END, }; static const u16 sDugtrioFormSpeciesIdTable[] = { SPECIES_DUGTRIO, +#if P_ALOLAN_FORMS SPECIES_DUGTRIO_ALOLAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_DIGLETT @@ -147,15 +189,23 @@ static const u16 sDugtrioFormSpeciesIdTable[] = { #if P_FAMILY_MEOWTH static const u16 sMeowthFormSpeciesIdTable[] = { SPECIES_MEOWTH, +#if P_ALOLAN_FORMS SPECIES_MEOWTH_ALOLAN, +#endif +#if P_GALARIAN_FORMS SPECIES_MEOWTH_GALARIAN, +#endif +#if P_GIGANTAMAX_FORMS SPECIES_MEOWTH_GIGANTAMAX, +#endif FORM_SPECIES_END, }; static const u16 sPersianFormSpeciesIdTable[] = { SPECIES_PERSIAN, +#if P_ALOLAN_FORMS SPECIES_PERSIAN_ALOLAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_MEOWTH @@ -163,13 +213,17 @@ static const u16 sPersianFormSpeciesIdTable[] = { #if P_FAMILY_GROWLITHE static const u16 sGrowlitheFormSpeciesIdTable[] = { SPECIES_GROWLITHE, +#if P_HISUIAN_FORMS SPECIES_GROWLITHE_HISUIAN, +#endif FORM_SPECIES_END, }; static const u16 sArcanineFormSpeciesIdTable[] = { SPECIES_ARCANINE, +#if P_HISUIAN_FORMS SPECIES_ARCANINE_HISUIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_GROWLITHE @@ -177,7 +231,9 @@ static const u16 sArcanineFormSpeciesIdTable[] = { #if P_FAMILY_ABRA static const u16 sAlakazamFormSpeciesIdTable[] = { SPECIES_ALAKAZAM, +#if P_MEGA_EVOLUTIONS SPECIES_ALAKAZAM_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_ABRA @@ -185,7 +241,9 @@ static const u16 sAlakazamFormSpeciesIdTable[] = { #if P_FAMILY_MACHOP static const u16 sMachampFormSpeciesIdTable[] = { SPECIES_MACHAMP, +#if P_GIGANTAMAX_FORMS SPECIES_MACHAMP_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_MACHOP @@ -193,19 +251,25 @@ static const u16 sMachampFormSpeciesIdTable[] = { #if P_FAMILY_GEODUDE static const u16 sGeodudeFormSpeciesIdTable[] = { SPECIES_GEODUDE, +#if P_ALOLAN_FORMS SPECIES_GEODUDE_ALOLAN, +#endif FORM_SPECIES_END, }; static const u16 sGravelerFormSpeciesIdTable[] = { SPECIES_GRAVELER, +#if P_ALOLAN_FORMS SPECIES_GRAVELER_ALOLAN, +#endif FORM_SPECIES_END, }; static const u16 sGolemFormSpeciesIdTable[] = { SPECIES_GOLEM, +#if P_ALOLAN_FORMS SPECIES_GOLEM_ALOLAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_GEODUDE @@ -213,13 +277,17 @@ static const u16 sGolemFormSpeciesIdTable[] = { #if P_FAMILY_PONYTA static const u16 sPonytaFormSpeciesIdTable[] = { SPECIES_PONYTA, +#if P_GALARIAN_FORMS SPECIES_PONYTA_GALARIAN, +#endif FORM_SPECIES_END, }; static const u16 sRapidashFormSpeciesIdTable[] = { SPECIES_RAPIDASH, +#if P_GALARIAN_FORMS SPECIES_RAPIDASH_GALARIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_PONYTA @@ -227,21 +295,29 @@ static const u16 sRapidashFormSpeciesIdTable[] = { #if P_FAMILY_SLOWPOKE static const u16 sSlowpokeFormSpeciesIdTable[] = { SPECIES_SLOWPOKE, +#if P_GALARIAN_FORMS SPECIES_SLOWPOKE_GALARIAN, +#endif FORM_SPECIES_END, }; static const u16 sSlowbroFormSpeciesIdTable[] = { SPECIES_SLOWBRO, +#if P_MEGA_EVOLUTIONS SPECIES_SLOWBRO_MEGA, +#endif +#if P_GALARIAN_FORMS SPECIES_SLOWBRO_GALARIAN, +#endif FORM_SPECIES_END, }; #if P_GEN_2_CROSS_EVOS static const u16 sSlowkingFormSpeciesIdTable[] = { SPECIES_SLOWKING, +#if P_GALARIAN_FORMS SPECIES_SLOWKING_GALARIAN, +#endif FORM_SPECIES_END, }; #endif //P_GEN_2_CROSS_EVOS @@ -250,7 +326,9 @@ static const u16 sSlowkingFormSpeciesIdTable[] = { #if P_FAMILY_FARFETCHD static const u16 sFarfetchdFormSpeciesIdTable[] = { SPECIES_FARFETCHD, +#if P_GALARIAN_FORMS SPECIES_FARFETCHD_GALARIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_FARFETCHD @@ -258,13 +336,17 @@ static const u16 sFarfetchdFormSpeciesIdTable[] = { #if P_FAMILY_GRIMER static const u16 sGrimerFormSpeciesIdTable[] = { SPECIES_GRIMER, +#if P_ALOLAN_FORMS SPECIES_GRIMER_ALOLAN, +#endif FORM_SPECIES_END, }; static const u16 sMukFormSpeciesIdTable[] = { SPECIES_MUK, +#if P_ALOLAN_FORMS SPECIES_MUK_ALOLAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_GRIMER @@ -272,8 +354,12 @@ static const u16 sMukFormSpeciesIdTable[] = { #if P_FAMILY_GASTLY static const u16 sGengarFormSpeciesIdTable[] = { SPECIES_GENGAR, +#if P_MEGA_EVOLUTIONS SPECIES_GENGAR_MEGA, +#endif +#if P_GIGANTAMAX_FORMS SPECIES_GENGAR_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_GASTLY @@ -282,7 +368,9 @@ static const u16 sGengarFormSpeciesIdTable[] = { #if P_GEN_2_CROSS_EVOS static const u16 sSteelixFormSpeciesIdTable[] = { SPECIES_STEELIX, +#if P_MEGA_EVOLUTIONS SPECIES_STEELIX_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_GEN_2_CROSS_EVOS @@ -291,7 +379,9 @@ static const u16 sSteelixFormSpeciesIdTable[] = { #if P_FAMILY_KRABBY static const u16 sKinglerFormSpeciesIdTable[] = { SPECIES_KINGLER, +#if P_GIGANTAMAX_FORMS SPECIES_KINGLER_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_KRABBY @@ -299,13 +389,17 @@ static const u16 sKinglerFormSpeciesIdTable[] = { #if P_FAMILY_VOLTORB static const u16 sVoltorbFormSpeciesIdTable[] = { SPECIES_VOLTORB, +#if P_HISUIAN_FORMS SPECIES_VOLTORB_HISUIAN, +#endif FORM_SPECIES_END, }; static const u16 sElectrodeFormSpeciesIdTable[] = { SPECIES_ELECTRODE, +#if P_HISUIAN_FORMS SPECIES_ELECTRODE_HISUIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_VOLTORB @@ -313,7 +407,9 @@ static const u16 sElectrodeFormSpeciesIdTable[] = { #if P_FAMILY_EXEGGCUTE static const u16 sExeggutorFormSpeciesIdTable[] = { SPECIES_EXEGGUTOR, +#if P_ALOLAN_FORMS SPECIES_EXEGGUTOR_ALOLAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_EXEGGCUTE @@ -321,8 +417,10 @@ static const u16 sExeggutorFormSpeciesIdTable[] = { #if P_FAMILY_CUBONE static const u16 sMarowakFormSpeciesIdTable[] = { SPECIES_MAROWAK, +#if P_ALOLAN_FORMS SPECIES_MAROWAK_ALOLAN, SPECIES_MAROWAK_ALOLAN_TOTEM, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_CUBONE @@ -330,7 +428,9 @@ static const u16 sMarowakFormSpeciesIdTable[] = { #if P_FAMILY_KOFFING static const u16 sWeezingFormSpeciesIdTable[] = { SPECIES_WEEZING, +#if P_GALARIAN_FORMS SPECIES_WEEZING_GALARIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_KOFFING @@ -338,7 +438,9 @@ static const u16 sWeezingFormSpeciesIdTable[] = { #if P_FAMILY_KANGASKHAN static const u16 sKangaskhanFormSpeciesIdTable[] = { SPECIES_KANGASKHAN, +#if P_MEGA_EVOLUTIONS SPECIES_KANGASKHAN_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_KANGASKHAN @@ -346,7 +448,9 @@ static const u16 sKangaskhanFormSpeciesIdTable[] = { #if P_FAMILY_MR_MIME static const u16 sMrMimeFormSpeciesIdTable[] = { SPECIES_MR_MIME, +#if P_GALARIAN_FORMS SPECIES_MR_MIME_GALARIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_MR_MIME @@ -355,7 +459,9 @@ static const u16 sMrMimeFormSpeciesIdTable[] = { #if P_GEN_2_CROSS_EVOS static const u16 sScizorFormSpeciesIdTable[] = { SPECIES_SCIZOR, +#if P_MEGA_EVOLUTIONS SPECIES_SCIZOR_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_GEN_2_CROSS_EVOS @@ -364,7 +470,9 @@ static const u16 sScizorFormSpeciesIdTable[] = { #if P_FAMILY_PINSIR static const u16 sPinsirFormSpeciesIdTable[] = { SPECIES_PINSIR, +#if P_MEGA_EVOLUTIONS SPECIES_PINSIR_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_PINSIR @@ -372,9 +480,11 @@ static const u16 sPinsirFormSpeciesIdTable[] = { #if P_FAMILY_TAUROS static const u16 sTaurosFormSpeciesIdTable[] = { SPECIES_TAUROS, +#if P_PALDEAN_FORMS SPECIES_TAUROS_PALDEAN_COMBAT_BREED, SPECIES_TAUROS_PALDEAN_BLAZE_BREED, SPECIES_TAUROS_PALDEAN_AQUA_BREED, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_TAUROS @@ -382,7 +492,9 @@ static const u16 sTaurosFormSpeciesIdTable[] = { #if P_FAMILY_MAGIKARP static const u16 sGyaradosFormSpeciesIdTable[] = { SPECIES_GYARADOS, +#if P_MEGA_EVOLUTIONS SPECIES_GYARADOS_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_MAGIKARP @@ -390,7 +502,9 @@ static const u16 sGyaradosFormSpeciesIdTable[] = { #if P_FAMILY_LAPRAS static const u16 sLaprasFormSpeciesIdTable[] = { SPECIES_LAPRAS, +#if P_GIGANTAMAX_FORMS SPECIES_LAPRAS_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_LAPRAS @@ -398,7 +512,9 @@ static const u16 sLaprasFormSpeciesIdTable[] = { #if P_FAMILY_EEVEE static const u16 sEeveeFormSpeciesIdTable[] = { SPECIES_EEVEE, +#if P_GIGANTAMAX_FORMS SPECIES_EEVEE_GIGANTAMAX, +#endif SPECIES_EEVEE_PARTNER, FORM_SPECIES_END, }; @@ -407,7 +523,9 @@ static const u16 sEeveeFormSpeciesIdTable[] = { #if P_FAMILY_AERODACTYL static const u16 sAerodactylFormSpeciesIdTable[] = { SPECIES_AERODACTYL, +#if P_MEGA_EVOLUTIONS SPECIES_AERODACTYL_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_AERODACTYL @@ -415,7 +533,9 @@ static const u16 sAerodactylFormSpeciesIdTable[] = { #if P_FAMILY_SNORLAX static const u16 sSnorlaxFormSpeciesIdTable[] = { SPECIES_SNORLAX, +#if P_GIGANTAMAX_FORMS SPECIES_SNORLAX_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_SNORLAX @@ -423,7 +543,9 @@ static const u16 sSnorlaxFormSpeciesIdTable[] = { #if P_FAMILY_ARTICUNO static const u16 sArticunoFormSpeciesIdTable[] = { SPECIES_ARTICUNO, +#if P_GALARIAN_FORMS SPECIES_ARTICUNO_GALARIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_ARTICUNO @@ -431,7 +553,9 @@ static const u16 sArticunoFormSpeciesIdTable[] = { #if P_FAMILY_ZAPDOS static const u16 sZapdosFormSpeciesIdTable[] = { SPECIES_ZAPDOS, +#if P_GALARIAN_FORMS SPECIES_ZAPDOS_GALARIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_ZAPDOS @@ -439,7 +563,9 @@ static const u16 sZapdosFormSpeciesIdTable[] = { #if P_FAMILY_MOLTRES static const u16 sMoltresFormSpeciesIdTable[] = { SPECIES_MOLTRES, +#if P_GALARIAN_FORMS SPECIES_MOLTRES_GALARIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_MOLTRES @@ -447,8 +573,10 @@ static const u16 sMoltresFormSpeciesIdTable[] = { #if P_FAMILY_MEWTWO static const u16 sMewtwoFormSpeciesIdTable[] = { SPECIES_MEWTWO, +#if P_MEGA_EVOLUTIONS SPECIES_MEWTWO_MEGA_X, SPECIES_MEWTWO_MEGA_Y, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_MEWTWO @@ -456,7 +584,9 @@ static const u16 sMewtwoFormSpeciesIdTable[] = { #if P_FAMILY_CYNDAQUIL static const u16 sTyphlosionFormSpeciesIdTable[] = { SPECIES_TYPHLOSION, +#if P_HISUIAN_FORMS SPECIES_TYPHLOSION_HISUIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_CYNDAQUIL @@ -464,7 +594,9 @@ static const u16 sTyphlosionFormSpeciesIdTable[] = { #if P_FAMILY_MAREEP static const u16 sAmpharosFormSpeciesIdTable[] = { SPECIES_AMPHAROS, +#if P_MEGA_EVOLUTIONS SPECIES_AMPHAROS_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_MAREEP @@ -472,7 +604,9 @@ static const u16 sAmpharosFormSpeciesIdTable[] = { #if P_FAMILY_WOOPER static const u16 sWooperFormSpeciesIdTable[] = { SPECIES_WOOPER, +#if P_PALDEAN_FORMS SPECIES_WOOPER_PALDEAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_WOOPER @@ -522,7 +656,9 @@ static const u16 sDudunsparceFormSpeciesIdTable[] = { #if P_FAMILY_QWILFISH static const u16 sQwilfishFormSpeciesIdTable[] = { SPECIES_QWILFISH, +#if P_HISUIAN_FORMS SPECIES_QWILFISH_HISUIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_QWILFISH @@ -530,7 +666,9 @@ static const u16 sQwilfishFormSpeciesIdTable[] = { #if P_FAMILY_HERACROSS static const u16 sHeracrossFormSpeciesIdTable[] = { SPECIES_HERACROSS, +#if P_MEGA_EVOLUTIONS SPECIES_HERACROSS_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_HERACROSS @@ -538,7 +676,9 @@ static const u16 sHeracrossFormSpeciesIdTable[] = { #if P_FAMILY_SNEASEL static const u16 sSneaselFormSpeciesIdTable[] = { SPECIES_SNEASEL, +#if P_HISUIAN_FORMS SPECIES_SNEASEL_HISUIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_SNEASEL @@ -554,7 +694,9 @@ static const u16 sUrsalunaFormSpeciesIdTable[] = { #if P_FAMILY_CORSOLA static const u16 sCorsolaFormSpeciesIdTable[] = { SPECIES_CORSOLA, +#if P_GALARIAN_FORMS SPECIES_CORSOLA_GALARIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_CORSOLA @@ -562,7 +704,9 @@ static const u16 sCorsolaFormSpeciesIdTable[] = { #if P_FAMILY_HOUNDOUR static const u16 sHoundoomFormSpeciesIdTable[] = { SPECIES_HOUNDOOM, +#if P_MEGA_EVOLUTIONS SPECIES_HOUNDOOM_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_HOUNDOUR @@ -570,7 +714,9 @@ static const u16 sHoundoomFormSpeciesIdTable[] = { #if P_FAMILY_LARVITAR static const u16 sTyranitarFormSpeciesIdTable[] = { SPECIES_TYRANITAR, +#if P_MEGA_EVOLUTIONS SPECIES_TYRANITAR_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_LARVITAR @@ -578,7 +724,9 @@ static const u16 sTyranitarFormSpeciesIdTable[] = { #if P_FAMILY_TREECKO static const u16 sSceptileFormSpeciesIdTable[] = { SPECIES_SCEPTILE, +#if P_MEGA_EVOLUTIONS SPECIES_SCEPTILE_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_TREECKO @@ -586,7 +734,9 @@ static const u16 sSceptileFormSpeciesIdTable[] = { #if P_FAMILY_TORCHIC static const u16 sBlazikenFormSpeciesIdTable[] = { SPECIES_BLAZIKEN, +#if P_MEGA_EVOLUTIONS SPECIES_BLAZIKEN_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_TORCHIC @@ -594,7 +744,9 @@ static const u16 sBlazikenFormSpeciesIdTable[] = { #if P_FAMILY_MUDKIP static const u16 sSwampertFormSpeciesIdTable[] = { SPECIES_SWAMPERT, +#if P_MEGA_EVOLUTIONS SPECIES_SWAMPERT_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_MUDKIP @@ -602,13 +754,17 @@ static const u16 sSwampertFormSpeciesIdTable[] = { #if P_FAMILY_ZIGZAGOON static const u16 sZigzagoonFormSpeciesIdTable[] = { SPECIES_ZIGZAGOON, +#if P_GALARIAN_FORMS SPECIES_ZIGZAGOON_GALARIAN, +#endif FORM_SPECIES_END, }; static const u16 sLinooneFormSpeciesIdTable[] = { SPECIES_LINOONE, +#if P_GALARIAN_FORMS SPECIES_LINOONE_GALARIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_ZIGZAGOON @@ -616,14 +772,18 @@ static const u16 sLinooneFormSpeciesIdTable[] = { #if P_FAMILY_RALTS static const u16 sGardevoirFormSpeciesIdTable[] = { SPECIES_GARDEVOIR, +#if P_MEGA_EVOLUTIONS SPECIES_GARDEVOIR_MEGA, +#endif FORM_SPECIES_END, }; #if P_GEN_4_CROSS_EVOS static const u16 sGalladeFormSpeciesIdTable[] = { SPECIES_GALLADE, +#if P_MEGA_EVOLUTIONS SPECIES_GALLADE_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_GEN_4_CROSS_EVOS @@ -632,7 +792,9 @@ static const u16 sGalladeFormSpeciesIdTable[] = { #if P_FAMILY_SABLEYE static const u16 sSableyeFormSpeciesIdTable[] = { SPECIES_SABLEYE, +#if P_MEGA_EVOLUTIONS SPECIES_SABLEYE_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_SABLEYE @@ -640,7 +802,9 @@ static const u16 sSableyeFormSpeciesIdTable[] = { #if P_FAMILY_MAWILE static const u16 sMawileFormSpeciesIdTable[] = { SPECIES_MAWILE, +#if P_MEGA_EVOLUTIONS SPECIES_MAWILE_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_MAWILE @@ -648,7 +812,9 @@ static const u16 sMawileFormSpeciesIdTable[] = { #if P_FAMILY_ARON static const u16 sAggronFormSpeciesIdTable[] = { SPECIES_AGGRON, +#if P_MEGA_EVOLUTIONS SPECIES_AGGRON_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_ARON @@ -656,7 +822,9 @@ static const u16 sAggronFormSpeciesIdTable[] = { #if P_FAMILY_MEDITITE static const u16 sMedichamFormSpeciesIdTable[] = { SPECIES_MEDICHAM, +#if P_MEGA_EVOLUTIONS SPECIES_MEDICHAM_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_MEDITITE @@ -664,7 +832,9 @@ static const u16 sMedichamFormSpeciesIdTable[] = { #if P_FAMILY_ELECTRIKE static const u16 sManectricFormSpeciesIdTable[] = { SPECIES_MANECTRIC, +#if P_MEGA_EVOLUTIONS SPECIES_MANECTRIC_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_ELECTRIKE @@ -672,7 +842,9 @@ static const u16 sManectricFormSpeciesIdTable[] = { #if P_FAMILY_CARVANHA static const u16 sSharpedoFormSpeciesIdTable[] = { SPECIES_SHARPEDO, +#if P_MEGA_EVOLUTIONS SPECIES_SHARPEDO_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_CARVANHA @@ -680,7 +852,9 @@ static const u16 sSharpedoFormSpeciesIdTable[] = { #if P_FAMILY_NUMEL static const u16 sCameruptFormSpeciesIdTable[] = { SPECIES_CAMERUPT, +#if P_MEGA_EVOLUTIONS SPECIES_CAMERUPT_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_NUMEL @@ -688,7 +862,9 @@ static const u16 sCameruptFormSpeciesIdTable[] = { #if P_FAMILY_SWABLU static const u16 sAltariaFormSpeciesIdTable[] = { SPECIES_ALTARIA, +#if P_MEGA_EVOLUTIONS SPECIES_ALTARIA_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_SWABLU @@ -706,7 +882,9 @@ static const u16 sCastformFormSpeciesIdTable[] = { #if P_FAMILY_SHUPPET static const u16 sBanetteFormSpeciesIdTable[] = { SPECIES_BANETTE, +#if P_MEGA_EVOLUTIONS SPECIES_BANETTE_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_SHUPPET @@ -714,7 +892,9 @@ static const u16 sBanetteFormSpeciesIdTable[] = { #if P_FAMILY_ABSOL static const u16 sAbsolFormSpeciesIdTable[] = { SPECIES_ABSOL, +#if P_MEGA_EVOLUTIONS SPECIES_ABSOL_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_ABSOL @@ -722,7 +902,9 @@ static const u16 sAbsolFormSpeciesIdTable[] = { #if P_FAMILY_SNORUNT static const u16 sGlalieFormSpeciesIdTable[] = { SPECIES_GLALIE, +#if P_MEGA_EVOLUTIONS SPECIES_GLALIE_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_SNORUNT @@ -730,7 +912,9 @@ static const u16 sGlalieFormSpeciesIdTable[] = { #if P_FAMILY_BAGON static const u16 sSalamenceFormSpeciesIdTable[] = { SPECIES_SALAMENCE, +#if P_MEGA_EVOLUTIONS SPECIES_SALAMENCE_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_BAGON @@ -738,7 +922,9 @@ static const u16 sSalamenceFormSpeciesIdTable[] = { #if P_FAMILY_BELDUM static const u16 sMetagrossFormSpeciesIdTable[] = { SPECIES_METAGROSS, +#if P_MEGA_EVOLUTIONS SPECIES_METAGROSS_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_BELDUM @@ -746,7 +932,9 @@ static const u16 sMetagrossFormSpeciesIdTable[] = { #if P_FAMILY_LATIAS static const u16 sLatiasFormSpeciesIdTable[] = { SPECIES_LATIAS, +#if P_MEGA_EVOLUTIONS SPECIES_LATIAS_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_LATIAS @@ -754,7 +942,9 @@ static const u16 sLatiasFormSpeciesIdTable[] = { #if P_FAMILY_LATIOS static const u16 sLatiosFormSpeciesIdTable[] = { SPECIES_LATIOS, +#if P_MEGA_EVOLUTIONS SPECIES_LATIOS_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_LATIOS @@ -762,7 +952,9 @@ static const u16 sLatiosFormSpeciesIdTable[] = { #if P_FAMILY_KYOGRE static const u16 sKyogreFormSpeciesIdTable[] = { SPECIES_KYOGRE, +#if P_PRIMAL_REVERSIONS SPECIES_KYOGRE_PRIMAL, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_KYOGRE @@ -770,7 +962,9 @@ static const u16 sKyogreFormSpeciesIdTable[] = { #if P_FAMILY_GROUDON static const u16 sGroudonFormSpeciesIdTable[] = { SPECIES_GROUDON, +#if P_PRIMAL_REVERSIONS SPECIES_GROUDON_PRIMAL, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_GROUDON @@ -778,7 +972,9 @@ static const u16 sGroudonFormSpeciesIdTable[] = { #if P_FAMILY_RAYQUAZA static const u16 sRayquazaFormSpeciesIdTable[] = { SPECIES_RAYQUAZA, +#if P_MEGA_EVOLUTIONS SPECIES_RAYQUAZA_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_RAYQUAZA @@ -841,7 +1037,9 @@ static const u16 sGastrodonFormSpeciesIdTable[] = { #if P_FAMILY_BUNEARY static const u16 sLopunnyFormSpeciesIdTable[] = { SPECIES_LOPUNNY, +#if P_MEGA_EVOLUTIONS SPECIES_LOPUNNY_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_BUNEARY @@ -849,7 +1047,9 @@ static const u16 sLopunnyFormSpeciesIdTable[] = { #if P_FAMILY_GIBLE static const u16 sGarchompFormSpeciesIdTable[] = { SPECIES_GARCHOMP, +#if P_MEGA_EVOLUTIONS SPECIES_GARCHOMP_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_GIBLE @@ -857,7 +1057,9 @@ static const u16 sGarchompFormSpeciesIdTable[] = { #if P_FAMILY_RIOLU static const u16 sLucarioFormSpeciesIdTable[] = { SPECIES_LUCARIO, +#if P_MEGA_EVOLUTIONS SPECIES_LUCARIO_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_RIOLU @@ -865,7 +1067,9 @@ static const u16 sLucarioFormSpeciesIdTable[] = { #if P_FAMILY_SNOVER static const u16 sAbomasnowFormSpeciesIdTable[] = { SPECIES_ABOMASNOW, +#if P_MEGA_EVOLUTIONS SPECIES_ABOMASNOW_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_SNOVER @@ -941,7 +1145,9 @@ static const u16 sArceusFormSpeciesIdTable[] = { #if P_FAMILY_OSHAWOTT static const u16 sSamurottFormSpeciesIdTable[] = { SPECIES_SAMUROTT, +#if P_HISUIAN_FORMS SPECIES_SAMUROTT_HISUIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_OSHAWOTT @@ -949,7 +1155,9 @@ static const u16 sSamurottFormSpeciesIdTable[] = { #if P_FAMILY_AUDINO static const u16 sAudinoFormSpeciesIdTable[] = { SPECIES_AUDINO, +#if P_MEGA_EVOLUTIONS SPECIES_AUDINO_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_AUDINO @@ -957,7 +1165,9 @@ static const u16 sAudinoFormSpeciesIdTable[] = { #if P_FAMILY_PETILIL static const u16 sLilligantFormSpeciesIdTable[] = { SPECIES_LILLIGANT, +#if P_HISUIAN_FORMS SPECIES_LILLIGANT_HISUIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_PETILIL @@ -980,15 +1190,19 @@ static const u16 sBasculegionFormSpeciesIdTable[] = { #if P_FAMILY_DARUMAKA static const u16 sDarumakaFormSpeciesIdTable[] = { SPECIES_DARUMAKA, +#if P_GALARIAN_FORMS SPECIES_DARUMAKA_GALARIAN, +#endif FORM_SPECIES_END, }; static const u16 sDarmanitanFormSpeciesIdTable[] = { SPECIES_DARMANITAN_STANDARD_MODE, SPECIES_DARMANITAN_ZEN_MODE, +#if P_GALARIAN_FORMS SPECIES_DARMANITAN_GALARIAN_STANDARD_MODE, SPECIES_DARMANITAN_GALARIAN_ZEN_MODE, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_DARUMAKA @@ -996,7 +1210,9 @@ static const u16 sDarmanitanFormSpeciesIdTable[] = { #if P_FAMILY_YAMASK static const u16 sYamaskFormSpeciesIdTable[] = { SPECIES_YAMASK, +#if P_GALARIAN_FORMS SPECIES_YAMASK_GALARIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_YAMASK @@ -1004,7 +1220,9 @@ static const u16 sYamaskFormSpeciesIdTable[] = { #if P_FAMILY_TRUBBISH static const u16 sGarbodorFormSpeciesIdTable[] = { SPECIES_GARBODOR, +#if P_GIGANTAMAX_FORMS SPECIES_GARBODOR_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_TRUBBISH @@ -1012,13 +1230,17 @@ static const u16 sGarbodorFormSpeciesIdTable[] = { #if P_FAMILY_ZORUA static const u16 sZoruaFormSpeciesIdTable[] = { SPECIES_ZORUA, +#if P_HISUIAN_FORMS SPECIES_ZORUA_HISUIAN, +#endif FORM_SPECIES_END, }; static const u16 sZoroarkFormSpeciesIdTable[] = { SPECIES_ZOROARK, +#if P_HISUIAN_FORMS SPECIES_ZOROARK_HISUIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_ZORUA @@ -1044,7 +1266,9 @@ static const u16 sSawsbuckFormSpeciesIdTable[] = { #if P_FAMILY_STUNFISK static const u16 sStunfiskFormSpeciesIdTable[] = { SPECIES_STUNFISK, +#if P_GALARIAN_FORMS SPECIES_STUNFISK_GALARIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_STUNFISK @@ -1052,7 +1276,9 @@ static const u16 sStunfiskFormSpeciesIdTable[] = { #if P_FAMILY_RUFFLET static const u16 sBraviaryFormSpeciesIdTable[] = { SPECIES_BRAVIARY, +#if P_HISUIAN_FORMS SPECIES_BRAVIARY_HISUIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_RUFFLET @@ -1265,13 +1491,17 @@ static const u16 sAegislashFormSpeciesIdTable[] = { #if P_FAMILY_GOOMY static const u16 sSliggooFormSpeciesIdTable[] = { SPECIES_SLIGGOO, +#if P_HISUIAN_FORMS SPECIES_SLIGGOO_HISUIAN, +#endif FORM_SPECIES_END, }; static const u16 sGoodraFormSpeciesIdTable[] = { SPECIES_GOODRA, +#if P_HISUIAN_FORMS SPECIES_GOODRA_HISUIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_GOOMY @@ -1297,7 +1527,9 @@ static const u16 sGourgeistFormSpeciesIdTable[] = { #if P_FAMILY_BERGMITE static const u16 sAvaluggFormSpeciesIdTable[] = { SPECIES_AVALUGG, +#if P_HISUIAN_FORMS SPECIES_AVALUGG_HISUIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_BERGMITE @@ -1324,7 +1556,9 @@ static const u16 sZygardeFormSpeciesIdTable[] = { #if P_FAMILY_DIANCIE static const u16 sDiancieFormSpeciesIdTable[] = { SPECIES_DIANCIE, +#if P_MEGA_EVOLUTIONS SPECIES_DIANCIE_MEGA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_DIANCIE @@ -1340,7 +1574,9 @@ static const u16 sHoopaFormSpeciesIdTable[] = { #if P_FAMILY_ROWLET static const u16 sDecidueyeFormSpeciesIdTable[] = { SPECIES_DECIDUEYE, +#if P_HISUIAN_FORMS SPECIES_DECIDUEYE_HISUIAN, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_ROWLET @@ -1501,7 +1737,9 @@ static const u16 sNecrozmaFormSpeciesIdTable[] = { SPECIES_NECROZMA, SPECIES_NECROZMA_DUSK_MANE, SPECIES_NECROZMA_DAWN_WINGS, +#if P_ULTRA_BURST_FORMS SPECIES_NECROZMA_ULTRA, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_NECROZMA @@ -1517,7 +1755,9 @@ static const u16 sMagearnaFormSpeciesIdTable[] = { #if P_FAMILY_MELTAN static const u16 sMelmetalFormSpeciesIdTable[] = { SPECIES_MELMETAL, +#if P_GIGANTAMAX_FORMS SPECIES_MELMETAL_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_MELTAN @@ -1525,7 +1765,9 @@ static const u16 sMelmetalFormSpeciesIdTable[] = { #if P_FAMILY_GROOKEY static const u16 sRillaboomFormSpeciesIdTable[] = { SPECIES_RILLABOOM, +#if P_GIGANTAMAX_FORMS SPECIES_RILLABOOM_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_GROOKEY @@ -1533,7 +1775,9 @@ static const u16 sRillaboomFormSpeciesIdTable[] = { #if P_FAMILY_SCORBUNNY static const u16 sCinderaceFormSpeciesIdTable[] = { SPECIES_CINDERACE, +#if P_GIGANTAMAX_FORMS SPECIES_CINDERACE_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_SCORBUNNY @@ -1541,7 +1785,9 @@ static const u16 sCinderaceFormSpeciesIdTable[] = { #if P_FAMILY_SOBBLE static const u16 sInteleonFormSpeciesIdTable[] = { SPECIES_INTELEON, +#if P_GIGANTAMAX_FORMS SPECIES_INTELEON_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_SOBBLE @@ -1549,7 +1795,9 @@ static const u16 sInteleonFormSpeciesIdTable[] = { #if P_FAMILY_ROOKIDEE static const u16 sCorviknightFormSpeciesIdTable[] = { SPECIES_CORVIKNIGHT, +#if P_GIGANTAMAX_FORMS SPECIES_CORVIKNIGHT_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_ROOKIDEE @@ -1557,7 +1805,9 @@ static const u16 sCorviknightFormSpeciesIdTable[] = { #if P_FAMILY_BLIPBUG static const u16 sOrbeetleFormSpeciesIdTable[] = { SPECIES_ORBEETLE, +#if P_GIGANTAMAX_FORMS SPECIES_ORBEETLE_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_BLIPBUG @@ -1565,7 +1815,9 @@ static const u16 sOrbeetleFormSpeciesIdTable[] = { #if P_FAMILY_CHEWTLE static const u16 sDrednawFormSpeciesIdTable[] = { SPECIES_DREDNAW, +#if P_GIGANTAMAX_FORMS SPECIES_DREDNAW_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_CHEWTLE @@ -1573,7 +1825,9 @@ static const u16 sDrednawFormSpeciesIdTable[] = { #if P_FAMILY_ROLYCOLY static const u16 sCoalossalFormSpeciesIdTable[] = { SPECIES_COALOSSAL, +#if P_GIGANTAMAX_FORMS SPECIES_COALOSSAL_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_ROLYCOLY @@ -1581,13 +1835,17 @@ static const u16 sCoalossalFormSpeciesIdTable[] = { #if P_FAMILY_APPLIN static const u16 sFlappleFormSpeciesIdTable[] = { SPECIES_FLAPPLE, +#if P_GIGANTAMAX_FORMS SPECIES_FLAPPLE_GIGANTAMAX, +#endif FORM_SPECIES_END, }; static const u16 sAppletunFormSpeciesIdTable[] = { SPECIES_APPLETUN, +#if P_GIGANTAMAX_FORMS SPECIES_APPLETUN_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_APPLIN @@ -1595,7 +1853,9 @@ static const u16 sAppletunFormSpeciesIdTable[] = { #if P_FAMILY_SILICOBRA static const u16 sSandacondaFormSpeciesIdTable[] = { SPECIES_SANDACONDA, +#if P_GIGANTAMAX_FORMS SPECIES_SANDACONDA_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_SILICOBRA @@ -1613,8 +1873,12 @@ static const u16 sCramorantFormSpeciesIdTable[] = { static const u16 sToxtricityFormSpeciesIdTable[] = { SPECIES_TOXTRICITY_AMPED, SPECIES_TOXTRICITY_LOW_KEY, +#if P_GIGANTAMAX_FORMS SPECIES_TOXTRICITY_AMPED_GIGANTAMAX, +#endif +#if P_GIGANTAMAX_FORMS SPECIES_TOXTRICITY_LOW_KEY_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_TOXEL @@ -1622,7 +1886,9 @@ static const u16 sToxtricityFormSpeciesIdTable[] = { #if P_FAMILY_SIZZLIPEDE static const u16 sCentiskorchFormSpeciesIdTable[] = { SPECIES_CENTISKORCH, +#if P_GIGANTAMAX_FORMS SPECIES_CENTISKORCH_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_SIZZLIPEDE @@ -1644,7 +1910,9 @@ static const u16 sPolteageistFormSpeciesIdTable[] = { #if P_FAMILY_HATENNA static const u16 sHattereneFormSpeciesIdTable[] = { SPECIES_HATTERENE, +#if P_GIGANTAMAX_FORMS SPECIES_HATTERENE_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_HATENNA @@ -1652,7 +1920,9 @@ static const u16 sHattereneFormSpeciesIdTable[] = { #if P_FAMILY_IMPIDIMP static const u16 sGrimmsnarlFormSpeciesIdTable[] = { SPECIES_GRIMMSNARL, +#if P_GIGANTAMAX_FORMS SPECIES_GRIMMSNARL_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_IMPIDIMP @@ -1722,7 +1992,9 @@ static const u16 sAlcremieFormSpeciesIdTable[] = { SPECIES_ALCREMIE_RIBBON_RUBY_SWIRL, SPECIES_ALCREMIE_RIBBON_CARAMEL_SWIRL, SPECIES_ALCREMIE_RIBBON_RAINBOW_SWIRL, +#if P_GIGANTAMAX_FORMS SPECIES_ALCREMIE_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_MILCERY @@ -1754,7 +2026,9 @@ static const u16 sMorpekoFormSpeciesIdTable[] = { #if P_FAMILY_CUFANT static const u16 sCopperajahFormSpeciesIdTable[] = { SPECIES_COPPERAJAH, +#if P_GIGANTAMAX_FORMS SPECIES_COPPERAJAH_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_CUFANT @@ -1762,7 +2036,9 @@ static const u16 sCopperajahFormSpeciesIdTable[] = { #if P_FAMILY_DURALUDON static const u16 sDuraludonFormSpeciesIdTable[] = { SPECIES_DURALUDON, +#if P_GIGANTAMAX_FORMS SPECIES_DURALUDON_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_DURALUDON @@ -1795,8 +2071,10 @@ static const u16 sEternatusFormSpeciesIdTable[] = { static const u16 sUrshifuFormSpeciesIdTable[] = { SPECIES_URSHIFU_SINGLE_STRIKE_STYLE, SPECIES_URSHIFU_RAPID_STRIKE_STYLE, +#if P_GIGANTAMAX_FORMS SPECIES_URSHIFU_SINGLE_STRIKE_STYLE_GIGANTAMAX, SPECIES_URSHIFU_RAPID_STRIKE_STYLE_GIGANTAMAX, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_KUBFU @@ -1891,7 +2169,9 @@ static const u16 sOgerponFormSpeciesIdTable[] = { static const u16 sTerapagosFormSpeciesIdTable[] = { SPECIES_TERAPAGOS_NORMAL, SPECIES_TERAPAGOS_TERASTAL, +#if P_TERA_FORMS SPECIES_TERAPAGOS_STELLAR, +#endif FORM_SPECIES_END, }; #endif //P_FAMILY_TERAPAGOS diff --git a/src/data/pokemon/species_info/gen_1_families.h b/src/data/pokemon/species_info/gen_1_families.h index a12130d568..e8de1682c5 100644 --- a/src/data/pokemon/species_info/gen_1_families.h +++ b/src/data/pokemon/species_info/gen_1_families.h @@ -9259,6 +9259,7 @@ const struct SpeciesInfo gSpeciesInfoGen1[] = .abilities = GENGAR_ABILITIES, .bodyColor = BODY_COLOR_PURPLE, .speciesName = _("Gengar"), + .cryId = CRY_GENGAR, .natDexNum = NATIONAL_DEX_GENGAR, .categoryName = _("Shadow"), .height = 15, @@ -9313,6 +9314,7 @@ const struct SpeciesInfo gSpeciesInfoGen1[] = .abilities = { ABILITY_SHADOW_TAG, ABILITY_SHADOW_TAG, ABILITY_SHADOW_TAG }, .bodyColor = BODY_COLOR_PURPLE, .speciesName = _("Gengar"), + .cryId = CRY_GENGAR_MEGA, .natDexNum = NATIONAL_DEX_GENGAR, .categoryName = _("Shadow"), .height = 14, @@ -9369,6 +9371,7 @@ const struct SpeciesInfo gSpeciesInfoGen1[] = .abilities = GENGAR_ABILITIES, .bodyColor = BODY_COLOR_PURPLE, .speciesName = _("Gengar"), + .cryId = CRY_GENGAR, .natDexNum = NATIONAL_DEX_GENGAR, .categoryName = _("Shadow"), .height = 200, diff --git a/src/pokedex_plus_hgss.c b/src/pokedex_plus_hgss.c index 6a2d16caee..78b97303a4 100644 --- a/src/pokedex_plus_hgss.c +++ b/src/pokedex_plus_hgss.c @@ -4549,6 +4549,8 @@ static u8 PrintCryScreenSpeciesName(u8 windowId, u16 num, u8 left, u8 top) return i; } +#define MALE_PERSONALITY 0xFE + // Unown and Spinda use the personality of the first seen individual of that species // All others use personality 0 static u32 GetPokedexMonPersonality(u16 species) @@ -4562,7 +4564,7 @@ static u32 GetPokedexMonPersonality(u16 species) } else { - return 0; + return MALE_PERSONALITY; } } @@ -4926,9 +4928,11 @@ static void Task_LoadStatsScreen(u8 taskId) if (gTasks[taskId].data[1] == 0) { //Icon + u32 species = NationalPokedexNumToSpeciesHGSS(sPokedexListItem->dexNum); + u32 personality = GetPokedexMonPersonality(species); FreeMonIconPalettes(); //Free space for new pallete - LoadMonIconPalette(NationalPokedexNumToSpeciesHGSS(sPokedexListItem->dexNum)); //Loads pallete for current mon - gTasks[taskId].data[6] = CreateMonIcon(NationalPokedexNumToSpeciesHGSS(sPokedexListItem->dexNum), SpriteCB_MonIcon, 18, 31, 4, 0); //Create pokemon sprite + LoadMonIconPalettePersonality(species, personality); //Loads pallete for current mon + gTasks[taskId].data[6] = CreateMonIcon(species, SpriteCB_MonIcon, 18, 31, 4, personality); //Create pokemon sprite gSprites[gTasks[taskId].data[4]].oam.priority = 0; } gMain.state++; @@ -6060,13 +6064,15 @@ static void Task_LoadEvolutionScreen(u8 taskId) case 3: if (gTasks[taskId].data[1] == 0) { + u32 species = NationalPokedexNumToSpeciesHGSS(sPokedexListItem->dexNum); + u32 personality = GetPokedexMonPersonality(species); sPokedexView->selectedScreen = EVO_SCREEN; ResetEvoScreenDataStruct(); //Icon FreeMonIconPalettes(); //Free space for new pallete - LoadMonIconPalette(NationalPokedexNumToSpeciesHGSS(sPokedexListItem->dexNum)); //Loads pallete for current mon - PrintPreEvolutions(taskId, NationalPokedexNumToSpeciesHGSS(sPokedexListItem->dexNum)); - gTasks[taskId].data[4] = CreateMonIcon(NationalPokedexNumToSpeciesHGSS(sPokedexListItem->dexNum), SpriteCB_MonIcon, 18 + 32*sPokedexView->numPreEvolutions, 31, 4, 0); //Create pokemon sprite + LoadMonIconPalettePersonality(species, personality); //Loads pallete for current mon + PrintPreEvolutions(taskId, species); + gTasks[taskId].data[4] = CreateMonIcon(species, SpriteCB_MonIcon, 18 + 32*sPokedexView->numPreEvolutions, 31, 4, personality); //Create pokemon sprite EvoFormsPage_PrintNavigationButtons(); // Navigation buttons gSprites[gTasks[taskId].data[4]].oam.priority = 0; } @@ -6248,11 +6254,12 @@ static void HandleTargetSpeciesPrint(u8 taskId, u16 targetSpecies, u16 previousT if (base_i < iterations) { - LoadMonIconPalette(targetSpecies); //Loads pallete for current mon + u32 personality = GetPokedexMonPersonality(targetSpecies); + LoadMonIconPalettePersonality(targetSpecies, personality); //Loads pallete for current mon if (isEevee) - gTasks[taskId].data[4+base_i] = CreateMonIcon(targetSpecies, SpriteCB_MonIcon, 45 + 26*base_i, 31, 4, 0); //Create pokemon sprite + gTasks[taskId].data[4+base_i] = CreateMonIcon(targetSpecies, SpriteCB_MonIcon, 45 + 26*base_i, 31, 4, personality); //Create pokemon sprite else - gTasks[taskId].data[4+base_i] = CreateMonIcon(targetSpecies, SpriteCB_MonIcon, 50 + 32*base_i, 31, 4, 0); //Create pokemon sprite + gTasks[taskId].data[4+base_i] = CreateMonIcon(targetSpecies, SpriteCB_MonIcon, 50 + 32*base_i, 31, 4, personality); //Create pokemon sprite gSprites[gTasks[taskId].data[4+base_i]].oam.priority = 0; } } @@ -6293,8 +6300,9 @@ static void HandlePreEvolutionSpeciesPrint(u8 taskId, u16 preSpecies, u16 specie if (base_i < 3) { - LoadMonIconPalette(preSpecies); //Loads pallete for current mon - gTasks[taskId].data[4+base_i] = CreateMonIcon(preSpecies, SpriteCB_MonIcon, 18 + 32*base_i, 31, 4, 0); //Create pokemon sprite + u32 personality = GetPokedexMonPersonality(preSpecies); + LoadMonIconPalettePersonality(preSpecies, personality); //Loads pallete for current mon + gTasks[taskId].data[4+base_i] = CreateMonIcon(preSpecies, SpriteCB_MonIcon, 18 + 32*base_i, 31, 4, personality); //Create pokemon sprite gSprites[gTasks[taskId].data[4+base_i]].oam.priority = 0; } } @@ -6771,9 +6779,11 @@ static void Task_LoadFormsScreen(u8 taskId) if (gTasks[taskId].data[1] == 0) { //Icon + u32 species = NationalPokedexNumToSpeciesHGSS(sPokedexListItem->dexNum); + u32 personality = GetPokedexMonPersonality(species); FreeMonIconPalettes(); //Free space for new pallete - LoadMonIconPalette(NationalPokedexNumToSpeciesHGSS(sPokedexListItem->dexNum)); //Loads pallete for current mon - gTasks[taskId].data[4] = CreateMonIcon(NationalPokedexNumToSpeciesHGSS(sPokedexListItem->dexNum), SpriteCB_MonIcon, 18, 31, 4, 0); //Create pokemon sprite + LoadMonIconPalettePersonality(species, personality); //Loads pallete for current mon + gTasks[taskId].data[4] = CreateMonIcon(species, SpriteCB_MonIcon, 18, 31, 4, personality); //Create pokemon sprite gSprites[gTasks[taskId].data[4]].oam.priority = 0; } EvoFormsPage_PrintNavigationButtons(); // Navigation buttons @@ -6952,13 +6962,14 @@ static void PrintForms(u8 taskId, u16 species) continue; else { + u32 personality = GetPokedexMonPersonality(speciesForm); sPokedexView->sFormScreenData.formIds[j++] = i; times += 1; - LoadMonIconPalette(speciesForm); //Loads pallete for current mon + LoadMonIconPalettePersonality(speciesForm, personality); //Loads pallete for current mon if (times < 7) - gTasks[taskId].data[4+times] = CreateMonIcon(speciesForm, SpriteCB_MonIcon, 52 + 34*(times-1), 31, 4, 0); //Create pokemon sprite + gTasks[taskId].data[4+times] = CreateMonIcon(speciesForm, SpriteCB_MonIcon, 52 + 34*(times-1), 31, 4, personality); //Create pokemon sprite else if (times < 14) - gTasks[taskId].data[4+times] = CreateMonIcon(speciesForm, SpriteCB_MonIcon, 18 + 34*(times-7), 70 - y_offset_icons, 4, 0); //Create pokemon sprite + gTasks[taskId].data[4+times] = CreateMonIcon(speciesForm, SpriteCB_MonIcon, 18 + 34*(times-7), 70 - y_offset_icons, 4, personality); //Create pokemon sprite gSprites[gTasks[taskId].data[4+times]].oam.priority = 0; } } diff --git a/src/pokemon.c b/src/pokemon.c index 5f2dfb3019..20e8dfd797 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -1703,25 +1703,43 @@ void GiveBoxMonInitialMoveset_Fast(struct BoxPokemon *boxMon) //Credit: Asparagu u16 species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); s32 level = GetLevelFromBoxMonExp(boxMon); s32 i; - u16 levelMoveCount = 0; u16 moves[MAX_MON_MOVES] = {0}; u8 addedMoves = 0; const struct LevelUpMove *learnset = GetSpeciesLevelUpLearnset(species); for (i = 0; learnset[i].move != LEVEL_UP_MOVE_END; i++) - levelMoveCount++; - - for (i = levelMoveCount; (i >= 0 && addedMoves < MAX_MON_MOVES); i--) { + s32 j; + bool32 alreadyKnown = FALSE; + if (learnset[i].level > level) - continue; + break; if (learnset[i].level == 0) continue; - if (moves[addedMoves] != learnset[i].move) - moves[addedMoves++] = learnset[i].move; + for (j = 0; j < addedMoves + 1; j++) + if (moves[j] == learnset[i].move) + { + alreadyKnown = TRUE; + break; + } + + if (!alreadyKnown) + { + if (addedMoves < MAX_MON_MOVES) + { + moves[addedMoves] = learnset[i].move; + addedMoves++; + } + else + { + for (j = 0; j < MAX_MON_MOVES - 1; j++) + moves[j] = moves[j + 1]; + moves[MAX_MON_MOVES - 1] = learnset[i].move; + } + } } - for (i = MAX_MON_MOVES - 1; i >= 0; i--) + for (i = 0; i < MAX_MON_MOVES; i++) { SetBoxMonData(boxMon, MON_DATA_MOVE1 + i, &moves[i]); SetBoxMonData(boxMon, MON_DATA_PP1 + i, &gMovesInfo[moves[i]].pp); diff --git a/test/battle/ability/forecast.c b/test/battle/ability/forecast.c index df7ecd00a4..f87e34a532 100644 --- a/test/battle/ability/forecast.c +++ b/test/battle/ability/forecast.c @@ -266,7 +266,6 @@ SINGLE_BATTLE_TEST("Forecast transforms Castform back to normal when Sandstorm i SINGLE_BATTLE_TEST("Forecast transforms Castform back to normal under Air Lock") { - KNOWN_FAILING; GIVEN { PLAYER(SPECIES_CASTFORM_NORMAL) { Ability(ABILITY_FORECAST); } OPPONENT(SPECIES_WOBBUFFET); diff --git a/test/battle/ability/gastro_acid.c b/test/battle/ability/gastro_acid.c new file mode 100644 index 0000000000..a9fba14f89 --- /dev/null +++ b/test/battle/ability/gastro_acid.c @@ -0,0 +1,41 @@ +#include "global.h" +#include "test/battle.h" + +ASSUMPTIONS +{ + ASSUME(gMovesInfo[MOVE_GASTRO_ACID].effect == EFFECT_GASTRO_ACID); +} + +SINGLE_BATTLE_TEST("Gastro Acid fails if target has a banned ability") +{ + u32 species, ability; + + PARAMETRIZE { species = SPECIES_ARCEUS; ability = ABILITY_MULTITYPE; } + PARAMETRIZE { species = SPECIES_AEGISLASH; ability = ABILITY_STANCE_CHANGE; } + PARAMETRIZE { species = SPECIES_WISHIWASHI; ability = ABILITY_SCHOOLING; } + PARAMETRIZE { species = SPECIES_KOMALA; ability = ABILITY_COMATOSE; } + PARAMETRIZE { species = SPECIES_MINIOR; ability = ABILITY_SHIELDS_DOWN; } + PARAMETRIZE { species = SPECIES_MIMIKYU; ability = ABILITY_DISGUISE; } + PARAMETRIZE { species = SPECIES_SILVALLY; ability = ABILITY_RKS_SYSTEM; } + PARAMETRIZE { species = SPECIES_GRENINJA_BATTLE_BOND; ability = ABILITY_BATTLE_BOND; } + PARAMETRIZE { species = SPECIES_ZYGARDE; ability = ABILITY_POWER_CONSTRUCT; } + PARAMETRIZE { species = SPECIES_EISCUE; ability = ABILITY_ICE_FACE; } + PARAMETRIZE { species = SPECIES_CRAMORANT; ability = ABILITY_GULP_MISSILE; } + PARAMETRIZE { species = SPECIES_PALAFIN_ZERO; ability = ABILITY_ZERO_TO_HERO; } + PARAMETRIZE { species = SPECIES_TATSUGIRI; ability = ABILITY_COMMANDER; } + // Needs confirmation since those abilities can be surpressed by Neutralizing Gas + // PARAMETRIZE { species = SPECIES_IRON_MOTH; ability = ABILITY_QUARK_DRIVE; } + // PARAMETRIZE { species = SPECIES_WALKING_WAKE; ability = ABILITY_PROTOSYNTHESIS; } + PARAMETRIZE { species = SPECIES_CALYREX_SHADOW_RIDER; ability = ABILITY_AS_ONE_SHADOW_RIDER; } + PARAMETRIZE { species = SPECIES_CALYREX_ICE_RIDER; ability = ABILITY_AS_ONE_ICE_RIDER; } + + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(species) { Ability(ability); } + } WHEN { + TURN { MOVE(player, MOVE_GASTRO_ACID); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_GASTRO_ACID, player); + MESSAGE("But it failed!"); + } +} diff --git a/test/battle/ability/role_play.c b/test/battle/ability/role_play.c new file mode 100644 index 0000000000..46452ec3ff --- /dev/null +++ b/test/battle/ability/role_play.c @@ -0,0 +1,76 @@ +#include "global.h" +#include "test/battle.h" + +// Technically also covers Skill Swap and Doodle since both moves use the same command as Role Play +ASSUMPTIONS +{ + ASSUME(gMovesInfo[MOVE_ROLE_PLAY].effect == EFFECT_ROLE_PLAY); +} + +SINGLE_BATTLE_TEST("Role Play fails if target has a banned ability") +{ + u32 species, ability; + + PARAMETRIZE { species = SPECIES_SHEDINJA; ability = ABILITY_WONDER_GUARD; } + PARAMETRIZE { species = SPECIES_CASTFORM; ability = ABILITY_FORECAST; } + PARAMETRIZE { species = SPECIES_CHERRIM; ability = ABILITY_FLOWER_GIFT; } + PARAMETRIZE { species = SPECIES_ARCEUS; ability = ABILITY_MULTITYPE; } + PARAMETRIZE { species = SPECIES_ZORUA; ability = ABILITY_ILLUSION; } + PARAMETRIZE { species = SPECIES_DARMANITAN; ability = ABILITY_ZEN_MODE; } + PARAMETRIZE { species = SPECIES_DITTO; ability = ABILITY_IMPOSTER; } + PARAMETRIZE { species = SPECIES_AEGISLASH; ability = ABILITY_STANCE_CHANGE; } + PARAMETRIZE { species = SPECIES_MUK_ALOLAN; ability = ABILITY_POWER_OF_ALCHEMY; } + PARAMETRIZE { species = SPECIES_PASSIMIAN; ability = ABILITY_RECEIVER; } + PARAMETRIZE { species = SPECIES_WISHIWASHI; ability = ABILITY_SCHOOLING; } + PARAMETRIZE { species = SPECIES_KOMALA; ability = ABILITY_COMATOSE; } + PARAMETRIZE { species = SPECIES_MINIOR; ability = ABILITY_SHIELDS_DOWN; } + PARAMETRIZE { species = SPECIES_MIMIKYU; ability = ABILITY_DISGUISE; } + PARAMETRIZE { species = SPECIES_SILVALLY; ability = ABILITY_RKS_SYSTEM; } + PARAMETRIZE { species = SPECIES_ZYGARDE; ability = ABILITY_POWER_CONSTRUCT; } + PARAMETRIZE { species = SPECIES_GRENINJA_BATTLE_BOND; ability = ABILITY_BATTLE_BOND; } + PARAMETRIZE { species = SPECIES_EISCUE; ability = ABILITY_ICE_FACE; } + PARAMETRIZE { species = SPECIES_CRAMORANT; ability = ABILITY_GULP_MISSILE; } + PARAMETRIZE { species = SPECIES_KOFFING; ability = ABILITY_NEUTRALIZING_GAS; } + PARAMETRIZE { species = SPECIES_PALAFIN_ZERO; ability = ABILITY_ZERO_TO_HERO; } + PARAMETRIZE { species = SPECIES_TATSUGIRI; ability = ABILITY_COMMANDER; } + + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); } + OPPONENT(species) { Ability(ability); } + } WHEN { + TURN { MOVE(player,MOVE_ROLE_PLAY); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_ROLE_PLAY, player); + MESSAGE("But it failed!"); + } +} + +SINGLE_BATTLE_TEST("Role Play fails if user has a banned ability") +{ + u32 species, ability; + + PARAMETRIZE { species = SPECIES_ARCEUS; ability = ABILITY_MULTITYPE; } + PARAMETRIZE { species = SPECIES_DARMANITAN; ability = ABILITY_ZEN_MODE; } + PARAMETRIZE { species = SPECIES_AEGISLASH; ability = ABILITY_STANCE_CHANGE; } + PARAMETRIZE { species = SPECIES_WISHIWASHI; ability = ABILITY_SCHOOLING; } + PARAMETRIZE { species = SPECIES_KOMALA; ability = ABILITY_COMATOSE; } + PARAMETRIZE { species = SPECIES_MINIOR; ability = ABILITY_SHIELDS_DOWN; } + PARAMETRIZE { species = SPECIES_MIMIKYU; ability = ABILITY_DISGUISE; } + PARAMETRIZE { species = SPECIES_SILVALLY; ability = ABILITY_RKS_SYSTEM; } + PARAMETRIZE { species = SPECIES_ZYGARDE; ability = ABILITY_POWER_CONSTRUCT; } + PARAMETRIZE { species = SPECIES_GRENINJA_BATTLE_BOND; ability = ABILITY_BATTLE_BOND; } + PARAMETRIZE { species = SPECIES_EISCUE; ability = ABILITY_ICE_FACE; } + PARAMETRIZE { species = SPECIES_CRAMORANT; ability = ABILITY_GULP_MISSILE; } + PARAMETRIZE { species = SPECIES_PALAFIN_ZERO; ability = ABILITY_ZERO_TO_HERO; } + PARAMETRIZE { species = SPECIES_TATSUGIRI; ability = ABILITY_COMMANDER; } + + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); } + OPPONENT(species) { Ability(ability); } + } WHEN { + TURN { MOVE(opponent,MOVE_ROLE_PLAY); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_ROLE_PLAY, opponent); + MESSAGE("But it failed!"); + } +} diff --git a/test/battle/ability/zero_to_hero.c b/test/battle/ability/zero_to_hero.c index 8fb901c1c3..4a186661a6 100644 --- a/test/battle/ability/zero_to_hero.c +++ b/test/battle/ability/zero_to_hero.c @@ -96,28 +96,6 @@ SINGLE_BATTLE_TEST("Gastro Acid, Worry Seed, and Simple Beam fail if the target } } -SINGLE_BATTLE_TEST("Role Play, Skill Swap, and Entrainment fail if either Pokémon has Zero to Hero") -{ - u16 move; - - PARAMETRIZE { move = MOVE_ROLE_PLAY; } - PARAMETRIZE { move = MOVE_SKILL_SWAP; } - PARAMETRIZE { move = MOVE_ENTRAINMENT; } - - GIVEN { - ASSUME(gMovesInfo[MOVE_ROLE_PLAY].effect == EFFECT_ROLE_PLAY); - ASSUME(gMovesInfo[MOVE_SKILL_SWAP].effect == EFFECT_SKILL_SWAP); - ASSUME(gMovesInfo[MOVE_ENTRAINMENT].effect == EFFECT_ENTRAINMENT); - PLAYER(SPECIES_PALAFIN_ZERO) { Ability(ABILITY_ZERO_TO_HERO); } - OPPONENT(SPECIES_WOBBUFFET); - } WHEN { - TURN { MOVE(player, move); } - } SCENE { - NOT ANIMATION(ANIM_TYPE_MOVE, move, player); - MESSAGE("But it failed!"); - } -} - SINGLE_BATTLE_TEST("Transform doesn't apply the heroic transformation message when copying Palafin") { GIVEN { diff --git a/test/battle/hold_effect/ability_shield.c b/test/battle/hold_effect/ability_shield.c new file mode 100644 index 0000000000..c84397abfa --- /dev/null +++ b/test/battle/hold_effect/ability_shield.c @@ -0,0 +1,34 @@ +#include "global.h" +#include "test/battle.h" + +ASSUMPTIONS +{ + ASSUME(gItemsInfo[ITEM_ABILITY_SHIELD].holdEffect == HOLD_EFFECT_ABILITY_SHIELD); +} + +SINGLE_BATTLE_TEST("Ability Shield prevents Neutralizing Gas") +{ + u32 item; + + PARAMETRIZE { item = ITEM_ABILITY_SHIELD; } + PARAMETRIZE { item = ITEM_NONE; } + + GIVEN { + PLAYER(SPECIES_TORKOAL) { Ability(ABILITY_DROUGHT); Item(item); } + OPPONENT(SPECIES_KOFFING) { Ability(ABILITY_NEUTRALIZING_GAS); } + } WHEN { + TURN { } + } SCENE { + ABILITY_POPUP(opponent, ABILITY_NEUTRALIZING_GAS); + MESSAGE("Neutralizing Gas filled the area!"); + if (item == ITEM_ABILITY_SHIELD) { + ABILITY_POPUP(player, ABILITY_DROUGHT); + MESSAGE("Torkoal's Drought intensified the sun's rays!"); + } else { + NONE_OF { + ABILITY_POPUP(player, ABILITY_DROUGHT); + MESSAGE("Torkoal's Drought intensified the sun's rays!"); + } + } + } +} diff --git a/test/battle/hold_effect/eject_pack.c b/test/battle/hold_effect/eject_pack.c index 940824da5d..1a54d5a2e9 100644 --- a/test/battle/hold_effect/eject_pack.c +++ b/test/battle/hold_effect/eject_pack.c @@ -24,3 +24,20 @@ SINGLE_BATTLE_TEST("Eject Pack does not cause the new pokemon to lose hp due to NOT MESSAGE("Wynaut was hurt by its Life Orb!"); } } + +SINGLE_BATTLE_TEST("Eject Pack does not activate if there are no pokemon left to battle") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_EJECT_PACK); } + PLAYER(SPECIES_WOBBUFFET) { HP(0); } + OPPONENT(SPECIES_EKANS) { Ability(ABILITY_INTIMIDATE); } + } WHEN { + TURN { } + } SCENE { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + MESSAGE("Wobbuffet is switched out with the Eject Pack!"); + } + } +} diff --git a/tools/learnset_helpers/teachable.py b/tools/learnset_helpers/teachable.py index 03d3729ef6..92ed8562d8 100644 --- a/tools/learnset_helpers/teachable.py +++ b/tools/learnset_helpers/teachable.py @@ -5,14 +5,14 @@ import os # before all else, abort if the config is off with open("./include/config/pokemon.h", "r") as file: - learnset_config = re.findall("#define P_LEARNSET_HELPER_TEACHABLE *([^ ]*)", file.read()) + learnset_config = re.findall(r"#define P_LEARNSET_HELPER_TEACHABLE *([^ ]*)", file.read()) if len(learnset_config) != 1: quit() if learnset_config[0] != "TRUE": quit() def parse_mon_name(name): - return re.sub('(?!^)([A-Z]+)', r'_\1', name).upper() + return re.sub(r'(?!^)([A-Z]+)', r'_\1', name).upper() tm_moves = [] tutor_moves = [] @@ -28,20 +28,20 @@ for file in incs_to_check: with open(file, 'r') as f2: raw = f2.read() if 'special ChooseMonForMoveTutor' in raw: - for x in re.findall('setvar VAR_0x8005, (MOVE_.*)', raw): + for x in re.findall(r'setvar VAR_0x8005, (MOVE_.*)', raw): if not x in tutor_moves: tutor_moves.append(x) # scan TMs and HMs with open("./include/constants/tms_hms.h", 'r') as file: - for x in re.findall('F\((.*)\)', file.read()): + for x in re.findall(r'F\((.*)\)', file.read()): if not 'MOVE_' + x in tm_moves: tm_moves.append('MOVE_' + x) # look up universal moves to exclude them universal_moves = [] with open("./src/pokemon.c", "r") as file: - for x in re.findall("static const u16 sUniversalMoves\[\] =(.|\n)*?{((.|\n)*?)};", file.read())[0]: + for x in re.findall(r"static const u16 sUniversalMoves\[\] =(.|\n)*?{((.|\n)*?)};", file.read())[0]: x = x.replace("\n", "") for y in x.split(","): y = y.strip() @@ -79,7 +79,7 @@ def construct_compatibility_dict(force_custom_check): raw = file.read() if not "// DO NOT MODIFY THIS FILE!" in raw and force_custom_check == True: custom_teachable_compatibilities = {} - for entry in re.findall("static const u16 s(.*)TeachableLearnset\[\] = {\n((.|\n)*?)\n};", raw): + for entry in re.findall(r"static const u16 s(.*)TeachableLearnset\[\] = {\n((.|\n)*?)\n};", raw): monname = parse_mon_name(entry[0]) if monname == "NONE": continue @@ -128,7 +128,7 @@ compatibility_dict = construct_compatibility_dict(True) # actually prepare the file with open("./src/data/pokemon/teachable_learnsets.h", 'r') as file: out = file.read() - list_of_mons = re.findall('static const u16 s(.*)TeachableLearnset', out) + list_of_mons = re.findall(r'static const u16 s(.*)TeachableLearnset', out) for mon in list_of_mons: mon_parsed = parse_mon_name(mon) tm_learnset = [] @@ -161,7 +161,7 @@ for mon in list_of_mons: if len(tm_learnset) > 0: repl += ",\n ".join(tm_learnset) + ",\n " repl += "MOVE_UNAVAILABLE,\n};" - newout = re.sub('static const u16 s%sTeachableLearnset\[\] = {[\s\S]*?};' % mon, repl, out) + newout = re.sub(r'static const u16 s%sTeachableLearnset\[\] = {[\s\S]*?};' % mon, repl, out) if newout != out: out = newout print("Updated %s" % mon) @@ -208,7 +208,7 @@ header += "// " + longest_move_name * "*" + " //\n\n" if not "// DO NOT MODIFY THIS FILE!" in out: out = header + out else: - out = re.sub("\/\/\n\/\/ DO NOT MODIFY THIS FILE!(.|\n)*\* \/\/\n\n", header, out) + out = re.sub(r"\/\/\n\/\/ DO NOT MODIFY THIS FILE!(.|\n)*\* \/\/\n\n", header, out) with open("./src/data/pokemon/teachable_learnsets.h", 'w') as file: file.write(out)