Skip to content

Commit

Permalink
Merge branch '_RHH/master' into _RHH/upcoming
Browse files Browse the repository at this point in the history
  • Loading branch information
AsparagusEduardo committed Feb 16, 2024
2 parents 1f349e0 + 20a3d91 commit ebe13ff
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 8 deletions.
1 change: 1 addition & 0 deletions include/config/battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,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.
Expand Down
4 changes: 2 additions & 2 deletions src/battle_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -2843,7 +2843,7 @@ void SetMoveEffect(bool32 primary, bool32 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++)
;
Expand Down Expand Up @@ -11142,7 +11142,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;
Expand Down
2 changes: 1 addition & 1 deletion src/data/pokemon/species_info/gen_5.h
Original file line number Diff line number Diff line change
Expand Up @@ -3064,7 +3064,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,
Expand Down
6 changes: 3 additions & 3 deletions src/data/pokemon/species_info/gen_6.h
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,8 @@ const struct SpeciesInfo gSpeciesInfoGen6[] =
.genderRatio = MON_MALE,
.eggGroups = MON_EGG_GROUPS(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,
},

Expand Down Expand Up @@ -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,
},
Expand Down
2 changes: 1 addition & 1 deletion src/pokemon_animation.c
Original file line number Diff line number Diff line change
Expand Up @@ -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] =
Expand Down
2 changes: 1 addition & 1 deletion src/pokemon_size_record.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,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;
Expand Down
28 changes: 28 additions & 0 deletions test/battle/move_effect/uproar.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include "global.h"
#include "test/battle.h"

ASSUMPTIONS
{
ASSUME(gMovesInfo[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);
}
}

0 comments on commit ebe13ff

Please sign in to comment.