B_IRON_BALL config test (#8569)

This commit is contained in:
Eduardo Quezada 2025-12-18 20:48:54 -03:00 committed by GitHub
parent 6e529cf221
commit be9879f94a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 5 deletions

View File

@ -176,7 +176,7 @@
F(SAFARI_BALL_MODIFIER, safariBallModifier, (u32, GEN_COUNT - 1)) /* TODO: use in tests */ \
F(FRIEND_BALL_MODIFIER, friendBallModifier, (u32, GEN_COUNT - 1)) /* TODO: use in tests */ \
F(SERENE_GRACE_BOOST, sereneGraceBoost, (u32, GEN_COUNT - 1)) /* TODO: use in tests */ \
F(IRON_BALL, ironBall, (u32, GEN_COUNT - 1)) /* TODO: use in tests */ \
F(IRON_BALL, ironBall, (u32, GEN_COUNT - 1)) \
/* Weather settings */ \
F(ABILITY_WEATHER, abilityWeather, (u32, GEN_COUNT - 1)) \
F(SANDSTORM_SPDEF_BOOST, sandstormSpDefBoost, (u32, GEN_COUNT - 1)) \

View File

@ -8798,7 +8798,7 @@ static inline uq4_12_t CalcTypeEffectivenessMultiplierInternal(struct DamageCont
}
// Iron Ball ignores type modifiers for flying-type mons if it is the only source of grounding
if (B_IRON_BALL >= GEN_5
if (GetConfig(CONFIG_IRON_BALL) >= GEN_5
&& ctx->moveType == TYPE_GROUND
&& ctx->holdEffectDef == HOLD_EFFECT_IRON_BALL
&& IS_BATTLER_OF_TYPE(ctx->battlerDef, TYPE_FLYING)

View File

@ -5,17 +5,24 @@ ASSUMPTIONS{
ASSUME(gItemsInfo[ITEM_IRON_BALL].holdEffect == HOLD_EFFECT_IRON_BALL);
}
SINGLE_BATTLE_TEST("Ground-type moves do neutral damage to non-grounded Flying types holding Iron Ball regardless of other typings") //gen5+ only
SINGLE_BATTLE_TEST("Ground-type moves do neutral damage to non-grounded Flying types holding Iron Ball regardless of other typings (Gen5+)")
{
ASSUME(B_IRON_BALL >= GEN_5);
u32 config;
PARAMETRIZE { config = GEN_4; }
PARAMETRIZE { config = GEN_5; }
GIVEN {
WITH_CONFIG(CONFIG_IRON_BALL, config);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_SKARMORY) { Item(ITEM_IRON_BALL); };
} WHEN {
TURN { MOVE(player, MOVE_EARTHQUAKE); };
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_EARTHQUAKE, player);
NONE_OF {
if (config >= GEN_5) {
NONE_OF {
MESSAGE("It's super effective!");
}
} else {
MESSAGE("It's super effective!");
}
}