Fixes regression caused by argument refactor (#5870)
Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
This commit is contained in:
parent
b1dbc6e9b2
commit
b0b1f449a3
@ -14362,7 +14362,7 @@ static bool32 CheckIfCanFireTwoTurnMoveNow(u8 battler, bool8 checkChargeTurnEffe
|
||||
|
||||
// Certain two-turn moves may fire on the first turn in the right weather (Solar Beam, Electro Shot)
|
||||
// By default, all two-turn moves have the option of adding weather to their argument
|
||||
if (IsBattlerWeatherAffected(battler, gMovesInfo[gCurrentMove].argument.status)) // TODO: Two Turn Moves affected by weather need a better rewrite
|
||||
if (IsBattlerWeatherAffected(battler, gMovesInfo[gCurrentMove].argument.twoTurnAttack.status))
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
|
||||
34
test/battle/move_effect/solar_beam.c
Normal file
34
test/battle/move_effect/solar_beam.c
Normal file
@ -0,0 +1,34 @@
|
||||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gMovesInfo[MOVE_SOLAR_BEAM].effect == EFFECT_SOLAR_BEAM);
|
||||
ASSUME(gMovesInfo[MOVE_SOLAR_BLADE].argument.twoTurnAttack.status == B_WEATHER_SUN);
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Solar Beam does not need a charging turn if Sun is up")
|
||||
{
|
||||
u32 ability;
|
||||
|
||||
PARAMETRIZE { ability = ABILITY_DROUGHT; }
|
||||
PARAMETRIZE { ability = ABILITY_WHITE_SMOKE; }
|
||||
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_TORKOAL) { Ability(ability); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_SOLAR_BEAM); }
|
||||
if (ability == ABILITY_WHITE_SMOKE) {
|
||||
TURN { SKIP_TURN(player); }
|
||||
}
|
||||
} SCENE {
|
||||
if (ability == ABILITY_WHITE_SMOKE) {
|
||||
MESSAGE("Torkoal used Solar Beam!");
|
||||
MESSAGE("Torkoal absorbed light!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
||||
}
|
||||
MESSAGE("Torkoal used Solar Beam!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SOLAR_BEAM, player);
|
||||
}
|
||||
}
|
||||
@ -8,12 +8,6 @@ ASSUMPTIONS
|
||||
ASSUME(MoveHasAdditionalEffectSelf(MOVE_SKULL_BASH, MOVE_EFFECT_DEF_PLUS_1) == TRUE);
|
||||
ASSUME(gMovesInfo[MOVE_SKY_ATTACK].effect == EFFECT_TWO_TURNS_ATTACK);
|
||||
|
||||
// Solar Beam - check for sun
|
||||
ASSUME(gMovesInfo[MOVE_SOLAR_BEAM].effect == EFFECT_SOLAR_BEAM);
|
||||
ASSUME(gMovesInfo[MOVE_SOLAR_BLADE].argument.twoTurnAttack.status == B_WEATHER_SUN);
|
||||
ASSUME(gMovesInfo[MOVE_SOLAR_BLADE].effect == EFFECT_SOLAR_BEAM);
|
||||
ASSUME(gMovesInfo[MOVE_SOLAR_BLADE].argument.twoTurnAttack.status == B_WEATHER_SUN);
|
||||
|
||||
// Electro shot - check for rain
|
||||
ASSUME(gMovesInfo[MOVE_ELECTRO_SHOT].argument.twoTurnAttack.status == B_WEATHER_RAIN);
|
||||
ASSUME(gMovesInfo[MOVE_ELECTRO_SHOT].effect == EFFECT_TWO_TURNS_ATTACK);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user