Apply suggestions from code review
Thanks, Edu Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
This commit is contained in:
parent
c4616739d8
commit
3c93f97166
@ -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.
|
||||
|
||||
@ -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
|
||||
{
|
||||
|
||||
@ -1267,22 +1267,20 @@ static void AddMovePoints(u8 caseId, u16 arg1, u8 arg2, u8 arg3)
|
||||
|
||||
switch (caseId)
|
||||
{
|
||||
case PTS_MOVE_EFFECT: //arg1 == moveSlot, arg2 == move
|
||||
case PTS_MOVE_EFFECT: // arg1 -> move slot, arg2 -> move
|
||||
{
|
||||
u8 baseFromEffect = sPointsArray[caseId][gBattleMoves[arg2].effect];
|
||||
|
||||
// various cases add/remove points
|
||||
// Various cases to add/remove points
|
||||
if (gBattleMoves[arg2].recoil > 0)
|
||||
baseFromEffect++; // recoil moves
|
||||
baseFromEffect++; // Recoil moves
|
||||
if (MoveHasMoveEffect(arg2, MOVE_EFFECT_RAPIDSPIN))
|
||||
baseFromEffect++;
|
||||
if (MoveHasMoveEffect(arg2, MOVE_EFFECT_SP_ATK_TWO_DOWN)
|
||||
|| MoveHasMoveEffect(arg2, MOVE_EFFECT_ATK_DEF_DOWN))
|
||||
baseFromEffect += 2; // Overheat etc & Superpower
|
||||
if (MoveHasMoveEffect(arg2, MOVE_EFFECT_SP_ATK_TWO_DOWN) || MoveHasMoveEffect(arg2, MOVE_EFFECT_ATK_DEF_DOWN))
|
||||
baseFromEffect += 2; // Overheat, Superpower, etc.
|
||||
if (MoveHasMoveEffect(arg2, MOVE_EFFECT_STEAL_ITEM))
|
||||
baseFromEffect += 3;
|
||||
if (MoveHasMoveEffect(arg2, MOVE_EFFECT_WRAP)
|
||||
|| MoveHasMoveEffectSelf(arg2, MOVE_EFFECT_THRASH))
|
||||
if (MoveHasMoveEffect(arg2, MOVE_EFFECT_WRAP) || MoveHasMoveEffectSelf(arg2, MOVE_EFFECT_THRASH))
|
||||
baseFromEffect += 3;
|
||||
if (MoveHasMoveEffect(arg2, MOVE_EFFECT_RECHARGE))
|
||||
baseFromEffect += 4;
|
||||
|
||||
@ -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; }
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
}
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user