From 3598a187031c7b93c760919bc2bc8826c638609f Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Sun, 11 Feb 2024 10:40:30 +0100 Subject: [PATCH 1/4] Adds config for Soundproof change during Uproar status (#4174) --- include/config/battle.h | 1 + src/battle_script_commands.c | 4 ++-- test/battle/move_effect/uproar.c | 28 ++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 test/battle/move_effect/uproar.c diff --git a/include/config/battle.h b/include/config/battle.h index a003b8f5d8..2d40bdbdb2 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -50,6 +50,7 @@ // Turn settings #define B_BINDING_TURNS GEN_LATEST // In Gen5+, binding moves last for 4-5 turns instead of 2-5 turns. (With Grip Claw, 7 and 5 turns respectively.) #define B_UPROAR_TURNS GEN_LATEST // In Gen5+, Uproar lasts for 3 turns instead of 2-5 turns. +#define B_UPROAR_IGNORE_SOUNDPROOF GEN_LATEST // In Gen5+, Uproar status ignores Soundproof. #define B_DISABLE_TURNS GEN_LATEST // Disable's turns. See Cmd_disablelastusedattack. #define B_TAILWIND_TURNS GEN_LATEST // In Gen5+, Tailwind lasts 4 turns instead of 3. #define B_SLEEP_TURNS GEN_LATEST // In Gen5+, sleep lasts for 1-3 turns instead of 2-5 turns. diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 8d4df643c8..9965b3e80d 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -2848,7 +2848,7 @@ void SetMoveEffect(bool32 primary, u32 certain) { case STATUS1_SLEEP: // check active uproar - if (battlerAbility != ABILITY_SOUNDPROOF) + if (battlerAbility != ABILITY_SOUNDPROOF || B_UPROAR_IGNORE_SOUNDPROOF >= GEN_5) { for (i = 0; i < gBattlersCount && !(gBattleMons[i].status2 & STATUS2_UPROAR); i++) ; @@ -11004,7 +11004,7 @@ bool8 UproarWakeUpCheck(u8 battler) for (i = 0; i < gBattlersCount; i++) { - if (!(gBattleMons[i].status2 & STATUS2_UPROAR) || GetBattlerAbility(battler) == ABILITY_SOUNDPROOF) + if (!(gBattleMons[i].status2 & STATUS2_UPROAR) || (GetBattlerAbility(battler) == ABILITY_SOUNDPROOF && B_UPROAR_IGNORE_SOUNDPROOF < GEN_5)) continue; gBattleScripting.battler = i; diff --git a/test/battle/move_effect/uproar.c b/test/battle/move_effect/uproar.c new file mode 100644 index 0000000000..a4faab1efa --- /dev/null +++ b/test/battle/move_effect/uproar.c @@ -0,0 +1,28 @@ +#include "global.h" +#include "test/battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_UPROAR].effect == EFFECT_UPROAR); +} + +DOUBLE_BATTLE_TEST("Uproar status causes sleeping pokemon to wake up during an attack") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_SLEEP); } + OPPONENT(SPECIES_VOLTORB) { Ability(ABILITY_SOUNDPROOF); Status1(STATUS1_SLEEP); } + OPPONENT(SPECIES_WOBBUFFET) { Status1(STATUS1_SLEEP); } + } WHEN { + TURN { MOVE(playerLeft, MOVE_UPROAR); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_UPROAR, playerLeft); + HP_BAR(opponentRight); + MESSAGE("Wobbuffet woke up in the UPROAR!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, playerRight); + MESSAGE("Foe Voltorb woke up in the UPROAR!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponentLeft); + MESSAGE("Foe Wobbuffet woke up in the UPROAR!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponentRight); + } +} From ab2260a81ee1da9c7c11f6fb58adc52d814ef0c6 Mon Sep 17 00:00:00 2001 From: cmy2008 <65344456+cmy2008@users.noreply.github.com> Date: Thu, 15 Feb 2024 17:21:35 +0800 Subject: [PATCH 2/4] Deleted a space (#4194) --- src/pokemon_animation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokemon_animation.c b/src/pokemon_animation.c index 95557e431f..69f6003a4e 100644 --- a/src/pokemon_animation.c +++ b/src/pokemon_animation.c @@ -425,7 +425,7 @@ static const u8 sBackAnimationIds[] = [(BACK_ANIM_SHAKE_FLASH_YELLOW - 1) * 3] = ANIM_SHAKE_FLASH_YELLOW_FAST, ANIM_SHAKE_FLASH_YELLOW, ANIM_SHAKE_FLASH_YELLOW_SLOW, [(BACK_ANIM_SHAKE_GLOW_RED - 1) * 3] = ANIM_SHAKE_GLOW_RED_FAST, ANIM_SHAKE_GLOW_RED, ANIM_SHAKE_GLOW_RED_SLOW, [(BACK_ANIM_SHAKE_GLOW_GREEN - 1) * 3] = ANIM_SHAKE_GLOW_GREEN_FAST, ANIM_SHAKE_GLOW_GREEN, ANIM_SHAKE_GLOW_GREEN_SLOW, - [(BACK_ANIM_SHAKE_GLOW_BLUE - 1) * 3] = ANIM_SHAKE_GLOW_BLUE_FAST, ANIM_SHAKE_GLOW_BLUE, ANIM_SHAKE_GLOW_BLUE_SLOW, + [(BACK_ANIM_SHAKE_GLOW_BLUE - 1) * 3] = ANIM_SHAKE_GLOW_BLUE_FAST, ANIM_SHAKE_GLOW_BLUE, ANIM_SHAKE_GLOW_BLUE_SLOW, }; static const u8 sBackAnimNatureModTable[NUM_NATURES] = From 6a61e6525e28b8e7b4e0985363cfcfc7a43ffcc0 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Thu, 15 Feb 2024 13:07:31 +0100 Subject: [PATCH 3/4] Fix height call (#4195) --- src/pokemon_size_record.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokemon_size_record.c b/src/pokemon_size_record.c index 3f98e65ba6..71d3c9dd49 100644 --- a/src/pokemon_size_record.c +++ b/src/pokemon_size_record.c @@ -84,7 +84,7 @@ static u32 GetMonSize(u16 species, u16 b) u32 height; u32 var; - height = GetSpeciesWeight(species); + height = GetSpeciesHeight(species); var = TranslateBigMonSizeTableIndex(b); unk0 = sBigMonSizeTable[var].unk0; unk2 = sBigMonSizeTable[var].unk2; From 20a3d91de7292e0115fb2e028a83b39464f2a5f5 Mon Sep 17 00:00:00 2001 From: MelonSpeedruns Date: Thu, 15 Feb 2024 13:56:32 -0500 Subject: [PATCH 4/4] Fixed Basculegion Back Sprite Offset & Greninja forms animations (#4198) --- src/data/pokemon/species_info/gen_5.h | 2 +- src/data/pokemon/species_info/gen_6.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/data/pokemon/species_info/gen_5.h b/src/data/pokemon/species_info/gen_5.h index 15ff00fcf1..dda86c9a45 100644 --- a/src/data/pokemon/species_info/gen_5.h +++ b/src/data/pokemon/species_info/gen_5.h @@ -3028,7 +3028,7 @@ const struct SpeciesInfo gSpeciesInfoGen5[] = .frontAnimFrames = sAnims_Basculegion, \ .frontPicYOffset = 0, \ .enemyMonElevation = 5, \ - .backPicYOffset = 0, \ + .backPicYOffset = 8, \ LEARNSETS(Basculegion), \ .formSpeciesIdTable = sBasculegionFormSpeciesIdTable //.frontAnimId = ANIM_V_SQUISH_AND_BOUNCE, diff --git a/src/data/pokemon/species_info/gen_6.h b/src/data/pokemon/species_info/gen_6.h index 93261648d0..f5fcbb7ee9 100644 --- a/src/data/pokemon/species_info/gen_6.h +++ b/src/data/pokemon/species_info/gen_6.h @@ -448,8 +448,8 @@ const struct SpeciesInfo gSpeciesInfoGen6[] = .genderRatio = MON_MALE, .eggGroups = { EGG_GROUP_NO_EGGS_DISCOVERED, EGG_GROUP_NO_EGGS_DISCOVERED }, .abilities = { ABILITY_BATTLE_BOND, ABILITY_NONE, ABILITY_NONE }, - .frontAnimId = ANIM_FLICKER_INCREASING, - .backAnimId = BACK_ANIM_V_STRETCH, + .frontAnimId = ANIM_V_STRETCH, + .backAnimId = BACK_ANIM_JOLT_RIGHT, .formChangeTable = sGreninjaBattleBondFormChangeTable, }, @@ -478,7 +478,7 @@ const struct SpeciesInfo gSpeciesInfoGen6[] = .backPicYOffset = 11, PALETTES(GreninjaAsh), ICON(GreninjaAsh, 0), - .frontAnimId = ANIM_FLICKER_INCREASING, + .frontAnimId = ANIM_V_STRETCH, .backAnimId = BACK_ANIM_SHAKE_GLOW_BLUE, .formChangeTable = sGreninjaBattleBondFormChangeTable, },