From 45cee8124d09eccc235679ec7643f12a403fe58b Mon Sep 17 00:00:00 2001 From: Wesmaster <34153881+Wesmaster@users.noreply.github.com> Date: Sat, 17 Feb 2024 20:26:45 +0100 Subject: [PATCH 1/6] Fixed LastUsedBall not being saved and DisplayBall not being shown (#4209) In #4168 b7d7709 a memset was added but this causes the issue #4200. The sizeof was done on the variable instead of the struct. This caused other variables in EWRAM to loose their value. I have no idea if this fix breaks what was intented to do in #4168. Also fixed the issue reported in my comment. When you run out of balls gLastThrownBall has a value, but you enter the if statement because you have no more balls. There the next in line ball is set to display but if there are non there is nothing to display. Afterwards when you get a new ball, you do not enter the if statement to update the gBallToDisplay because the ball is in the bag and gLastThrownBall is still set to not 0. Then it's checked if the bag has gBallToDisplay which does not point to a ball and therefor nothing is shown. Now we only update gBallToDisplay if there is actually a ball to display. --- src/battle_interface.c | 7 ++++++- src/battle_main.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/battle_interface.c b/src/battle_interface.c index d3751f702f..c0f68cf811 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -3468,9 +3468,14 @@ void TryAddLastUsedBallItemSprites(void) || (gLastThrownBall != 0 && !CheckBagHasItem(gLastThrownBall, 1))) { // we're out of the last used ball, so just set it to the first ball in the bag + u16 firstBall; + // we have to compact the bag first bc it is typically only compacted when you open it CompactItemsInBagPocket(&gBagPockets[BALLS_POCKET]); - gBallToDisplay = gBagPockets[BALLS_POCKET].itemSlots[0].itemId; + + firstBall = gBagPockets[BALLS_POCKET].itemSlots[0].itemId; + if (firstBall > ITEM_NONE) + gBallToDisplay = firstBall; } if (!CanThrowLastUsedBall()) diff --git a/src/battle_main.c b/src/battle_main.c index 99ab2a87a1..19ee70f162 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -4914,7 +4914,7 @@ static void TurnValuesCleanUp(bool8 var0) else { memset(&gProtectStructs[i], 0, sizeof(struct ProtectStruct)); - memset(&gQueuedStatBoosts[i], 0, sizeof(gQueuedStatBoosts)); + memset(&gQueuedStatBoosts[i], 0, sizeof(struct QueuedStatBoost)); if (gDisableStructs[i].isFirstTurn) gDisableStructs[i].isFirstTurn--; From 3d2e0d2065d80015ee79131b0020b7385fb6760b Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sun, 18 Feb 2024 06:21:56 -0300 Subject: [PATCH 2/6] Fixed Ursaluna's cry using P_GEN_9_CROSS_EVOS (#4210) --- include/constants/cries.h | 4 ++-- sound/cry_tables.inc | 8 ++++---- sound/direct_sound_data.inc | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/constants/cries.h b/include/constants/cries.h index ddeee56d42..4b9936fc3a 100644 --- a/include/constants/cries.h +++ b/include/constants/cries.h @@ -626,9 +626,9 @@ enum { #if P_FAMILY_TEDDIURSA CRY_TEDDIURSA, CRY_URSARING, -#if P_GEN_9_CROSS_EVOS +#if P_GEN_8_CROSS_EVOS CRY_URSALUNA, -#endif //P_GEN_9_CROSS_EVOS +#endif //P_GEN_8_CROSS_EVOS #endif //P_FAMILY_TEDDIURSA #if P_FAMILY_SLUGMA CRY_SLUGMA, diff --git a/sound/cry_tables.inc b/sound/cry_tables.inc index 6d0c9b97dc..7e4b890161 100644 --- a/sound/cry_tables.inc +++ b/sound/cry_tables.inc @@ -623,9 +623,9 @@ gCryTable:: .if P_FAMILY_TEDDIURSA == TRUE cry Cry_Teddiursa cry Cry_Ursaring -.if P_GEN_9_CROSS_EVOS == TRUE +.if P_GEN_8_CROSS_EVOS == TRUE cry Cry_Ursaluna -.endif @ P_GEN_9_CROSS_EVOS +.endif @ P_GEN_8_CROSS_EVOS .endif @ P_FAMILY_TEDDIURSA .if P_FAMILY_SLUGMA == TRUE cry Cry_Slugma @@ -3027,9 +3027,9 @@ gCryTable_Reverse:: .if P_FAMILY_TEDDIURSA == TRUE cry_reverse Cry_Teddiursa cry_reverse Cry_Ursaring -.if P_GEN_9_CROSS_EVOS == TRUE +.if P_GEN_8_CROSS_EVOS == TRUE cry_reverse Cry_Ursaluna -.endif @ P_GEN_9_CROSS_EVOS +.endif @ P_GEN_8_CROSS_EVOS .endif @ P_FAMILY_TEDDIURSA .if P_FAMILY_SLUGMA == TRUE cry_reverse Cry_Slugma diff --git a/sound/direct_sound_data.inc b/sound/direct_sound_data.inc index 8a915b6de1..1fddde82d6 100644 --- a/sound/direct_sound_data.inc +++ b/sound/direct_sound_data.inc @@ -1844,11 +1844,11 @@ Cry_Teddiursa:: Cry_Ursaring:: .incbin "sound/direct_sound_samples/cries/ursaring.bin" -.if P_GEN_9_CROSS_EVOS == TRUE +.if P_GEN_8_CROSS_EVOS == TRUE .align 2 Cry_Ursaluna:: .incbin "sound/direct_sound_samples/cries/ursaluna.bin" -.endif @ P_GEN_9_CROSS_EVOS +.endif @ P_GEN_8_CROSS_EVOS .endif @ P_FAMILY_TEDDIURSA .if P_FAMILY_SLUGMA == TRUE From 585e06e756b2cc73ae12cf577f81f248885f80cd Mon Sep 17 00:00:00 2001 From: kittenchilly Date: Sun, 18 Feb 2024 14:30:52 -0600 Subject: [PATCH 3/6] Move Tatsugiri and Squawkabilly base species icons to graphic root folders (#4212) --- .../squawkabilly/{green_plumage => }/icon.png | Bin .../squawkabilly/{green_plumage => }/normal.pal | 0 .../squawkabilly/{green_plumage => }/shiny.pal | 0 graphics/pokemon/tatsugiri/{curly => }/back.png | Bin .../pokemon/tatsugiri/{curly => }/front.png | Bin graphics/pokemon/tatsugiri/{curly => }/icon.png | Bin .../pokemon/tatsugiri/{curly => }/normal.pal | 0 .../pokemon/tatsugiri/{curly => }/shiny.pal | 0 src/data/graphics/pokemon.h | 16 ++++++++-------- 9 files changed, 8 insertions(+), 8 deletions(-) rename graphics/pokemon/squawkabilly/{green_plumage => }/icon.png (100%) mode change 100755 => 100644 rename graphics/pokemon/squawkabilly/{green_plumage => }/normal.pal (100%) rename graphics/pokemon/squawkabilly/{green_plumage => }/shiny.pal (100%) rename graphics/pokemon/tatsugiri/{curly => }/back.png (100%) rename graphics/pokemon/tatsugiri/{curly => }/front.png (100%) rename graphics/pokemon/tatsugiri/{curly => }/icon.png (100%) mode change 100755 => 100644 rename graphics/pokemon/tatsugiri/{curly => }/normal.pal (100%) rename graphics/pokemon/tatsugiri/{curly => }/shiny.pal (100%) diff --git a/graphics/pokemon/squawkabilly/green_plumage/icon.png b/graphics/pokemon/squawkabilly/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/squawkabilly/green_plumage/icon.png rename to graphics/pokemon/squawkabilly/icon.png diff --git a/graphics/pokemon/squawkabilly/green_plumage/normal.pal b/graphics/pokemon/squawkabilly/normal.pal similarity index 100% rename from graphics/pokemon/squawkabilly/green_plumage/normal.pal rename to graphics/pokemon/squawkabilly/normal.pal diff --git a/graphics/pokemon/squawkabilly/green_plumage/shiny.pal b/graphics/pokemon/squawkabilly/shiny.pal similarity index 100% rename from graphics/pokemon/squawkabilly/green_plumage/shiny.pal rename to graphics/pokemon/squawkabilly/shiny.pal diff --git a/graphics/pokemon/tatsugiri/curly/back.png b/graphics/pokemon/tatsugiri/back.png similarity index 100% rename from graphics/pokemon/tatsugiri/curly/back.png rename to graphics/pokemon/tatsugiri/back.png diff --git a/graphics/pokemon/tatsugiri/curly/front.png b/graphics/pokemon/tatsugiri/front.png similarity index 100% rename from graphics/pokemon/tatsugiri/curly/front.png rename to graphics/pokemon/tatsugiri/front.png diff --git a/graphics/pokemon/tatsugiri/curly/icon.png b/graphics/pokemon/tatsugiri/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/tatsugiri/curly/icon.png rename to graphics/pokemon/tatsugiri/icon.png diff --git a/graphics/pokemon/tatsugiri/curly/normal.pal b/graphics/pokemon/tatsugiri/normal.pal similarity index 100% rename from graphics/pokemon/tatsugiri/curly/normal.pal rename to graphics/pokemon/tatsugiri/normal.pal diff --git a/graphics/pokemon/tatsugiri/curly/shiny.pal b/graphics/pokemon/tatsugiri/shiny.pal similarity index 100% rename from graphics/pokemon/tatsugiri/curly/shiny.pal rename to graphics/pokemon/tatsugiri/shiny.pal diff --git a/src/data/graphics/pokemon.h b/src/data/graphics/pokemon.h index ef66ca981c..a2f707aea9 100644 --- a/src/data/graphics/pokemon.h +++ b/src/data/graphics/pokemon.h @@ -10157,9 +10157,9 @@ const u8 gMonFootprint_QuestionMark[] = INCBIN_U8("graphics/pokemon/question_mar const u32 gMonBackPic_Squawkabilly[] = INCBIN_U32("graphics/pokemon/squawkabilly/back.4bpp.lz"); // const u8 gMonFootprint_Squawkabilly[] = INCBIN_U8("graphics/pokemon/squawkabilly/footprint.1bpp"); - const u32 gMonPalette_SquawkabillyGreenPlumage[] = INCBIN_U32("graphics/pokemon/squawkabilly/green_plumage/normal.gbapal.lz"); - const u32 gMonShinyPalette_SquawkabillyGreenPlumage[] = INCBIN_U32("graphics/pokemon/squawkabilly/green_plumage/shiny.gbapal.lz"); - const u8 gMonIcon_SquawkabillyGreenPlumage[] = INCBIN_U8("graphics/pokemon/squawkabilly/green_plumage/icon.4bpp"); + const u32 gMonPalette_SquawkabillyGreenPlumage[] = INCBIN_U32("graphics/pokemon/squawkabilly/normal.gbapal.lz"); + const u32 gMonShinyPalette_SquawkabillyGreenPlumage[] = INCBIN_U32("graphics/pokemon/squawkabilly/shiny.gbapal.lz"); + const u8 gMonIcon_SquawkabillyGreenPlumage[] = INCBIN_U8("graphics/pokemon/squawkabilly/icon.4bpp"); const u32 gMonPalette_SquawkabillyBluePlumage[] = INCBIN_U32("graphics/pokemon/squawkabilly/blue_plumage/normal.gbapal.lz"); const u32 gMonShinyPalette_SquawkabillyBluePlumage[] = INCBIN_U32("graphics/pokemon/squawkabilly/blue_plumage/shiny.gbapal.lz"); @@ -10553,11 +10553,11 @@ const u8 gMonFootprint_QuestionMark[] = INCBIN_U8("graphics/pokemon/question_mar #endif //P_FAMILY_DONDOZO #if P_FAMILY_TATSUGIRI - const u32 gMonFrontPic_TatsugiriCurly[] = INCBIN_U32("graphics/pokemon/tatsugiri/curly/front.4bpp.lz"); - const u32 gMonPalette_TatsugiriCurly[] = INCBIN_U32("graphics/pokemon/tatsugiri/curly/normal.gbapal.lz"); - const u32 gMonBackPic_TatsugiriCurly[] = INCBIN_U32("graphics/pokemon/tatsugiri/curly/back.4bpp.lz"); - const u32 gMonShinyPalette_TatsugiriCurly[] = INCBIN_U32("graphics/pokemon/tatsugiri/curly/shiny.gbapal.lz"); - const u8 gMonIcon_TatsugiriCurly[] = INCBIN_U8("graphics/pokemon/tatsugiri/curly/icon.4bpp"); + const u32 gMonFrontPic_TatsugiriCurly[] = INCBIN_U32("graphics/pokemon/tatsugiri/front.4bpp.lz"); + const u32 gMonPalette_TatsugiriCurly[] = INCBIN_U32("graphics/pokemon/tatsugiri/normal.gbapal.lz"); + const u32 gMonBackPic_TatsugiriCurly[] = INCBIN_U32("graphics/pokemon/tatsugiri/back.4bpp.lz"); + const u32 gMonShinyPalette_TatsugiriCurly[] = INCBIN_U32("graphics/pokemon/tatsugiri/shiny.gbapal.lz"); + const u8 gMonIcon_TatsugiriCurly[] = INCBIN_U8("graphics/pokemon/tatsugiri/icon.4bpp"); // const u8 gMonFootprint_Tatsugiri[] = INCBIN_U8("graphics/pokemon/tatsugiri/footprint.1bpp"); const u32 gMonFrontPic_TatsugiriDroopy[] = INCBIN_U32("graphics/pokemon/tatsugiri/droopy/front.4bpp.lz"); From bb01ab6ff13f55d09f355b3259a11fa804c18814 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sun, 18 Feb 2024 21:53:12 -0300 Subject: [PATCH 4/6] Version 1.7.4 (#4203) * Version 1.7.4 --- .../ISSUE_TEMPLATE/01_battle_engine_bugs.yaml | 3 +- .../ISSUE_TEMPLATE/02_battle_ai_issues.yaml | 4 +- .github/ISSUE_TEMPLATE/04_other_errors.yaml | 3 +- CHANGELOG.md | 1 + README.md | 2 +- docs/changelogs/1.7.4.md | 68 +++++++++++++++++++ include/constants/expansion.h | 4 +- 7 files changed, 79 insertions(+), 6 deletions(-) create mode 100644 docs/changelogs/1.7.4.md diff --git a/.github/ISSUE_TEMPLATE/01_battle_engine_bugs.yaml b/.github/ISSUE_TEMPLATE/01_battle_engine_bugs.yaml index 6493f4c11b..33af7d9649 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.7.3 (Latest release) + - 1.7.4 (Latest release) - master (default when pulling, unreleased bugfixes) - upcoming (Edge) + - 1.7.3 - 1.7.2 - 1.7.1 - 1.7.0 diff --git a/.github/ISSUE_TEMPLATE/02_battle_ai_issues.yaml b/.github/ISSUE_TEMPLATE/02_battle_ai_issues.yaml index 3fa2d2dfd5..cabfda4990 100644 --- a/.github/ISSUE_TEMPLATE/02_battle_ai_issues.yaml +++ b/.github/ISSUE_TEMPLATE/02_battle_ai_issues.yaml @@ -23,9 +23,11 @@ body: label: Version description: What version of pokeemerald-expansion are you using as a base? options: - - 1.7.2 (Latest release) + - 1.7.4 (Latest release) - master (default when pulling, unreleased bugfixes) - upcoming (Edge) + - 1.7.3 + - 1.7.2 - 1.7.1 - 1.7.0 - 1.6.2 diff --git a/.github/ISSUE_TEMPLATE/04_other_errors.yaml b/.github/ISSUE_TEMPLATE/04_other_errors.yaml index e39eac4f56..33c85c15fb 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.7.3 (Latest release) + - 1.7.4 (Latest release) - master (default when pulling, unreleased bugfixes) - upcoming (Edge) + - 1.7.3 - 1.7.2 - 1.7.1 - 1.7.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index d4805a5d40..f8e0c66e20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Pokeemerald-Expansion Changelogs ## Version 1.7.x +### [Version 1.7.4](docs/changelogs/1.7.4.md) - Bugfix Release ### [Version 1.7.3](docs/changelogs/1.7.3.md) - Bugfix Release ### [Version 1.7.2](docs/changelogs/1.7.2.md) - Bugfix Release ### [Version 1.7.1](docs/changelogs/1.7.1.md) - Bugfix Release diff --git a/README.md b/README.md index d4fe25ea99..7d8d18f939 100644 --- a/README.md +++ b/README.md @@ -166,7 +166,7 @@ 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.7.3`. +- Once you have your remote set up, run the command `git pull RHH expansion/1.7.4`. ### 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/docs/changelogs/1.7.4.md b/docs/changelogs/1.7.4.md new file mode 100644 index 0000000000..50556bec77 --- /dev/null +++ b/docs/changelogs/1.7.4.md @@ -0,0 +1,68 @@ +# Version 1.7.4 + +```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.Y.Z`. +``` + +## 🧬 General 🧬 +### Fixed +* HGSS Dex fixes: + * Fixed inconsistent list tileset between capped and decapped modes by @ravepossum in https://github.com/rh-hideout/pokeemerald-expansion/pull/4126 + * Fixed screen select bar popping in too early for area screen by @ravepossum in https://github.com/rh-hideout/pokeemerald-expansion/pull/4094 +* Fixed Lotad/Seedot house using species weight instead of height by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4195 + +## 🐉 Pokémon 🐉 +### Fixed +* Fixed Ogerpon shiny palettes by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4165 +* Fixed Basculegion back sprite offset by @MelonSpeedruns in https://github.com/rh-hideout/pokeemerald-expansion/pull/4198 +* Fixed Greninja form animations by @MelonSpeedruns in https://github.com/rh-hideout/pokeemerald-expansion/pull/4198 +* Fixed compile error when `P_GEN_8_CROSS_EVOS` is enabled but not `P_GEN_9_CROSS_EVOS` due to Ursaluna's cry being labled as Gen 9 by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4210 +* Fixed Curly Tatsugiri and Green Plumage Squawkabilly icons not showing up properly in later versions of Porymap by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4212 + +## ⚔️ Battle General ⚔️ ## +### Fixed +* Fixed disobedience not resetting multihit moves by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4133 +* Fixed switch in interactions with hold effects abilities by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4091 + * Download activating on an empty field. + * Intimidate activating on an empty field and not activating upon new opponent switching in. + * Primal Reversion not happening immediately upon switching in from U-turn. + * Held items not being triggered when switching in fron U-turn and Intimidate being triggered beforehand. +* Fixed LastUsedBall issues not being saved and DisplayBall not being shown by @Wesmaster in https://github.com/rh-hideout/pokeemerald-expansion/pull/4209 + +## 🤹 Moves 🤹 +### Fixed +* Fixed move animations crashing on some emulators because of division by zero by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4121 + * Flip Turn, Anchor Shot, Snipe Shot and Incinerate were affected by this. +* Fixed Eerie Spell consuming double PP and showing its message twice by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4127 +* Fixed Fairy Lock animation by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4111 + +## 🎭 Abilities 🎭 +### Added +* Added Gen 5+ config for Soundproof no longer preventing Uproar status by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4174 +### Fixed +* Fixed Mycelium Might speed calculation by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4146 +* Fixed Stench triggering on non-damaging attacks by @HungryPickle in https://github.com/rh-hideout/pokeemerald-expansion/pull/4159 +* Fixed Disguise not ending the battle in the correct form by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4167 +* Fixed Opportunist accumulating stat changes by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4168 + +## 🧶 Items 🧶 +### Fixed +* Kee Berry fixes by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4149 + * Fixed triggering if the holder does a physical attack instead of receiving it. + * Fixed it boosting the target's defense if the attacker holds a Kee Berry, while still displaying the boost animation for the holder. +* Fixed poison-healing items not reseting Toxic Counter by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4135 + +## 🧹 Other Cleanup 🧹 +### Changed +* Clean up space/tabs difference by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4163 +* Deleted a space by @cmy2008 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4194 + +## New Contributors +* @cmy2008 made their first contribution in https://github.com/rh-hideout/pokeemerald-expansion/pull/4194 +* @MelonSpeedruns made their first contribution in https://github.com/rh-hideout/pokeemerald-expansion/pull/4198 + +**Full Changelog**: https://github.com/rh-hideout/pokeemerald-expansion/compare/expansion/1.7.3...expansion/1.7.4 + + diff --git a/include/constants/expansion.h b/include/constants/expansion.h index 7e6cf52b26..1f983eb65c 100644 --- a/include/constants/expansion.h +++ b/include/constants/expansion.h @@ -3,10 +3,10 @@ #define EXPANSION_VERSION_MAJOR 1 #define EXPANSION_VERSION_MINOR 7 -#define EXPANSION_VERSION_PATCH 3 +#define EXPANSION_VERSION_PATCH 4 // FALSE if this this version of Expansion is not a tagged commit, i.e. // it contains unreleased changes. -#define EXPANSION_TAGGED_RELEASE FALSE +#define EXPANSION_TAGGED_RELEASE TRUE #endif From 5be97faf9da0cf512e347a9e55c57c5f52605ced Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 18 Feb 2024 22:09:08 -0300 Subject: [PATCH 5/6] Non-tagged --- include/constants/expansion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/constants/expansion.h b/include/constants/expansion.h index 1f983eb65c..63f262aeee 100644 --- a/include/constants/expansion.h +++ b/include/constants/expansion.h @@ -7,6 +7,6 @@ // FALSE if this this version of Expansion is not a tagged commit, i.e. // it contains unreleased changes. -#define EXPANSION_TAGGED_RELEASE TRUE +#define EXPANSION_TAGGED_RELEASE FALSE #endif From 57e0d7b20bee5f5a8ae2e1d610e4ec664260efb9 Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Mon, 19 Feb 2024 13:36:21 +0100 Subject: [PATCH 6/6] Partial fix for Teeter Dance and Ability Dancer interaction (#4129) * Parial fix for Teeter Dance and Ability Dancer interaction * Removes rest of teeter dance checks and make it work with effect_confuse * Update test/battle/ability/dancer.c Co-authored-by: Bassoonian * Update test/battle/ability/dancer.c Co-authored-by: ultima-soul <33333039+ultima-soul@users.noreply.github.com> --------- Co-authored-by: Bassoonian Co-authored-by: ultima-soul <33333039+ultima-soul@users.noreply.github.com> --- data/battle_scripts_1.s | 58 --- include/battle_ai_util.h | 2 +- include/constants/battle_move_effects.h | 447 ++++++++++++------------ src/battle_ai_main.c | 19 +- src/battle_ai_util.c | 26 +- src/battle_tv.c | 1 - src/data/battle_moves.h | 2 +- test/battle/ability/dancer.c | 35 ++ test/battle/move_effect/confuse.c | 58 +++ 9 files changed, 333 insertions(+), 315 deletions(-) create mode 100644 test/battle/ability/dancer.c create mode 100644 test/battle/move_effect/confuse.c diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 24dfec1ff8..ac9e88bea8 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -216,7 +216,6 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectHit @ EFFECT_LOW_KICK .4byte BattleScript_EffectSecretPower @ EFFECT_SECRET_POWER .4byte BattleScript_EffectHit @ EFFECT_RECOIL_33 - .4byte BattleScript_EffectTeeterDance @ EFFECT_TEETER_DANCE .4byte BattleScript_EffectHitEscape @ EFFECT_HIT_ESCAPE .4byte BattleScript_EffectMudSport @ EFFECT_MUD_SPORT .4byte BattleScript_EffectPoisonFang @ EFFECT_POISON_FANG @@ -6129,63 +6128,6 @@ BattleScript_EffectRecoilHP25: incrementgamestat GAME_STAT_USED_STRUGGLE goto BattleScript_EffectHit -BattleScript_EffectTeeterDance:: - attackcanceler - attackstring - ppreduce - setbyte gBattlerTarget, 0 -BattleScript_TeeterDanceLoop:: - movevaluescleanup - setmoveeffect MOVE_EFFECT_CONFUSION - jumpifbyteequal gBattlerAttacker, gBattlerTarget, BattleScript_TeeterDanceLoopIncrement - jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_TeeterDanceOwnTempoPrevents - jumpifsubstituteblocks BattleScript_TeeterDanceSubstitutePrevents - jumpifstatus2 BS_TARGET, STATUS2_CONFUSION, BattleScript_TeeterDanceAlreadyConfused - jumpifhasnohp BS_TARGET, BattleScript_TeeterDanceLoopIncrement - accuracycheck BattleScript_TeeterDanceMissed, ACC_CURR_MOVE - jumpifsafeguard BattleScript_TeeterDanceSafeguardProtected - attackanimation - waitanimation - seteffectprimary - resultmessage - waitmessage B_WAIT_TIME_LONG -BattleScript_TeeterDanceDoMoveEndIncrement:: - moveendto MOVEEND_NEXT_TARGET -BattleScript_TeeterDanceLoopIncrement:: - addbyte gBattlerTarget, 1 - jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_TeeterDanceLoop - end - -BattleScript_TeeterDanceOwnTempoPrevents:: - pause B_WAIT_TIME_SHORT - printstring STRINGID_PKMNPREVENTSCONFUSIONWITH - waitmessage B_WAIT_TIME_LONG - goto BattleScript_TeeterDanceDoMoveEndIncrement - -BattleScript_TeeterDanceSafeguardProtected:: - pause B_WAIT_TIME_SHORT - printstring STRINGID_PKMNUSEDSAFEGUARD - waitmessage B_WAIT_TIME_LONG - goto BattleScript_TeeterDanceDoMoveEndIncrement - -BattleScript_TeeterDanceSubstitutePrevents:: - pause B_WAIT_TIME_SHORT - printstring STRINGID_BUTITFAILED - waitmessage B_WAIT_TIME_LONG - goto BattleScript_TeeterDanceDoMoveEndIncrement - -BattleScript_TeeterDanceAlreadyConfused:: - setalreadystatusedmoveattempt BS_ATTACKER - pause B_WAIT_TIME_SHORT - printstring STRINGID_PKMNALREADYCONFUSED - waitmessage B_WAIT_TIME_LONG - goto BattleScript_TeeterDanceDoMoveEndIncrement - -BattleScript_TeeterDanceMissed:: - resultmessage - waitmessage B_WAIT_TIME_LONG - goto BattleScript_TeeterDanceDoMoveEndIncrement - BattleScript_EffectMudSport:: BattleScript_EffectWaterSport:: attackcanceler diff --git a/include/battle_ai_util.h b/include/battle_ai_util.h index 9835265109..69b09eaaf9 100644 --- a/include/battle_ai_util.h +++ b/include/battle_ai_util.h @@ -139,7 +139,7 @@ bool32 HasSnatchAffectedMove(u32 battler); // status checks bool32 AI_CanBeBurned(u32 battler, u32 ability); bool32 AI_CanGetFrostbite(u32 battler, u32 ability); -bool32 AI_CanBeConfused(u32 battler, u32 ability); +bool32 AI_CanBeConfused(u32 battlerAtk, u32 battlerDef, u32 move, u32 ability); bool32 AI_CanSleep(u32 battler, u32 ability); bool32 IsBattlerIncapacitated(u32 battler, u32 ability); bool32 AI_CanPutToSleep(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 move, u32 partnerMove); diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index 056f0ce4f7..4edbcc1ed0 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -195,232 +195,231 @@ #define EFFECT_LOW_KICK 191 #define EFFECT_SECRET_POWER 192 #define EFFECT_RECOIL_33 193 -#define EFFECT_TEETER_DANCE 194 -#define EFFECT_HIT_ESCAPE 195 -#define EFFECT_MUD_SPORT 196 -#define EFFECT_POISON_FANG 197 -#define EFFECT_WEATHER_BALL 198 -#define EFFECT_OVERHEAT 199 -#define EFFECT_TICKLE 200 -#define EFFECT_COSMIC_POWER 201 -#define EFFECT_SKY_UPPERCUT 202 -#define EFFECT_BULK_UP 203 -#define EFFECT_PLACEHOLDER 204 -#define EFFECT_WATER_SPORT 205 -#define EFFECT_CALM_MIND 206 -#define EFFECT_DRAGON_DANCE 207 -#define EFFECT_CAMOUFLAGE 208 +#define EFFECT_HIT_ESCAPE 194 +#define EFFECT_MUD_SPORT 195 +#define EFFECT_POISON_FANG 196 +#define EFFECT_WEATHER_BALL 197 +#define EFFECT_OVERHEAT 198 +#define EFFECT_TICKLE 199 +#define EFFECT_COSMIC_POWER 200 +#define EFFECT_SKY_UPPERCUT 201 +#define EFFECT_BULK_UP 202 +#define EFFECT_PLACEHOLDER 203 +#define EFFECT_WATER_SPORT 204 +#define EFFECT_CALM_MIND 205 +#define EFFECT_DRAGON_DANCE 206 +#define EFFECT_CAMOUFLAGE 207 // New move effects -#define EFFECT_PLEDGE 209 -#define EFFECT_FLING 210 -#define EFFECT_NATURAL_GIFT 211 -#define EFFECT_WAKE_UP_SLAP 212 -#define EFFECT_WRING_OUT 213 -#define EFFECT_HEX 214 -#define EFFECT_ASSURANCE 215 -#define EFFECT_TRUMP_CARD 216 -#define EFFECT_ACROBATICS 217 -#define EFFECT_HEAT_CRASH 218 -#define EFFECT_PUNISHMENT 219 -#define EFFECT_STORED_POWER 220 -#define EFFECT_ELECTRO_BALL 221 -#define EFFECT_GYRO_BALL 222 -#define EFFECT_ECHOED_VOICE 223 -#define EFFECT_PAYBACK 224 -#define EFFECT_ROUND 225 -#define EFFECT_BRINE 226 -#define EFFECT_VENOSHOCK 227 -#define EFFECT_RETALIATE 228 -#define EFFECT_BULLDOZE 229 -#define EFFECT_FOUL_PLAY 230 -#define EFFECT_PSYSHOCK 231 -#define EFFECT_ROOST 232 -#define EFFECT_GRAVITY 233 -#define EFFECT_MIRACLE_EYE 234 -#define EFFECT_TAILWIND 235 -#define EFFECT_EMBARGO 236 -#define EFFECT_AQUA_RING 237 -#define EFFECT_TRICK_ROOM 238 -#define EFFECT_WONDER_ROOM 239 -#define EFFECT_MAGIC_ROOM 240 -#define EFFECT_MAGNET_RISE 241 -#define EFFECT_TOXIC_SPIKES 242 -#define EFFECT_GASTRO_ACID 243 -#define EFFECT_STEALTH_ROCK 244 -#define EFFECT_TELEKINESIS 245 -#define EFFECT_POWER_SWAP 246 -#define EFFECT_GUARD_SWAP 247 -#define EFFECT_HEART_SWAP 248 -#define EFFECT_POWER_SPLIT 249 -#define EFFECT_GUARD_SPLIT 250 -#define EFFECT_STICKY_WEB 251 -#define EFFECT_METAL_BURST 252 -#define EFFECT_LUCKY_CHANT 253 -#define EFFECT_SUCKER_PUNCH 254 -#define EFFECT_SPECIAL_DEFENSE_DOWN_HIT_2 255 -#define EFFECT_SIMPLE_BEAM 256 -#define EFFECT_ENTRAINMENT 257 -#define EFFECT_HEAL_PULSE 258 -#define EFFECT_QUASH 259 -#define EFFECT_ION_DELUGE 260 -#define EFFECT_FREEZE_DRY 261 -#define EFFECT_TOPSY_TURVY 262 -#define EFFECT_MISTY_TERRAIN 263 -#define EFFECT_GRASSY_TERRAIN 264 -#define EFFECT_ELECTRIC_TERRAIN 265 -#define EFFECT_PSYCHIC_TERRAIN 266 -#define EFFECT_ATTACK_ACCURACY_UP 267 -#define EFFECT_ATTACK_SPATK_UP 268 -#define EFFECT_HURRICANE 269 -#define EFFECT_TWO_TYPED_MOVE 270 -#define EFFECT_ME_FIRST 271 -#define EFFECT_SPEED_UP_HIT 272 -#define EFFECT_QUIVER_DANCE 273 -#define EFFECT_COIL 274 -#define EFFECT_ELECTRIFY 275 -#define EFFECT_REFLECT_TYPE 276 -#define EFFECT_SOAK 277 -#define EFFECT_GROWTH 278 -#define EFFECT_CLOSE_COMBAT 279 -#define EFFECT_LAST_RESORT 280 -#define EFFECT_RECOIL_33_STATUS 281 -#define EFFECT_FLINCH_STATUS 282 -#define EFFECT_RECOIL_50 283 -#define EFFECT_SHELL_SMASH 284 -#define EFFECT_SHIFT_GEAR 285 -#define EFFECT_DEFENSE_UP_3 286 -#define EFFECT_NOBLE_ROAR 287 -#define EFFECT_VENOM_DRENCH 288 -#define EFFECT_TOXIC_THREAD 289 -#define EFFECT_CLEAR_SMOG 290 -#define EFFECT_HIT_SWITCH_TARGET 291 -#define EFFECT_FINAL_GAMBIT 292 -#define EFFECT_CHANGE_TYPE_ON_ITEM 293 -#define EFFECT_AUTOTOMIZE 294 -#define EFFECT_COPYCAT 295 -#define EFFECT_DEFOG 296 -#define EFFECT_HIT_ENEMY_HEAL_ALLY 297 -#define EFFECT_SMACK_DOWN 298 -#define EFFECT_SYNCHRONOISE 299 -#define EFFECT_PSYCHO_SHIFT 300 -#define EFFECT_POWER_TRICK 301 -#define EFFECT_FLAME_BURST 302 -#define EFFECT_AFTER_YOU 303 -#define EFFECT_BESTOW 304 -#define EFFECT_ROTOTILLER 305 -#define EFFECT_FLOWER_SHIELD 306 -#define EFFECT_HIT_PREVENT_ESCAPE 307 -#define EFFECT_SPEED_SWAP 308 -#define EFFECT_DEFENSE_UP2_HIT 309 -#define EFFECT_REVELATION_DANCE 310 -#define EFFECT_AURORA_VEIL 311 -#define EFFECT_THIRD_TYPE 312 -#define EFFECT_FEINT 313 -#define EFFECT_SPARKLING_ARIA 314 -#define EFFECT_ACUPRESSURE 315 -#define EFFECT_AROMATIC_MIST 316 -#define EFFECT_POWDER 317 -#define EFFECT_SP_ATTACK_UP_HIT 318 -#define EFFECT_BELCH 319 -#define EFFECT_PARTING_SHOT 320 -#define EFFECT_SPECTRAL_THIEF 321 -#define EFFECT_V_CREATE 322 -#define EFFECT_MAT_BLOCK 323 -#define EFFECT_STOMPING_TANTRUM 324 -#define EFFECT_CORE_ENFORCER 325 -#define EFFECT_INSTRUCT 326 -#define EFFECT_THROAT_CHOP 327 -#define EFFECT_LASER_FOCUS 328 -#define EFFECT_MAGNETIC_FLUX 329 -#define EFFECT_GEAR_UP 330 -#define EFFECT_INCINERATE 331 -#define EFFECT_BUG_BITE 332 -#define EFFECT_STRENGTH_SAP 333 -#define EFFECT_MIND_BLOWN 334 -#define EFFECT_PURIFY 335 -#define EFFECT_BURN_UP 336 -#define EFFECT_SHORE_UP 337 -#define EFFECT_GEOMANCY 338 -#define EFFECT_FAIRY_LOCK 339 -#define EFFECT_ALLY_SWITCH 340 -#define EFFECT_RELIC_SONG 341 -#define EFFECT_ATTACKER_DEFENSE_DOWN_HIT 342 -#define EFFECT_BODY_PRESS 343 -#define EFFECT_EERIE_SPELL 344 -#define EFFECT_JUNGLE_HEALING 345 -#define EFFECT_COACHING 346 -#define EFFECT_LASH_OUT 347 -#define EFFECT_GRASSY_GLIDE 348 -#define EFFECT_DYNAMAX_DOUBLE_DMG 349 -#define EFFECT_DECORATE 350 -#define EFFECT_SNIPE_SHOT 351 -#define EFFECT_RECOIL_HP_25 352 -#define EFFECT_STUFF_CHEEKS 353 -#define EFFECT_GRAV_APPLE 354 -#define EFFECT_EVASION_UP_HIT 355 -#define EFFECT_GLITZY_GLOW 356 -#define EFFECT_BADDY_BAD 357 -#define EFFECT_SAPPY_SEED 358 -#define EFFECT_FREEZY_FROST 359 -#define EFFECT_SPARKLY_SWIRL 360 -#define EFFECT_PLASMA_FISTS 361 -#define EFFECT_HYPERSPACE_FURY 362 -#define EFFECT_AURA_WHEEL 363 -#define EFFECT_PHOTON_GEYSER 364 -#define EFFECT_SHELL_SIDE_ARM 365 -#define EFFECT_TERRAIN_PULSE 366 -#define EFFECT_JAW_LOCK 367 -#define EFFECT_NO_RETREAT 368 -#define EFFECT_TAR_SHOT 369 -#define EFFECT_POLTERGEIST 370 -#define EFFECT_OCTOLOCK 371 -#define EFFECT_CLANGOROUS_SOUL 372 -#define EFFECT_BOLT_BEAK 373 -#define EFFECT_SKY_DROP 374 -#define EFFECT_EXPANDING_FORCE 375 -#define EFFECT_METEOR_BEAM 376 -#define EFFECT_RISING_VOLTAGE 377 -#define EFFECT_BEAK_BLAST 378 -#define EFFECT_COURT_CHANGE 379 -#define EFFECT_MAX_HP_50_RECOIL 380 -#define EFFECT_EXTREME_EVOBOOST 381 -#define EFFECT_HIT_SET_REMOVE_TERRAIN 382 // genesis supernova -#define EFFECT_DARK_VOID 383 -#define EFFECT_SLEEP_HIT 384 -#define EFFECT_DOUBLE_SHOCK 385 -#define EFFECT_SPECIAL_ATTACK_UP_HIT 386 -#define EFFECT_VICTORY_DANCE 387 -#define EFFECT_TEATIME 388 -#define EFFECT_ATTACK_UP_USER_ALLY 389 // Howl 8th Gen -#define EFFECT_SHELL_TRAP 390 -#define EFFECT_PSYBLADE 391 -#define EFFECT_HYDRO_STEAM 392 -#define EFFECT_HIT_SET_ENTRY_HAZARD 393 -#define EFFECT_DIRE_CLAW 394 -#define EFFECT_BARB_BARRAGE 395 -#define EFFECT_REVIVAL_BLESSING 396 -#define EFFECT_FROSTBITE_HIT 397 -#define EFFECT_SNOWSCAPE 398 -#define EFFECT_TRIPLE_ARROWS 399 -#define EFFECT_INFERNAL_PARADE 400 -#define EFFECT_TAKE_HEART 401 -#define EFFECT_AXE_KICK 402 -#define EFFECT_COLLISION_COURSE 403 -#define EFFECT_SPIN_OUT 404 -#define EFFECT_MAKE_IT_RAIN 405 -#define EFFECT_CORROSIVE_GAS 406 -#define EFFECT_POPULATION_BOMB 407 -#define EFFECT_MORTAL_SPIN 408 -#define EFFECT_SALT_CURE 409 -#define EFFECT_CHILLY_RECEPTION 410 -#define EFFECT_MATCHA_GOTCHA 411 -#define EFFECT_SYRUP_BOMB 412 -#define EFFECT_MAX_MOVE 413 -#define EFFECT_GLAIVE_RUSH 414 -#define EFFECT_RAGING_BULL 415 -#define EFFECT_RAGE_FIST 416 +#define EFFECT_PLEDGE 208 +#define EFFECT_FLING 209 +#define EFFECT_NATURAL_GIFT 210 +#define EFFECT_WAKE_UP_SLAP 211 +#define EFFECT_WRING_OUT 212 +#define EFFECT_HEX 213 +#define EFFECT_ASSURANCE 214 +#define EFFECT_TRUMP_CARD 215 +#define EFFECT_ACROBATICS 216 +#define EFFECT_HEAT_CRASH 217 +#define EFFECT_PUNISHMENT 218 +#define EFFECT_STORED_POWER 219 +#define EFFECT_ELECTRO_BALL 220 +#define EFFECT_GYRO_BALL 221 +#define EFFECT_ECHOED_VOICE 222 +#define EFFECT_PAYBACK 223 +#define EFFECT_ROUND 224 +#define EFFECT_BRINE 225 +#define EFFECT_VENOSHOCK 226 +#define EFFECT_RETALIATE 227 +#define EFFECT_BULLDOZE 228 +#define EFFECT_FOUL_PLAY 229 +#define EFFECT_PSYSHOCK 230 +#define EFFECT_ROOST 231 +#define EFFECT_GRAVITY 232 +#define EFFECT_MIRACLE_EYE 233 +#define EFFECT_TAILWIND 234 +#define EFFECT_EMBARGO 235 +#define EFFECT_AQUA_RING 236 +#define EFFECT_TRICK_ROOM 237 +#define EFFECT_WONDER_ROOM 238 +#define EFFECT_MAGIC_ROOM 239 +#define EFFECT_MAGNET_RISE 240 +#define EFFECT_TOXIC_SPIKES 241 +#define EFFECT_GASTRO_ACID 242 +#define EFFECT_STEALTH_ROCK 243 +#define EFFECT_TELEKINESIS 244 +#define EFFECT_POWER_SWAP 245 +#define EFFECT_GUARD_SWAP 246 +#define EFFECT_HEART_SWAP 247 +#define EFFECT_POWER_SPLIT 248 +#define EFFECT_GUARD_SPLIT 249 +#define EFFECT_STICKY_WEB 250 +#define EFFECT_METAL_BURST 251 +#define EFFECT_LUCKY_CHANT 252 +#define EFFECT_SUCKER_PUNCH 253 +#define EFFECT_SPECIAL_DEFENSE_DOWN_HIT_2 254 +#define EFFECT_SIMPLE_BEAM 255 +#define EFFECT_ENTRAINMENT 256 +#define EFFECT_HEAL_PULSE 257 +#define EFFECT_QUASH 258 +#define EFFECT_ION_DELUGE 259 +#define EFFECT_FREEZE_DRY 260 +#define EFFECT_TOPSY_TURVY 261 +#define EFFECT_MISTY_TERRAIN 262 +#define EFFECT_GRASSY_TERRAIN 263 +#define EFFECT_ELECTRIC_TERRAIN 264 +#define EFFECT_PSYCHIC_TERRAIN 265 +#define EFFECT_ATTACK_ACCURACY_UP 266 +#define EFFECT_ATTACK_SPATK_UP 267 +#define EFFECT_HURRICANE 268 +#define EFFECT_TWO_TYPED_MOVE 269 +#define EFFECT_ME_FIRST 270 +#define EFFECT_SPEED_UP_HIT 271 +#define EFFECT_QUIVER_DANCE 272 +#define EFFECT_COIL 273 +#define EFFECT_ELECTRIFY 274 +#define EFFECT_REFLECT_TYPE 275 +#define EFFECT_SOAK 276 +#define EFFECT_GROWTH 277 +#define EFFECT_CLOSE_COMBAT 278 +#define EFFECT_LAST_RESORT 279 +#define EFFECT_RECOIL_33_STATUS 280 +#define EFFECT_FLINCH_STATUS 281 +#define EFFECT_RECOIL_50 282 +#define EFFECT_SHELL_SMASH 283 +#define EFFECT_SHIFT_GEAR 284 +#define EFFECT_DEFENSE_UP_3 285 +#define EFFECT_NOBLE_ROAR 286 +#define EFFECT_VENOM_DRENCH 287 +#define EFFECT_TOXIC_THREAD 288 +#define EFFECT_CLEAR_SMOG 289 +#define EFFECT_HIT_SWITCH_TARGET 290 +#define EFFECT_FINAL_GAMBIT 291 +#define EFFECT_CHANGE_TYPE_ON_ITEM 292 +#define EFFECT_AUTOTOMIZE 293 +#define EFFECT_COPYCAT 294 +#define EFFECT_DEFOG 295 +#define EFFECT_HIT_ENEMY_HEAL_ALLY 296 +#define EFFECT_SMACK_DOWN 297 +#define EFFECT_SYNCHRONOISE 298 +#define EFFECT_PSYCHO_SHIFT 299 +#define EFFECT_POWER_TRICK 300 +#define EFFECT_FLAME_BURST 301 +#define EFFECT_AFTER_YOU 302 +#define EFFECT_BESTOW 303 +#define EFFECT_ROTOTILLER 304 +#define EFFECT_FLOWER_SHIELD 305 +#define EFFECT_HIT_PREVENT_ESCAPE 306 +#define EFFECT_SPEED_SWAP 307 +#define EFFECT_DEFENSE_UP2_HIT 308 +#define EFFECT_REVELATION_DANCE 309 +#define EFFECT_AURORA_VEIL 310 +#define EFFECT_THIRD_TYPE 311 +#define EFFECT_FEINT 312 +#define EFFECT_SPARKLING_ARIA 313 +#define EFFECT_ACUPRESSURE 314 +#define EFFECT_AROMATIC_MIST 315 +#define EFFECT_POWDER 316 +#define EFFECT_SP_ATTACK_UP_HIT 317 +#define EFFECT_BELCH 318 +#define EFFECT_PARTING_SHOT 319 +#define EFFECT_SPECTRAL_THIEF 320 +#define EFFECT_V_CREATE 321 +#define EFFECT_MAT_BLOCK 322 +#define EFFECT_STOMPING_TANTRUM 323 +#define EFFECT_CORE_ENFORCER 324 +#define EFFECT_INSTRUCT 325 +#define EFFECT_THROAT_CHOP 326 +#define EFFECT_LASER_FOCUS 327 +#define EFFECT_MAGNETIC_FLUX 328 +#define EFFECT_GEAR_UP 329 +#define EFFECT_INCINERATE 330 +#define EFFECT_BUG_BITE 331 +#define EFFECT_STRENGTH_SAP 332 +#define EFFECT_MIND_BLOWN 333 +#define EFFECT_PURIFY 334 +#define EFFECT_BURN_UP 335 +#define EFFECT_SHORE_UP 336 +#define EFFECT_GEOMANCY 337 +#define EFFECT_FAIRY_LOCK 338 +#define EFFECT_ALLY_SWITCH 339 +#define EFFECT_RELIC_SONG 340 +#define EFFECT_ATTACKER_DEFENSE_DOWN_HIT 341 +#define EFFECT_BODY_PRESS 342 +#define EFFECT_EERIE_SPELL 343 +#define EFFECT_JUNGLE_HEALING 344 +#define EFFECT_COACHING 345 +#define EFFECT_LASH_OUT 346 +#define EFFECT_GRASSY_GLIDE 347 +#define EFFECT_DYNAMAX_DOUBLE_DMG 348 +#define EFFECT_DECORATE 349 +#define EFFECT_SNIPE_SHOT 350 +#define EFFECT_RECOIL_HP_25 351 +#define EFFECT_STUFF_CHEEKS 352 +#define EFFECT_GRAV_APPLE 353 +#define EFFECT_EVASION_UP_HIT 354 +#define EFFECT_GLITZY_GLOW 355 +#define EFFECT_BADDY_BAD 356 +#define EFFECT_SAPPY_SEED 357 +#define EFFECT_FREEZY_FROST 358 +#define EFFECT_SPARKLY_SWIRL 359 +#define EFFECT_PLASMA_FISTS 360 +#define EFFECT_HYPERSPACE_FURY 361 +#define EFFECT_AURA_WHEEL 362 +#define EFFECT_PHOTON_GEYSER 363 +#define EFFECT_SHELL_SIDE_ARM 364 +#define EFFECT_TERRAIN_PULSE 365 +#define EFFECT_JAW_LOCK 366 +#define EFFECT_NO_RETREAT 367 +#define EFFECT_TAR_SHOT 368 +#define EFFECT_POLTERGEIST 369 +#define EFFECT_OCTOLOCK 370 +#define EFFECT_CLANGOROUS_SOUL 371 +#define EFFECT_BOLT_BEAK 372 +#define EFFECT_SKY_DROP 373 +#define EFFECT_EXPANDING_FORCE 374 +#define EFFECT_METEOR_BEAM 375 +#define EFFECT_RISING_VOLTAGE 376 +#define EFFECT_BEAK_BLAST 377 +#define EFFECT_COURT_CHANGE 378 +#define EFFECT_MAX_HP_50_RECOIL 379 +#define EFFECT_EXTREME_EVOBOOST 380 +#define EFFECT_HIT_SET_REMOVE_TERRAIN 381 // genesis supernova +#define EFFECT_DARK_VOID 382 +#define EFFECT_SLEEP_HIT 383 +#define EFFECT_DOUBLE_SHOCK 384 +#define EFFECT_SPECIAL_ATTACK_UP_HIT 385 +#define EFFECT_VICTORY_DANCE 386 +#define EFFECT_TEATIME 387 +#define EFFECT_ATTACK_UP_USER_ALLY 388 // Howl 8th Gen +#define EFFECT_SHELL_TRAP 389 +#define EFFECT_PSYBLADE 390 +#define EFFECT_HYDRO_STEAM 391 +#define EFFECT_HIT_SET_ENTRY_HAZARD 392 +#define EFFECT_DIRE_CLAW 393 +#define EFFECT_BARB_BARRAGE 394 +#define EFFECT_REVIVAL_BLESSING 395 +#define EFFECT_FROSTBITE_HIT 396 +#define EFFECT_SNOWSCAPE 397 +#define EFFECT_TRIPLE_ARROWS 398 +#define EFFECT_INFERNAL_PARADE 399 +#define EFFECT_TAKE_HEART 400 +#define EFFECT_AXE_KICK 401 +#define EFFECT_COLLISION_COURSE 402 +#define EFFECT_SPIN_OUT 403 +#define EFFECT_MAKE_IT_RAIN 404 +#define EFFECT_CORROSIVE_GAS 405 +#define EFFECT_POPULATION_BOMB 406 +#define EFFECT_MORTAL_SPIN 407 +#define EFFECT_SALT_CURE 408 +#define EFFECT_CHILLY_RECEPTION 409 +#define EFFECT_MATCHA_GOTCHA 410 +#define EFFECT_SYRUP_BOMB 411 +#define EFFECT_MAX_MOVE 412 +#define EFFECT_GLAIVE_RUSH 413 +#define EFFECT_RAGING_BULL 414 +#define EFFECT_RAGE_FIST 415 -#define NUM_BATTLE_MOVE_EFFECTS 417 +#define NUM_BATTLE_MOVE_EFFECTS 416 #endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 130770fec4..f8ffac4c06 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -1893,19 +1893,6 @@ static s32 AI_CheckBadMove(u32 battlerAtk, u32 battlerDef, u32 move, s32 score) break; } break; - case EFFECT_TEETER_DANCE: - if (((gBattleMons[battlerDef].status2 & STATUS2_CONFUSION) - || (!DoesBattlerIgnoreAbilityChecks(aiData->abilities[battlerAtk], move) && aiData->abilities[battlerDef] == ABILITY_OWN_TEMPO) - || (IsBattlerGrounded(battlerDef) && AI_IsTerrainAffected(battlerDef, STATUS_FIELD_MISTY_TERRAIN)) - || (DoesSubstituteBlockMove(battlerAtk, battlerDef, move))) - && ((gBattleMons[BATTLE_PARTNER(battlerDef)].status2 & STATUS2_CONFUSION) - || (!DoesBattlerIgnoreAbilityChecks(aiData->abilities[battlerAtk], move) && aiData->abilities[BATTLE_PARTNER(battlerDef)] == ABILITY_OWN_TEMPO) - || (IsBattlerGrounded(BATTLE_PARTNER(battlerDef)) && AI_IsTerrainAffected(BATTLE_PARTNER(battlerDef), STATUS_FIELD_MISTY_TERRAIN)) - || (DoesSubstituteBlockMove(battlerAtk, BATTLE_PARTNER(battlerDef), move)))) - { - ADJUST_SCORE(-10); - } - break; case EFFECT_TRANSFORM: if (gBattleMons[battlerAtk].status2 & STATUS2_TRANSFORMED || (gBattleMons[battlerDef].status2 & (STATUS2_TRANSFORMED | STATUS2_SUBSTITUTE))) //Leave out Illusion b/c AI is supposed to be fooled @@ -2945,7 +2932,7 @@ static s32 AI_DoubleBattle(u32 battlerAtk, u32 battlerDef, u32 move, s32 score) case EFFECT_SWAGGER: if (gBattleMons[battlerAtkPartner].statStages[STAT_ATK] < MAX_STAT_STAGE && HasMoveWithSplit(battlerAtkPartner, SPLIT_PHYSICAL) - && (!AI_CanBeConfused(battlerAtkPartner, TRUE) + && (!AI_CanBeConfused(battlerAtk, battlerAtkPartner, move, TRUE) || atkPartnerHoldEffect == HOLD_EFFECT_CURE_CONFUSION || atkPartnerHoldEffect == HOLD_EFFECT_CURE_STATUS)) { @@ -2955,7 +2942,7 @@ static s32 AI_DoubleBattle(u32 battlerAtk, u32 battlerDef, u32 move, s32 score) case EFFECT_FLATTER: if (gBattleMons[battlerAtkPartner].statStages[STAT_SPATK] < MAX_STAT_STAGE && HasMoveWithSplit(battlerAtkPartner, SPLIT_SPECIAL) - && (!AI_CanBeConfused(battlerAtkPartner, TRUE) + && (!AI_CanBeConfused(battlerAtk, battlerAtkPartner, move, TRUE) || atkPartnerHoldEffect == HOLD_EFFECT_CURE_CONFUSION || atkPartnerHoldEffect == HOLD_EFFECT_CURE_STATUS)) { @@ -4959,7 +4946,6 @@ static s32 AI_SetupFirstTurn(u32 battlerAtk, u32 battlerDef, u32 move, s32 score case EFFECT_WILL_O_WISP: case EFFECT_INGRAIN: case EFFECT_IMPRISON: - case EFFECT_TEETER_DANCE: case EFFECT_TICKLE: case EFFECT_COSMIC_POWER: case EFFECT_BULK_UP: @@ -5029,7 +5015,6 @@ static s32 AI_Risky(u32 battlerAtk, u32 battlerDef, u32 move, s32 score) case EFFECT_MIRROR_COAT: case EFFECT_FOCUS_PUNCH: case EFFECT_REVENGE: - case EFFECT_TEETER_DANCE: if (Random() & 1) ADJUST_SCORE(2); break; diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index f675602fb9..e89380aad8 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -356,7 +356,6 @@ static const u16 sEncouragedEncoreEffects[] = EFFECT_IMPRISON, EFFECT_REFRESH, EFFECT_GRUDGE, - EFFECT_TEETER_DANCE, EFFECT_MUD_SPORT, EFFECT_WATER_SPORT, EFFECT_DRAGON_DANCE, @@ -1422,7 +1421,6 @@ bool32 IsConfusionMoveEffect(u32 moveEffect) case EFFECT_CONFUSE: case EFFECT_SWAGGER: case EFFECT_FLATTER: - case EFFECT_TEETER_DANCE: return TRUE; default: return FALSE; @@ -2819,25 +2817,27 @@ bool32 AI_CanParalyze(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 move, return TRUE; } -bool32 AI_CanBeConfused(u32 battler, u32 ability) +bool32 AI_CanBeConfused(u32 battlerAtk, u32 battlerDef, u32 move, u32 ability) { - if ((gBattleMons[battler].status2 & STATUS2_CONFUSION) - || (ability == ABILITY_OWN_TEMPO) - || (IsBattlerGrounded(battler) && (gFieldStatuses & STATUS_FIELD_MISTY_TERRAIN))) + if ((gBattleMons[battlerDef].status2 & STATUS2_CONFUSION) + || (ability == ABILITY_OWN_TEMPO && !DoesBattlerIgnoreAbilityChecks(AI_DATA->abilities[battlerAtk], move)) + || (IsBattlerGrounded(battlerDef) && (gFieldStatuses & STATUS_FIELD_MISTY_TERRAIN)) + || gSideStatuses[GetBattlerSide(battlerDef)] & SIDE_STATUS_SAFEGUARD + || DoesSubstituteBlockMove(battlerAtk, battlerDef, move)) return FALSE; return TRUE; } bool32 AI_CanConfuse(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 battlerAtkPartner, u32 move, u32 partnerMove) { - if (!AI_CanBeConfused(battlerDef, defAbility) - || AI_GetMoveEffectiveness(move, battlerAtk, battlerDef) == AI_EFFECTIVENESS_x0 - || gSideStatuses[GetBattlerSide(battlerDef)] & SIDE_STATUS_SAFEGUARD - || DoesSubstituteBlockMove(battlerAtk, battlerDef, move) - || DoesPartnerHaveSameMoveEffect(battlerAtkPartner, battlerDef, move, partnerMove)) - { + if (gBattleMoves[move].target == MOVE_TARGET_FOES_AND_ALLY + && AI_CanBeConfused(battlerAtk, battlerDef, move, defAbility) + && !AI_CanBeConfused(battlerAtk, BATTLE_PARTNER(battlerDef), move, AI_DATA->abilities[BATTLE_PARTNER(battlerDef)])) + return FALSE; + + if (!AI_CanBeConfused(battlerAtk, battlerDef, move, defAbility) + || DoesPartnerHaveSameMoveEffect(battlerAtkPartner, battlerDef, move, partnerMove)) return FALSE; - } return TRUE; } diff --git a/src/battle_tv.c b/src/battle_tv.c index f22b9f96e5..d7af63cd68 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -281,7 +281,6 @@ static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] = [EFFECT_LOW_KICK] = 1, [EFFECT_SECRET_POWER] = 1, [EFFECT_RECOIL_33] = 2, - [EFFECT_TEETER_DANCE] = 6, // [EFFECT_BLAZE_KICK] = 1, [EFFECT_MUD_SPORT] = 4, [EFFECT_POISON_FANG] = 1, diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 1a2347f557..5731b5fc69 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -5340,7 +5340,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] = [MOVE_TEETER_DANCE] = { - .effect = EFFECT_TEETER_DANCE, + .effect = EFFECT_CONFUSE, .power = 0, .type = TYPE_NORMAL, .accuracy = 100, diff --git a/test/battle/ability/dancer.c b/test/battle/ability/dancer.c new file mode 100644 index 0000000000..4a7a58f47d --- /dev/null +++ b/test/battle/ability/dancer.c @@ -0,0 +1,35 @@ +#include "global.h" +#include "test/battle.h" + +SINGLE_BATTLE_TEST("Dancer can copy a dance move immediately after it was used and allow the user of Dancer to still use its move") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_QUIVER_DANCE].danceMove == TRUE); + PLAYER(SPECIES_WOBBUFFET) + OPPONENT(SPECIES_ORICORIO) { Ability(ABILITY_DANCER); } + } WHEN { + TURN { MOVE(player, MOVE_QUIVER_DANCE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_QUIVER_DANCE, player); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + ABILITY_POPUP(opponent, ABILITY_DANCER); + ANIMATION(ANIM_TYPE_MOVE, MOVE_QUIVER_DANCE, opponent); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent); // Same turn + } +} + +SINGLE_BATTLE_TEST("Dancer can copy Teeter Dance") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_TEETER_DANCE].danceMove == TRUE); + PLAYER(SPECIES_WOBBUFFET) + OPPONENT(SPECIES_ORICORIO) { Ability(ABILITY_DANCER); Item(ITEM_LUM_BERRY); } + } WHEN { + TURN { MOVE(player, MOVE_TEETER_DANCE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TEETER_DANCE, player); + ABILITY_POPUP(opponent, ABILITY_DANCER); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TEETER_DANCE, opponent); + } +} diff --git a/test/battle/move_effect/confuse.c b/test/battle/move_effect/confuse.c new file mode 100644 index 0000000000..be4b8f596e --- /dev/null +++ b/test/battle/move_effect/confuse.c @@ -0,0 +1,58 @@ +#include "global.h" +#include "test/battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_TEETER_DANCE].effect == EFFECT_CONFUSE); +} + +SINGLE_BATTLE_TEST("Teeter Dance confuses target") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_TEETER_DANCE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TEETER_DANCE, player); + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_CONFUSION, opponent); + MESSAGE("Foe Wobbuffet became confused!"); + } +} + +SINGLE_BATTLE_TEST("Teeter Dance confusion is blocked by Own Tempo") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_SLOWPOKE) { Ability(ABILITY_OWN_TEMPO); } + } WHEN { + TURN { MOVE(player, MOVE_TEETER_DANCE); } + } SCENE { + ABILITY_POPUP(opponent, ABILITY_OWN_TEMPO); + NONE_OF { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TEETER_DANCE, player); + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_CONFUSION, opponent); + MESSAGE("Foe Wobbuffet became confused!"); + } + } +} + +DOUBLE_BATTLE_TEST("Teeter Dance can confuse foes and allies") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + PLAYER(SPECIES_WYNAUT); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(playerLeft, MOVE_TEETER_DANCE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TEETER_DANCE, playerLeft); + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_CONFUSION, opponentLeft); + MESSAGE("Foe Wobbuffet became confused!"); + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_CONFUSION, playerRight); + MESSAGE("Wynaut became confused!"); + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_CONFUSION, opponentRight); + MESSAGE("Foe Wynaut became confused!"); + } +}