Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Thanks, Edu

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
  • Loading branch information
cfmnephrite and AsparagusEduardo authored Jan 11, 2024
1 parent c461673 commit 1c59fa4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion include/config/battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
#define B_THUNDERSTORM_TERRAIN TRUE // If TRUE, overworld Thunderstorm generates Rain and Electric Terrain as in Gen 8.
#define B_FOG_TERRAIN TRUE // If TRUE, overworld Fog generates Misty Terrain as in Gen 8.
#define B_TERRAIN_TYPE_BOOST GEN_LATEST // In Gen8, damage is boosted by 30% instead of 50%.
#define B_SECRET_POWER_EFFECT GEN_LATEST // Secret Power's effects change depending on terrain and generation. See MOVE_EFFECT_SECRET_POWER.
#define B_SECRET_POWER_EFFECT GEN_LATEST // Secret Power's effects change depending on terrain and generation. See MOVE_EFFECT_SECRET_POWER's case in `SetMoveEffect`.
#define B_SECRET_POWER_ANIMATION GEN_LATEST // Secret Power's animations change depending on terrain and generation.
#define B_NATURE_POWER_MOVES GEN_LATEST // Nature Power calls different moves depending on terrain and generation. See sNaturePowerMoves.
#define B_CAMOUFLAGE_TYPES GEN_LATEST // Camouflage changes the user to different types depending on terrain and generation. See sTerrainToType.
Expand Down
3 changes: 1 addition & 2 deletions include/pokemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,8 @@ struct BattleMove
const struct AdditionalEffect *additionalEffects;
};

#define ADDITIONAL_EFFECTS(...) EFFECTS_ARR( __VA_ARGS__ ), .numAdditionalEffects = ARRAY_COUNT(EFFECTS_ARR( __VA_ARGS__ ))

#define EFFECTS_ARR(...) (const struct AdditionalEffect[]) {__VA_ARGS__}
#define ADDITIONAL_EFFECTS(...) EFFECTS_ARR( __VA_ARGS__ ), .numAdditionalEffects = ARRAY_COUNT(EFFECTS_ARR( __VA_ARGS__ ))

struct AdditionalEffect
{
Expand Down
4 changes: 3 additions & 1 deletion test/battle/ability/sheer_force.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ SINGLE_BATTLE_TEST("Sheer Force boosts power, but removes secondary effects of m

for (j = 1; j < MOVES_COUNT; j++)
{
if (gBattleMoves[j].sheerForceBoost && j != MOVE_ORDER_UP && j != MOVE_AURA_WHEEL
if (gBattleMoves[j].sheerForceBoost
//&& gBattleMoves[j].effect != EFFECT_ORDER_UP
&& gBattleMoves[j].effect != EFFECT_AURA_WHEEL
&& gBattleMoves[j].effect != EFFECT_PLACEHOLDER)
{
PARAMETRIZE { ability = ABILITY_ANGER_POINT; move = j; }
Expand Down
2 changes: 1 addition & 1 deletion test/battle/move_effect/burn_hit.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ SINGLE_BATTLE_TEST("Ember cannot burn a Fire-type Pokémon")
}
}

DOUBLE_BATTLE_TEST("Lava Plume inflicts burn to every battler on the field")
DOUBLE_BATTLE_TEST("Lava Plume inflicts burn to all adjacent battlers")
{
GIVEN {
ASSUME(MoveHasMoveEffect(MOVE_LAVA_PLUME, MOVE_EFFECT_BURN) == TRUE);
Expand Down
14 changes: 7 additions & 7 deletions test/battle/move_effect/rapid_spin.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
ASSUMPTIONS
{
ASSUME(MoveHasMoveEffectSelf(MOVE_RAPID_SPIN, MOVE_EFFECT_RAPIDSPIN) == TRUE);
#if B_SPEED_BUFFING_RAPID_SPIN >= GEN_8
ASSUME(MoveHasMoveEffectSelf(MOVE_RAPID_SPIN, MOVE_EFFECT_SPD_PLUS_1) == TRUE);
#endif
#if B_SPEED_BUFFING_RAPID_SPIN >= GEN_8
ASSUME(MoveHasMoveEffectSelf(MOVE_RAPID_SPIN, MOVE_EFFECT_SPD_PLUS_1) == TRUE);
#endif
ASSUME(MoveHasMoveEffectSelf(MOVE_MORTAL_SPIN, MOVE_EFFECT_RAPIDSPIN) == TRUE);
ASSUME(MoveHasMoveEffect(MOVE_MORTAL_SPIN, MOVE_EFFECT_POISON) == TRUE);
}
Expand All @@ -24,10 +24,10 @@ SINGLE_BATTLE_TEST("Rapin Spin blows away Wrap, hazards and raises Speed (Gen 8+
ANIMATION(ANIM_TYPE_MOVE, MOVE_RAPID_SPIN, player);
MESSAGE("Wobbuffet got free of Foe Wobbuffet's Wrap!");
MESSAGE("Wobbuffet blew away Stealth Rock!");
#if B_SPEED_BUFFING_RAPID_SPIN >= GEN_8
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
MESSAGE("Wobbuffet's Speed rose!");
#endif
#if B_SPEED_BUFFING_RAPID_SPIN >= GEN_8
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
MESSAGE("Wobbuffet's Speed rose!");
#endif
}
}

Expand Down

0 comments on commit 1c59fa4

Please sign in to comment.