diff --git a/.github/ISSUE_TEMPLATE/01_battle_engine_bugs.yaml b/.github/ISSUE_TEMPLATE/01_battle_engine_bugs.yaml index 88c5cabd28..0e4bcf401e 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.10.1 (Latest release) + - 1.10.2 (Latest release) - master (default, unreleased bugfixes) - upcoming (Edge) + - 1.10.1 - 1.10.0 - 1.9.4 - 1.9.3 diff --git a/.github/ISSUE_TEMPLATE/02_battle_ai_issues.yaml b/.github/ISSUE_TEMPLATE/02_battle_ai_issues.yaml index e49c54e756..49828dc6a4 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.10.1 (Latest release) + - 1.10.2 (Latest release) - master (default, unreleased bugfixes) - upcoming (Edge) + - 1.10.1 - 1.10.0 - 1.9.4 - 1.9.3 diff --git a/.github/ISSUE_TEMPLATE/04_other_errors.yaml b/.github/ISSUE_TEMPLATE/04_other_errors.yaml index 02bc0399b1..2183cf7d89 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.10.1 (Latest release) + - 1.10.2 (Latest release) - master (default, unreleased bugfixes) - upcoming (Edge) + - 1.10.1 - 1.10.0 - 1.9.4 - 1.9.3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 963e05d7bc..ed2785837a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Pokeemerald-Expansion Changelogs ## 1.10.x +- **[Version 1.10.2](docs/changelogs/1.10.x/1.10.2.md) - 🧹 Bugfix Release** - **[Version 1.10.1](docs/changelogs/1.10.x/1.10.1.md) - 🧹 Bugfix Release** - **[Version 1.10.0](docs/changelogs/1.10.x/1.10.0.md) - ✨ Feature Release** diff --git a/README.md b/README.md index 70317fac5c..5b1defe62b 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The main advantage of using vanilla pokeemerald as a base is being able to link If you use pokeemerald-expansion in your hack, please add RHH (Rom Hacking Hideout) to your credits list. Optionally, you can list the version used, so it can help players know what features to expect. You can phrase it as the following: ``` -Based off RHH's pokeemerald-expansion 1.10.1 https://github.com/rh-hideout/pokeemerald-expansion/ +Based off RHH's pokeemerald-expansion 1.10.2 https://github.com/rh-hideout/pokeemerald-expansion/ ``` #### Important: DO NOT use GitHub's "Download Zip" option. Using this option will not download the commit history required to update your expansion version or merge other feature branches. Instead, please read [this guide](https://github.com/Pawkkie/Team-Aquas-Asset-Repo/wiki/The-Basics-of-GitHub) to learn how to fork the repository and clone locally from there. diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index e08c9af20f..5d8b610290 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -21,6 +21,7 @@ - [How to add new Trainer Slides](tutorials/how_to_new_trainer_slide.md) - [Changelog](./CHANGELOG.md) - [1.10.x]() + - [Version 1.10.2](changelogs/1.10.x/1.10.2.md) - [Version 1.10.1](changelogs/1.10.x/1.10.1.md) - [Version 1.10.0](changelogs/1.10.x/1.10.0.md) - [1.9.x]() diff --git a/docs/changelogs/1.10.x/1.10.2.md b/docs/changelogs/1.10.x/1.10.2.md new file mode 100644 index 0000000000..1617fb8e5f --- /dev/null +++ b/docs/changelogs/1.10.x/1.10.2.md @@ -0,0 +1,143 @@ +# Version 1.10.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.10.2`. +``` + +## 🧬 General 🧬 +### Changed +* Add manual breaking back to "What will (mon) do?" message by @kittenchilly in [#5908](https://github.com/rh-hideout/pokeemerald-expansion/pull/5908) + +### Fixed +* Explicitly specify dependencies for teachable learnset helper by @ravepossum in [#6015](https://github.com/rh-hideout/pokeemerald-expansion/pull/6015) +* Add dependency on json files to learnset helper by @ravepossum in [#6083](https://github.com/rh-hideout/pokeemerald-expansion/pull/6083) + +## 🗺️ Overworld 🗺️ +### Fixed +* Field effect for cutting grass is missing setfieldeffectargument. Issue #5766 by @shachar700 and @kasenn for finding the source of the issue, @hedara90 for the help with github in [#5952](https://github.com/rh-hideout/pokeemerald-expansion/pull/5952) +* Fix Match Call Behavior (#5931) by @MercedesCL in [#6033](https://github.com/rh-hideout/pokeemerald-expansion/pull/6033) +* Fixes HGSS dex not compiling currently by @hedara90 in [#6051](https://github.com/rh-hideout/pokeemerald-expansion/pull/6051) +* Fixed Liquid Voice's dynamic type for normal moves by @fdeblasio in [#6092](https://github.com/rh-hideout/pokeemerald-expansion/pull/6092) +* Fix Crash if something costs 0 in shop by @DizzyEggg in [#6106](https://github.com/rh-hideout/pokeemerald-expansion/pull/6106) +* Fixed Hoenn dex off by 1 issues by @fdeblasio in [#6104](https://github.com/rh-hideout/pokeemerald-expansion/pull/6104) + +## 🐉 Pokémon 🐉 +### Changed +* Add Clodsire second frame and fixed Grookey backsprite + overworld by @kittenchilly in [#6047](https://github.com/rh-hideout/pokeemerald-expansion/pull/6047) +* Duraludon battle animation by @Cafeei in [#6086](https://github.com/rh-hideout/pokeemerald-expansion/pull/6086) + +### Fixed +* Fix Enamorus not changing forms by @Bassoonian in [#6093](https://github.com/rh-hideout/pokeemerald-expansion/pull/6093) + +## ⚔️ Battle General ⚔️ +### Changed +* Adds static assert for `DamageCalculationData` by @AlexOn1ine in [#6063](https://github.com/rh-hideout/pokeemerald-expansion/pull/6063) + +### Fixed +* Fixes Trainer Slide messages causing corruption for recoil damage by @AlexOn1ine in [#5926](https://github.com/rh-hideout/pokeemerald-expansion/pull/5926) +* Fixes broken link battles by @hedara90 and @AsparagusEduardo for finding out that the `gBitTable` removal was the source of the bug. in [#5940](https://github.com/rh-hideout/pokeemerald-expansion/pull/5940) +* fixed interaction between Innards Out and Future Sight by @wiz1989 in [#5966](https://github.com/rh-hideout/pokeemerald-expansion/pull/5966) +* Fixes various Dynamax HP conversions/calculations by @PhallenTree in [#5933](https://github.com/rh-hideout/pokeemerald-expansion/pull/5933) +* Fixes Parting Shot / Eject Pack interaction by @AlexOn1ine in [#5963](https://github.com/rh-hideout/pokeemerald-expansion/pull/5963) +* Fixes Shell Bell including heal amount from Future Sight when triggered by @AlexOn1ine in [#5962](https://github.com/rh-hideout/pokeemerald-expansion/pull/5962) +* Fixes Tera giving boost to dynamic bp moves by @AlexOn1ine in [#6008](https://github.com/rh-hideout/pokeemerald-expansion/pull/6008) +* Fixes Z-Move trigger sprite on B button exit by @AlexOn1ine in [#6009](https://github.com/rh-hideout/pokeemerald-expansion/pull/6009) +* Fixed multiple transform/form change graphical issues by @AsparagusEduardo in [#6005](https://github.com/rh-hideout/pokeemerald-expansion/pull/6005) + - Dynamax and Tera color tinting now stays during Transform/Form Change animations. + - Dynamax no longer resets Transformed mon sprites. + - Transform no longer transforms into a Gigantamax Pokémon unless the transformee has Gigantamax Factor and transforms into a base form with a Gigantamax Form. +* Fixes defrosting if frozen mon is not damaged by opponent by @AlexOn1ine in [#6016](https://github.com/rh-hideout/pokeemerald-expansion/pull/6016) +* Fix Redirection Abilities Not Drawing in Ally Moves by @ghoulslash in [#6026](https://github.com/rh-hideout/pokeemerald-expansion/pull/6026) +* fixed bug giving immunity to full-paralysis when B_MAGIC_GUARD is >= GEN_4 by @AERDU in [#6032](https://github.com/rh-hideout/pokeemerald-expansion/pull/6032) +* Fixes large battle messages being cut off instead of being prompted to advance by @PhallenTree in [#6052](https://github.com/rh-hideout/pokeemerald-expansion/pull/6052) +* Fixes Rapid Spin / Toxic Debris interaction by @AlexOn1ine in [#6023](https://github.com/rh-hideout/pokeemerald-expansion/pull/6023) +* Fixes Eject Pack triggering twice on Intimidate by @AlexOn1ine in [#6072](https://github.com/rh-hideout/pokeemerald-expansion/pull/6072) +* Trainerslide animation fix by @hedara90 in [#6040](https://github.com/rh-hideout/pokeemerald-expansion/pull/6040) + - `B_ENEMY_MON_SHADOW_STYLE` set to `GEN_LATEST` since that setting no longer interferes with trainerslides. Set it to `GEN_3` to use regular Gen 3 shadow style. +* Fixes Charge effect not boosting and tests by @AlexOn1ine in [#6102](https://github.com/rh-hideout/pokeemerald-expansion/pull/6102) +* Fix seeds softlocking the game when a battler with a Surge ability enters the field by @PhallenTree in [#6110](https://github.com/rh-hideout/pokeemerald-expansion/pull/6110) +* Fix MindBlown crash on MyBoy/No Cash by @DizzyEggg in [#6112](https://github.com/rh-hideout/pokeemerald-expansion/pull/6112) +* Fix Double Iron Bash move animation crash on MyBoy/No$ by @DizzyEggg in [#6114](https://github.com/rh-hideout/pokeemerald-expansion/pull/6114) +* Fix safari zone crash on No Cash by @DizzyEggg in [#6132](https://github.com/rh-hideout/pokeemerald-expansion/pull/6132) + +## 🤹 Moves 🤹 +### Fixed +* Fixed a bunch of move anims by @hedara90 in [#5936](https://github.com/rh-hideout/pokeemerald-expansion/pull/5936) + +## 🧶 Items 🧶 +### Changed +* Added the Gen. 4+ berries to gBerryCrush_BerryData by @LOuroboros in [#5937](https://github.com/rh-hideout/pokeemerald-expansion/pull/5937) + +### Fixed +* Reverts wrongly done partial Eject Pack fix by @AlexOn1ine in [#5928](https://github.com/rh-hideout/pokeemerald-expansion/pull/5928) + +## 🤖 Battle AI 🤖 +### Fixed +* Fix Entrainment AI scoring bug by @Pawkkie in [#6056](https://github.com/rh-hideout/pokeemerald-expansion/pull/6056) +* Removed stray semi-colon in AI code by @hedara90 in [#6134](https://github.com/rh-hideout/pokeemerald-expansion/pull/6134) + +## 🧹 Other Cleanup 🧹 +* Clear unneeded braces from 5922 by @Pawkkie in [#5927](https://github.com/rh-hideout/pokeemerald-expansion/pull/5927) +* Removed references to `HANDLE_EXPANDED_MOVE_NAME` in docs by @AsparagusEduardo in [#5955](https://github.com/rh-hideout/pokeemerald-expansion/pull/5955) +* Rename `AI_FLAG_PREFER_STRONGEST_MOVE` by @Pawkkie in [#5972](https://github.com/rh-hideout/pokeemerald-expansion/pull/5972) +* Removed `OW_AUTO_SIGNPOST` by @AlexOn1ine in [#5978](https://github.com/rh-hideout/pokeemerald-expansion/pull/5978) +* `CreateFacilityMon` error: `'personality' may be used uninitialized` by @DizzyEggg in [#5981](https://github.com/rh-hideout/pokeemerald-expansion/pull/5981) +* PlayerHandleStatusXor - change `u8` to `u32` by @DizzyEggg in [#5988](https://github.com/rh-hideout/pokeemerald-expansion/pull/5988) +* Follow up for Innards Out / Future Sight interaction by @AlexOn1ine in [#5967](https://github.com/rh-hideout/pokeemerald-expansion/pull/5967) +* Remove out of bounds `gSprites` access in move relearner by @DizzyEggg in [#5991](https://github.com/rh-hideout/pokeemerald-expansion/pull/5991) +* Use `gCurrentMove` instead of checking `0xFF` move by @AlexOn1ine in [#5999](https://github.com/rh-hideout/pokeemerald-expansion/pull/5999) +* Wrong undefs by @AlexOn1ine in [#6024](https://github.com/rh-hideout/pokeemerald-expansion/pull/6024) +* Fixed whitespace issue with trainerproc by @AsparagusEduardo in [#6042](https://github.com/rh-hideout/pokeemerald-expansion/pull/6042) +* Remove redundant line in `Cmd_setcharge` by @AlexOn1ine in [#6053](https://github.com/rh-hideout/pokeemerald-expansion/pull/6053) +* Put Identifier and smol in gitignore by @DizzyEggg in [#6105](https://github.com/rh-hideout/pokeemerald-expansion/pull/6105) +* Move flag fixes by @fdeblasio in [#6107](https://github.com/rh-hideout/pokeemerald-expansion/pull/6107) +* Remove `formToChangeInto` (Unused) by @AlexOn1ine in [#6137](https://github.com/rh-hideout/pokeemerald-expansion/pull/6137) + +## 🧪 Test Runner 🧪 +### Changed +* Insomnia test used the wrong move in Turn section by @AlexOn1ine in [#5939](https://github.com/rh-hideout/pokeemerald-expansion/pull/5939) +* Updated Makefile to allow for the creation of specific tests by @pkmnsnfrn and @mrgriffin in [#5993](https://github.com/rh-hideout/pokeemerald-expansion/pull/5993) +* Adds Liquid Ooze and Aromatic Mist test by @AlexOn1ine in [#6012](https://github.com/rh-hideout/pokeemerald-expansion/pull/6012) +* Improved Hidden Power test by @AsparagusEduardo and @hedara90, who recommended this implementation. in [#6014](https://github.com/rh-hideout/pokeemerald-expansion/pull/6014) +* Add known failing learnset cap test by @Bassoonian in [#6046](https://github.com/rh-hideout/pokeemerald-expansion/pull/6046) +* Fix Symbiosis Needing battler Argument + Tests by @ghoulslash in [#6039](https://github.com/rh-hideout/pokeemerald-expansion/pull/6039) +* Added some `TO_DO` tests by @hedara90 in [#6140](https://github.com/rh-hideout/pokeemerald-expansion/pull/6140) + +### Fixed +* Fixed Gimmick tests failing when running first by @AsparagusEduardo in [#6001](https://github.com/rh-hideout/pokeemerald-expansion/pull/6001) +* Ported Makefile fix from upcoming by @hedara90 and @mrgriffin Wrote the fix on upcoming in [#6007](https://github.com/rh-hideout/pokeemerald-expansion/pull/6007) + +## 📚 Documentation 📚 +* Fix formatting in `WSL.md` by @Cafeei in [#5942](https://github.com/rh-hideout/pokeemerald-expansion/pull/5942) +* Update scope.md by @Pawkkie in [#5948](https://github.com/rh-hideout/pokeemerald-expansion/pull/5948) +* Removed references to `HANDLE_EXPANDED_MOVE_NAME` in docs by @AsparagusEduardo in [#5955](https://github.com/rh-hideout/pokeemerald-expansion/pull/5955) +* Update scope.md (again) by @Pawkkie and @kithr1 in [#5971](https://github.com/rh-hideout/pokeemerald-expansion/pull/5971) +* Codify new expansion release schedule by @pkmnsnfrn and @Pawkkie in [#5916](https://github.com/rh-hideout/pokeemerald-expansion/pull/5916) +* Workflow for Scope Discussion by @Pawkkie in [#6022](https://github.com/rh-hideout/pokeemerald-expansion/pull/6022) +* Update `constants/pokemon.h` with nature comments by @bassforte123 in [#6133](https://github.com/rh-hideout/pokeemerald-expansion/pull/6133) + +## 📦 Branch Synchronisation 📦 +### pret +* 17 of January in [#6045](https://github.com/rh-hideout/pokeemerald-expansion/pull/6045) + * Slight contest documentation by @AsparagusEduardo in [pret#2078](https://github.com/pret/pokeemerald/pull/2078) + * Update vars.h (cleanup) by @shachar700 in [pret#2082](https://github.com/pret/pokeemerald/pull/2082) + * missing const in extern gBasicHitSplatSpriteTemplate by @DizzyEggg in [pret#2083](https://github.com/pret/pokeemerald/pull/2083) + * extern gAncientPowerRockSpriteTemplate fix by @DizzyEggg in [pret#2084](https://github.com/pret/pokeemerald/pull/2084) + * remove undef TASK_NONE from list_menu by @DizzyEggg in [pret#2085](https://github.com/pret/pokeemerald/pull/2085) + * Fix CaveTransition pals by @DizzyEggg in [pret#2095](https://github.com/pret/pokeemerald/pull/2095) + * Define field script opcode constants by @rayrobdod in [pret#2005](https://github.com/pret/pokeemerald/pull/2005) + * Document bard music by @GriffinRichards in [pret#2053](https://github.com/pret/pokeemerald/pull/2053) + * Extern gSprites and gOamMatrices with known array size by @DizzyEggg in [pret#2090](https://github.com/pret/pokeemerald/pull/2090) + * Fix conflicting types for rotating gate functions by @DizzyEggg in [pret#2087](https://github.com/pret/pokeemerald/pull/2087) + +## New Contributors +* @shachar700 made their first contribution in [#5952](https://github.com/rh-hideout/pokeemerald-expansion/pull/5952) +* @MercedesCL made their first contribution in [#6033](https://github.com/rh-hideout/pokeemerald-expansion/pull/6033) +* @bassforte123 made their first contribution in [#6133](https://github.com/rh-hideout/pokeemerald-expansion/pull/6133) + +**Full Changelog**: https://github.com/rh-hideout/pokeemerald-expansion/compare/expansion/1.10.1...expansion/1.10.2 + + + diff --git a/include/battle.h b/include/battle.h index 12af6d1ad2..aeab56897c 100644 --- a/include/battle.h +++ b/include/battle.h @@ -685,7 +685,6 @@ struct BattleStruct u8 safariCatchFactor; u8 linkBattleVsSpriteId_V; // The letter "V" u8 linkBattleVsSpriteId_S; // The letter "S" - u8 formToChangeInto; u8 chosenMovePositions[MAX_BATTLERS_COUNT]; u8 stateIdAfterSelScript[MAX_BATTLERS_COUNT]; u8 prevSelectedPartySlot; diff --git a/include/constants/expansion.h b/include/constants/expansion.h index 6b3a5ace78..dee4a3bea1 100644 --- a/include/constants/expansion.h +++ b/include/constants/expansion.h @@ -1,7 +1,7 @@ #ifndef GUARD_CONSTANTS_EXPANSION_H #define GUARD_CONSTANTS_EXPANSION_H -// Last version: 1.10.1 +// Last version: 1.10.2 #define EXPANSION_VERSION_MAJOR 1 #define EXPANSION_VERSION_MINOR 11 #define EXPANSION_VERSION_PATCH 0 diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 4883077a93..dc6d399acf 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -46,31 +46,31 @@ #define EGG_GROUPS_PER_MON 2 // Pokémon natures -#define NATURE_HARDY 0 -#define NATURE_LONELY 1 -#define NATURE_BRAVE 2 -#define NATURE_ADAMANT 3 -#define NATURE_NAUGHTY 4 -#define NATURE_BOLD 5 -#define NATURE_DOCILE 6 -#define NATURE_RELAXED 7 -#define NATURE_IMPISH 8 -#define NATURE_LAX 9 -#define NATURE_TIMID 10 -#define NATURE_HASTY 11 -#define NATURE_SERIOUS 12 -#define NATURE_JOLLY 13 -#define NATURE_NAIVE 14 -#define NATURE_MODEST 15 -#define NATURE_MILD 16 -#define NATURE_QUIET 17 -#define NATURE_BASHFUL 18 -#define NATURE_RASH 19 -#define NATURE_CALM 20 -#define NATURE_GENTLE 21 -#define NATURE_SASSY 22 -#define NATURE_CAREFUL 23 -#define NATURE_QUIRKY 24 +#define NATURE_HARDY 0 // Neutral +#define NATURE_LONELY 1 // +Atk -Def +#define NATURE_BRAVE 2 // +Atk -Speed +#define NATURE_ADAMANT 3 // +Atk -SpAtk +#define NATURE_NAUGHTY 4 // +Atk -SpDef +#define NATURE_BOLD 5 // +Def -Atk +#define NATURE_DOCILE 6 // Neutral +#define NATURE_RELAXED 7 // +Def -Speed +#define NATURE_IMPISH 8 // +Def -SpAtk +#define NATURE_LAX 9 // +Def -SpDef +#define NATURE_TIMID 10 // +Speed -Atk +#define NATURE_HASTY 11 // +Speed -Def +#define NATURE_SERIOUS 12 // Neutral +#define NATURE_JOLLY 13 // +Speed -SpAtk +#define NATURE_NAIVE 14 // +Speed - SpDef +#define NATURE_MODEST 15 // +SpAtk -Atk +#define NATURE_MILD 16 // +SpAtk -Def +#define NATURE_QUIET 17 // +SpAtk -Speed +#define NATURE_BASHFUL 18 // Neutral +#define NATURE_RASH 19 // +SpAtk -SpDef +#define NATURE_CALM 20 // +SpDef -Atk +#define NATURE_GENTLE 21 // +SpDef -Def +#define NATURE_SASSY 22 // +SpDef -Speed +#define NATURE_CAREFUL 23 // +SpDef -SpAtk +#define NATURE_QUIRKY 24 // Neutral #define NUM_NATURES 25 // Pokémon Stats diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 95e0e3ef5f..24f60ecfde 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -3805,7 +3805,7 @@ static u32 AI_CalcMoveEffectScore(u32 battlerAtk, u32 battlerDef, u32 move) case EFFECT_STEALTH_ROCK: case EFFECT_STICKY_WEB: case EFFECT_TOXIC_SPIKES: - if (AI_ShouldSetUpHazards(battlerAtk, battlerDef, aiData)); + if (AI_ShouldSetUpHazards(battlerAtk, battlerDef, aiData)) { if (gDisableStructs[battlerAtk].isFirstTurn) ADJUST_SCORE(BEST_EFFECT); diff --git a/src/battle_util.c b/src/battle_util.c index c0a320b69b..42cfffc677 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -12085,6 +12085,10 @@ void SetShellSideArmCategory(void) u32 special; u32 power = GetMovePower(MOVE_SHELL_SIDE_ARM); + // Don't run this check for Safari Battles. Because player's stats are zeroed out, this performs division by zero which previously would crash on certain emulators in Safari Zone. + if (gBattleTypeFlags & BATTLE_TYPE_SAFARI) + return; + for (battlerAtk = 0; battlerAtk < gBattlersCount; battlerAtk++) { attackerAtkStat = gBattleMons[battlerAtk].attack; diff --git a/src/pokedex.c b/src/pokedex.c index e4b5076e59..141ae3cdd2 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -4539,7 +4539,7 @@ u16 GetHoennPokedexCount(u8 caseID) u16 count = 0; u16 i; - for (i = 0; i < HOENN_DEX_COUNT; i++) + for (i = 0; i < HOENN_DEX_COUNT - 1; i++) { switch (caseID) { @@ -4582,7 +4582,7 @@ bool16 HasAllHoennMons(void) { u32 i, j; - for (i = 0; i < HOENN_DEX_COUNT; i++) + for (i = 0; i < HOENN_DEX_COUNT - 1; i++) { j = HoennToNationalOrder(i + 1); if (!(gSpeciesInfo[j].isMythical && !gSpeciesInfo[j].dexForceRequired) && !GetSetPokedexFlag(j, FLAG_GET_CAUGHT)) diff --git a/src/scrcmd.c b/src/scrcmd.c index 2ab23a1aa8..e31fb38779 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1264,7 +1264,8 @@ bool8 ScrCmd_applymovement(struct ScriptContext *ctx) Script_RequestEffects(SCREFF_V1 | SCREFF_HARDWARE); // When applying script movements to follower, it may have frozen animation that must be cleared - if (localId == OBJ_EVENT_ID_FOLLOWER && (objEvent = GetFollowerObject()) && objEvent->frozen) + if ((localId == OBJ_EVENT_ID_FOLLOWER && (objEvent = GetFollowerObject()) && objEvent->frozen) + || ((objEvent = &gObjectEvents[GetObjectEventIdByLocalId(localId)]) && IS_OW_MON_OBJ(objEvent))) { ClearObjectEventMovement(objEvent, &gSprites[objEvent->spriteId]); gSprites[objEvent->spriteId].animCmdIndex = 0; // Reset start frame of animation diff --git a/test/battle/ability/aroma_veil.c b/test/battle/ability/aroma_veil.c index dc53fa1492..4965fec217 100644 --- a/test/battle/ability/aroma_veil.c +++ b/test/battle/ability/aroma_veil.c @@ -1,15 +1,198 @@ #include "global.h" #include "test/battle.h" -TO_DO_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Taunt"); -TO_DO_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Torment"); -TO_DO_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Encore"); -TO_DO_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Disable"); -TO_DO_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Cursed Body"); -TO_DO_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Heal Block"); -TO_DO_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Infatuation"); -TO_DO_BATTLE_TEST("Aroma Veil does not protect the Pokémon's side from Imprison"); +DOUBLE_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Taunt") +{ + struct BattlePokemon *moveTarget = NULL; + PARAMETRIZE { moveTarget = playerLeft; } + PARAMETRIZE { moveTarget = playerRight; } + GIVEN { + ASSUME(gMovesInfo[MOVE_TAUNT].effect == EFFECT_TAUNT); + ASSUME(gMovesInfo[MOVE_HARDEN].category == DAMAGE_CATEGORY_STATUS); + PLAYER(SPECIES_AROMATISSE) { Ability(ABILITY_AROMA_VEIL); } + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponentLeft, MOVE_TAUNT, target: moveTarget); MOVE(moveTarget, MOVE_HARDEN); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_TAUNT, opponentLeft); + ABILITY_POPUP(playerLeft, ABILITY_AROMA_VEIL); + ANIMATION(ANIM_TYPE_MOVE, MOVE_HARDEN, moveTarget); + } +} + +DOUBLE_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Torment") +{ + struct BattlePokemon *moveTarget = NULL; + PARAMETRIZE { moveTarget = playerLeft; } + PARAMETRIZE { moveTarget = playerRight; } + GIVEN { + ASSUME(gMovesInfo[MOVE_TORMENT].effect == EFFECT_TORMENT); + ASSUME(gMovesInfo[MOVE_HARDEN].category == DAMAGE_CATEGORY_STATUS); + PLAYER(SPECIES_AROMATISSE) { Ability(ABILITY_AROMA_VEIL); } + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponentLeft, MOVE_TORMENT, target: moveTarget); MOVE(moveTarget, MOVE_HARDEN); } + TURN { MOVE(moveTarget, MOVE_HARDEN); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_TORMENT, opponentLeft); + ABILITY_POPUP(playerLeft, ABILITY_AROMA_VEIL); + ANIMATION(ANIM_TYPE_MOVE, MOVE_HARDEN, moveTarget); + ANIMATION(ANIM_TYPE_MOVE, MOVE_HARDEN, moveTarget); + } +} + +DOUBLE_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Encore") +{ + struct BattlePokemon *moveTarget = NULL; + PARAMETRIZE { moveTarget = playerLeft; } + PARAMETRIZE { moveTarget = playerRight; } + GIVEN { + ASSUME(gMovesInfo[MOVE_ENCORE].effect == EFFECT_ENCORE); + ASSUME(gMovesInfo[MOVE_HARDEN].category == DAMAGE_CATEGORY_STATUS); + PLAYER(SPECIES_AROMATISSE) { Ability(ABILITY_AROMA_VEIL); } + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponentLeft, MOVE_ENCORE, target: moveTarget); MOVE(moveTarget, MOVE_HARDEN); } + TURN { MOVE(moveTarget, MOVE_CELEBRATE); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_ENCORE, opponentLeft); + ABILITY_POPUP(playerLeft, ABILITY_AROMA_VEIL); + ANIMATION(ANIM_TYPE_MOVE, MOVE_HARDEN, moveTarget); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, moveTarget); + } +} + +DOUBLE_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Disable") +{ + struct BattlePokemon *moveTarget = NULL; + PARAMETRIZE { moveTarget = playerLeft; } + PARAMETRIZE { moveTarget = playerRight; } + GIVEN { + ASSUME(gMovesInfo[MOVE_DISABLE].effect == EFFECT_DISABLE); + ASSUME(gMovesInfo[MOVE_HARDEN].category == DAMAGE_CATEGORY_STATUS); + PLAYER(SPECIES_AROMATISSE) { Ability(ABILITY_AROMA_VEIL); } + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponentLeft, MOVE_DISABLE, target: moveTarget); MOVE(moveTarget, MOVE_HARDEN); } + TURN { MOVE(moveTarget, MOVE_HARDEN); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_DISABLE, opponentLeft); + ABILITY_POPUP(playerLeft, ABILITY_AROMA_VEIL); + ANIMATION(ANIM_TYPE_MOVE, MOVE_HARDEN, moveTarget); + ANIMATION(ANIM_TYPE_MOVE, MOVE_HARDEN, moveTarget); + } +} + +DOUBLE_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Cursed Body") +{ + GIVEN { + ASSUME(gMovesInfo[MOVE_PECK].makesContact); + PLAYER(SPECIES_AROMATISSE) { Ability(ABILITY_AROMA_VEIL); } + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_JELLICENT) { Ability(ABILITY_CURSED_BODY); } + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(playerLeft, MOVE_PECK, target: opponentLeft); MOVE(playerRight, MOVE_PECK, target: opponentLeft); } + TURN { MOVE(playerLeft, MOVE_PECK, target: opponentLeft); MOVE(playerRight, MOVE_PECK, target: opponentLeft); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_PECK, playerLeft); + NOT ABILITY_POPUP(opponentLeft, ABILITY_CURSED_BODY); + ANIMATION(ANIM_TYPE_MOVE, MOVE_PECK, playerRight); + NOT ABILITY_POPUP(opponentLeft, ABILITY_CURSED_BODY); + ANIMATION(ANIM_TYPE_MOVE, MOVE_PECK, playerLeft); + ANIMATION(ANIM_TYPE_MOVE, MOVE_PECK, playerRight); + } +} + +DOUBLE_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Heal Block") +{ + struct BattlePokemon *moveTarget = NULL; + PARAMETRIZE { moveTarget = playerLeft; } + PARAMETRIZE { moveTarget = playerRight; } + GIVEN { + ASSUME(gMovesInfo[MOVE_HEAL_BLOCK].effect == EFFECT_HEAL_BLOCK); + ASSUME(gMovesInfo[MOVE_RECOVER].effect == EFFECT_RESTORE_HP); + PLAYER(SPECIES_AROMATISSE) { Ability(ABILITY_AROMA_VEIL); HP(1); } + PLAYER(SPECIES_WOBBUFFET) { HP(1); } + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponentLeft, MOVE_HEAL_BLOCK, target: moveTarget); MOVE(moveTarget, MOVE_RECOVER); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_HEAL_BLOCK, opponentLeft); + ABILITY_POPUP(playerLeft, ABILITY_AROMA_VEIL); + ANIMATION(ANIM_TYPE_MOVE, MOVE_RECOVER, moveTarget); + } +} + +DOUBLE_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Infatuation") +{ + struct BattlePokemon *moveTarget = NULL; + PARAMETRIZE { moveTarget = playerLeft; } + PARAMETRIZE { moveTarget = playerRight; } + GIVEN { + ASSUME(gMovesInfo[MOVE_ATTRACT].effect == EFFECT_ATTRACT); + PLAYER(SPECIES_AROMATISSE) { Ability(ABILITY_AROMA_VEIL); } + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponentLeft, MOVE_ATTRACT, target: moveTarget); MOVE(moveTarget, MOVE_CELEBRATE); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_ATTRACT, opponentLeft); + ABILITY_POPUP(playerLeft, ABILITY_AROMA_VEIL); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, moveTarget); + } +} + +DOUBLE_BATTLE_TEST("Aroma Veil does not protect the Pokémon's side from Imprison") +{ + GIVEN { + ASSUME(gMovesInfo[MOVE_IMPRISON].effect == EFFECT_IMPRISON); + PLAYER(SPECIES_AROMATISSE) { Ability(ABILITY_AROMA_VEIL); } + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET) {Moves(MOVE_IMPRISON, MOVE_CELEBRATE); } + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponentLeft, MOVE_IMPRISON); MOVE(playerLeft, MOVE_CELEBRATE); MOVE(playerRight, MOVE_CELEBRATE); MOVE(opponentRight, MOVE_SPLASH); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_IMPRISON, opponentLeft); + NONE_OF { + ABILITY_POPUP(playerLeft, ABILITY_AROMA_VEIL); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, playerLeft); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, playerRight); + } + ANIMATION(ANIM_TYPE_MOVE, MOVE_SPLASH, opponentRight); + } +} + +DOUBLE_BATTLE_TEST("Aroma Veil prevents Psychic Noise's effect") +{ + struct BattlePokemon *moveTarget = NULL; + PARAMETRIZE { moveTarget = playerLeft; } + PARAMETRIZE { moveTarget = playerRight; } + GIVEN { + ASSUME(gMovesInfo[MOVE_PSYCHIC_NOISE].additionalEffects[0].moveEffect == MOVE_EFFECT_PSYCHIC_NOISE); + PLAYER(SPECIES_AROMATISSE) { Ability(ABILITY_AROMA_VEIL); } + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponentLeft, MOVE_PSYCHIC_NOISE, target: moveTarget); MOVE(moveTarget, MOVE_RECOVER); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_PSYCHIC_NOISE, opponentLeft); + ABILITY_POPUP(playerLeft, ABILITY_AROMA_VEIL); + ANIMATION(ANIM_TYPE_MOVE, MOVE_RECOVER, moveTarget); + } +} // Marked in Bulbapedia as need of research //TO_DO_BATTLE_TEST("Aroma Veil prevents G-Max Meltdown's effect"); -//TO_DO_BATTLE_TEST("Aroma Veil prevents Psychic Noise's effect"); diff --git a/test/battle/ability/chlorophyll.c b/test/battle/ability/chlorophyll.c index 493a197638..84546dbe4c 100644 --- a/test/battle/ability/chlorophyll.c +++ b/test/battle/ability/chlorophyll.c @@ -1,6 +1,50 @@ #include "global.h" #include "test/battle.h" -TO_DO_BATTLE_TEST("Chlorophyll doubles speed if it's sunny"); -TO_DO_BATTLE_TEST("Chlorophyll doesn't double speed if Cloud Nine/Air Lock is on the field"); -TO_DO_BATTLE_TEST("Chlorophyll doesn't double speed if they have an Utility Umbrella"); +SINGLE_BATTLE_TEST("Chlorophyll doubles speed if it's sunny") +{ + GIVEN { + PLAYER(SPECIES_VENUSAUR) { Ability(ABILITY_CHLOROPHYLL); Speed(100); } + OPPONENT(SPECIES_WOBBUFFET) { Speed(199); } + } WHEN { + TURN { MOVE(opponent, MOVE_CELEBRATE); MOVE(player, MOVE_SUNNY_DAY); } + TURN { MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_CELEBRATE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent); + ANIMATION(ANIM_TYPE_MOVE, MOVE_SUNNY_DAY, player); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent); + } +} + +SINGLE_BATTLE_TEST("Chlorophyll doesn't double speed if Cloud Nine/Air Lock is on the field") +{ + GIVEN { + PLAYER(SPECIES_VENUSAUR) { Ability(ABILITY_CHLOROPHYLL); Speed(100); } + OPPONENT(SPECIES_GOLDUCK) { Speed(199); Ability(ABILITY_CLOUD_NINE); } + } WHEN { + TURN { MOVE(opponent, MOVE_CELEBRATE); MOVE(player, MOVE_SUNNY_DAY); } + TURN { MOVE(opponent, MOVE_CELEBRATE); MOVE(player, MOVE_CELEBRATE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent); + ANIMATION(ANIM_TYPE_MOVE, MOVE_SUNNY_DAY, player); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player); + } +} + +SINGLE_BATTLE_TEST("Chlorophyll doesn't double speed if they have an Utility Umbrella") +{ + GIVEN { + PLAYER(SPECIES_VENUSAUR) { Ability(ABILITY_CHLOROPHYLL); Speed(100); Item(ITEM_UTILITY_UMBRELLA); } + OPPONENT(SPECIES_WOBBUFFET) { Speed(199); } + } WHEN { + TURN { MOVE(opponent, MOVE_CELEBRATE); MOVE(player, MOVE_SUNNY_DAY); } + TURN { MOVE(opponent, MOVE_CELEBRATE); MOVE(player, MOVE_CELEBRATE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent); + ANIMATION(ANIM_TYPE_MOVE, MOVE_SUNNY_DAY, player); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player); + } +} diff --git a/test/battle/ability/electric_surge.c b/test/battle/ability/electric_surge.c index 3509f1c687..3213cfc323 100644 --- a/test/battle/ability/electric_surge.c +++ b/test/battle/ability/electric_surge.c @@ -1,4 +1,15 @@ #include "global.h" #include "test/battle.h" -TO_DO_BATTLE_TEST("Electric Surge creates Electric Terrain when entering the battle"); +SINGLE_BATTLE_TEST("Electric Surge creates Electric Terrain when entering the battle") +{ + GIVEN { + PLAYER(SPECIES_TAPU_KOKO) { Ability(ABILITY_ELECTRIC_SURGE); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN {} + } SCENE { + ABILITY_POPUP(player, ABILITY_ELECTRIC_SURGE); + MESSAGE("An electric current ran across the battlefield!"); + } +} diff --git a/test/battle/ability/grassy_surge.c b/test/battle/ability/grassy_surge.c index ccdb471d9f..e8f1a0cbae 100644 --- a/test/battle/ability/grassy_surge.c +++ b/test/battle/ability/grassy_surge.c @@ -1,4 +1,15 @@ #include "global.h" #include "test/battle.h" -TO_DO_BATTLE_TEST("Grassy Surge creates Grassy Terrain when entering the battle"); +SINGLE_BATTLE_TEST("Grassy Surge creates Grassy Terrain when entering the battle") +{ + GIVEN { + PLAYER(SPECIES_TAPU_BULU) { Ability(ABILITY_GRASSY_SURGE); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN {} + } SCENE { + ABILITY_POPUP(player, ABILITY_GRASSY_SURGE); + MESSAGE("Grass grew to cover the battlefield!"); + } +} diff --git a/test/battle/ability/hydration.c b/test/battle/ability/hydration.c index 7d16ad04ae..7df2681c13 100644 --- a/test/battle/ability/hydration.c +++ b/test/battle/ability/hydration.c @@ -15,4 +15,15 @@ SINGLE_BATTLE_TEST("Hydration cures non-volatile Status conditions if it is rain } } -TO_DO_BATTLE_TEST("Hydration doesn't cure status conditions if Cloud Nine/Air Lock is on the field"); +SINGLE_BATTLE_TEST("Hydration doesn't cure status conditions if Cloud Nine/Air Lock is on the field") +{ + GIVEN { + PLAYER(SPECIES_VAPOREON) { Ability(ABILITY_HYDRATION); Status1(STATUS1_BURN); } + OPPONENT(SPECIES_GOLDUCK) { Ability(ABILITY_CLOUD_NINE); } + } WHEN { + TURN { MOVE(player, MOVE_RAIN_DANCE); } + } SCENE { + NOT ABILITY_POPUP(player, ABILITY_HYDRATION); + MESSAGE("Vaporeon was hurt by its burn!"); + } +} diff --git a/test/battle/ability/misty_surge.c b/test/battle/ability/misty_surge.c index 229d26c3ba..d09f3e8f65 100644 --- a/test/battle/ability/misty_surge.c +++ b/test/battle/ability/misty_surge.c @@ -1,4 +1,15 @@ #include "global.h" #include "test/battle.h" -TO_DO_BATTLE_TEST("Misty Surge creates Misty Terrain when entering the battle"); +SINGLE_BATTLE_TEST("Misty Surge creates Misty Terrain when entering the battle") +{ + GIVEN { + PLAYER(SPECIES_TAPU_FINI) { Ability(ABILITY_MISTY_SURGE); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN {} + } SCENE { + ABILITY_POPUP(player, ABILITY_MISTY_SURGE); + MESSAGE("Mist swirled around the battlefield!"); + } +} diff --git a/test/battle/ability/psychic_surge.c b/test/battle/ability/psychic_surge.c index d840e8d440..02b2080043 100644 --- a/test/battle/ability/psychic_surge.c +++ b/test/battle/ability/psychic_surge.c @@ -1,4 +1,15 @@ #include "global.h" #include "test/battle.h" -TO_DO_BATTLE_TEST("Psychic Surge creates Psychic Terrain when entering the battle"); +SINGLE_BATTLE_TEST("Psychic Surge creates Psychic Terrain when entering the battle") +{ + GIVEN { + PLAYER(SPECIES_TAPU_LELE) { Ability(ABILITY_PSYCHIC_SURGE); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN {} + } SCENE { + ABILITY_POPUP(player, ABILITY_PSYCHIC_SURGE); + MESSAGE("The battlefield got weird!"); + } +} diff --git a/test/battle/ability/snow_cloak.c b/test/battle/ability/snow_cloak.c index 4e129c3ff7..35f0b01bf2 100644 --- a/test/battle/ability/snow_cloak.c +++ b/test/battle/ability/snow_cloak.c @@ -28,5 +28,30 @@ SINGLE_BATTLE_TEST("Snow Cloak increases evasion during hail") } } -TO_DO_BATTLE_TEST("Snow Cloak doesn't prevent hail damage if Cloud Nine/Air Lock is on the field"); -TO_DO_BATTLE_TEST("Snow Cloak doesn't increase evasion if Cloud Nine/Air Lock is on the field"); +SINGLE_BATTLE_TEST("Snow Cloak doesn't increase evasion if Cloud Nine/Air Lock is on the field") +{ + PASSES_RANDOMLY(10, 10, RNG_ACCURACY); + GIVEN { + PLAYER(SPECIES_GLACEON) { Ability(ABILITY_SNOW_CLOAK); } + OPPONENT(SPECIES_GOLDUCK) { Ability(ABILITY_CLOUD_NINE); } + } WHEN { + TURN { MOVE(player, MOVE_HAIL); MOVE(opponent, MOVE_TACKLE); } + } SCENE { + HP_BAR(player); + } +} + +SINGLE_BATTLE_TEST("Snow Cloak increases evasion during snow") +{ + PASSES_RANDOMLY(4, 5, RNG_ACCURACY); + GIVEN { + ASSUME(gMovesInfo[MOVE_POUND].accuracy == 100); + PLAYER(SPECIES_GLACEON) { Ability(ABILITY_SNOW_CLOAK); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_SNOWSCAPE); } + TURN { MOVE(opponent, MOVE_POUND); } + } SCENE { + HP_BAR(player); + } +} diff --git a/test/battle/ability/stance_change.c b/test/battle/ability/stance_change.c index d6e08909f9..c2325ec768 100644 --- a/test/battle/ability/stance_change.c +++ b/test/battle/ability/stance_change.c @@ -79,5 +79,3 @@ SINGLE_BATTLE_TEST("Stance Change doesn't change Aegislash to Shield if King's S EXPECT_EQ(player->species, SPECIES_AEGISLASH_BLADE); } } - -TO_DO_BATTLE_TEST("Stance Change doesn't change Aegislash to Shield if King's Shield is called by a different move - Me First"); diff --git a/test/battle/gimmick/dynamax.c b/test/battle/gimmick/dynamax.c index 19cecdf8cb..35b801a3ff 100644 --- a/test/battle/gimmick/dynamax.c +++ b/test/battle/gimmick/dynamax.c @@ -1202,7 +1202,22 @@ DOUBLE_BATTLE_TEST("(DYNAMAX) G-Max Terror traps both opponents") } } -TO_DO_BATTLE_TEST("(DYNAMAX) Baton Pass passes G-Max Terror's escape prevention effect"); +SINGLE_BATTLE_TEST("(DYNAMAX) Baton Pass passes G-Max Terror's escape prevention effect") +{ + GIVEN { + ASSUME(gMovesInfo[MOVE_G_MAX_TERROR].argument == MAX_EFFECT_MEAN_LOOK); + PLAYER(SPECIES_GENGAR) { GigantamaxFactor(TRUE); } + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(player, MOVE_LICK, gimmick: GIMMICK_DYNAMAX); MOVE(opponent, MOVE_BATON_PASS); SEND_OUT(opponent, 1); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_G_MAX_TERROR, player); + ANIMATION(ANIM_TYPE_MOVE, MOVE_BATON_PASS, opponent); + } THEN { + EXPECT(opponent->status2 & STATUS2_ESCAPE_PREVENTION); + } +} DOUBLE_BATTLE_TEST("(DYNAMAX) G-Max Meltdown torments both opponents for 3 turns") { @@ -1584,4 +1599,4 @@ SINGLE_BATTLE_TEST("(DYNAMAX) Max Moves don't bypass absorbing abilities") } ABILITY_POPUP(opponent, ability); } -} \ No newline at end of file +}