Use compact weather macros

This commit is contained in:
Pokestia 2021-09-29 17:45:39 +02:00
parent e270ee1a74
commit e699965332
2 changed files with 5 additions and 5 deletions

View File

@ -1901,7 +1901,7 @@ BattleScript_EffectStomp::
BattleScript_EffectSolarbeam::
jumpifabilitypresent ABILITY_CLOUD_NINE, BattleScript_SolarbeamDecideTurn
jumpifabilitypresent ABILITY_AIR_LOCK, BattleScript_SolarbeamDecideTurn
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_TEMPORARY | WEATHER_SUN_PERMANENT, BattleScript_SolarbeamOnFirstTurn
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_ANY, BattleScript_SolarbeamOnFirstTurn
BattleScript_SolarbeamDecideTurn::
jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn

View File

@ -2491,7 +2491,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
case WEATHER_SANDSTORM:
if (!(gBattleWeather & WEATHER_SANDSTORM_ANY))
{
gBattleWeather = (WEATHER_SANDSTORM_PERMANENT | WEATHER_SANDSTORM_TEMPORARY);
gBattleWeather = WEATHER_SANDSTORM_ANY;
gBattleScripting.animArg1 = B_ANIM_SANDSTORM_CONTINUES;
gBattleScripting.battler = battler;
effect++;
@ -2500,7 +2500,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
case WEATHER_DROUGHT:
if (!(gBattleWeather & WEATHER_SUN_ANY))
{
gBattleWeather = (WEATHER_SUN_PERMANENT | WEATHER_SUN_TEMPORARY);
gBattleWeather = WEATHER_SUN_ANY;
gBattleScripting.animArg1 = B_ANIM_SUN_CONTINUES;
gBattleScripting.battler = battler;
effect++;
@ -2526,7 +2526,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
case ABILITY_SAND_STREAM:
if (!(gBattleWeather & WEATHER_SANDSTORM_PERMANENT))
{
gBattleWeather = (WEATHER_SANDSTORM_PERMANENT | WEATHER_SANDSTORM_TEMPORARY);
gBattleWeather = WEATHER_SANDSTORM_ANY;
BattleScriptPushCursorAndCallback(BattleScript_SandstreamActivates);
gBattleScripting.battler = battler;
effect++;
@ -2535,7 +2535,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
case ABILITY_DROUGHT:
if (!(gBattleWeather & WEATHER_SUN_PERMANENT))
{
gBattleWeather = (WEATHER_SUN_PERMANENT | WEATHER_SUN_TEMPORARY);
gBattleWeather = WEATHER_SUN_ANY;
BattleScriptPushCursorAndCallback(BattleScript_DroughtActivates);
gBattleScripting.battler = battler;
effect++;