Tweaked trytoclearprimalweather
Made it so it won't actually try to clear a primal weather if a Pokémon with Desolate Land, Primordial Sea or Delta Stream is present on the field.
This commit is contained in:
parent
b85b3094c8
commit
64a45d8f48
1 changed files with 15 additions and 3 deletions
|
@ -8762,19 +8762,30 @@ static void Cmd_various(void)
|
||||||
gBattlescriptCurrInstr += 7;
|
gBattlescriptCurrInstr += 7;
|
||||||
return;
|
return;
|
||||||
case VARIOUS_TRY_TO_CLEAR_PRIMAL_WEATHER:
|
case VARIOUS_TRY_TO_CLEAR_PRIMAL_WEATHER:
|
||||||
if (gBattleWeather & WEATHER_SUN_PRIMAL)
|
{
|
||||||
|
bool8 shouldNotClear = FALSE;
|
||||||
|
|
||||||
|
for (i = 0; i < gBattlersCount; i++)
|
||||||
|
{
|
||||||
|
if (((GetBattlerAbility(i) == ABILITY_DESOLATE_LAND && gBattleWeather & WEATHER_SUN_PRIMAL)
|
||||||
|
|| (GetBattlerAbility(i) == ABILITY_PRIMORDIAL_SEA && gBattleWeather & WEATHER_RAIN_PRIMAL)
|
||||||
|
|| (GetBattlerAbility(i) == ABILITY_DELTA_STREAM && gBattleWeather & WEATHER_STRONG_WINDS))
|
||||||
|
&& IsBattlerAlive(i))
|
||||||
|
shouldNotClear = TRUE;
|
||||||
|
}
|
||||||
|
if (gBattleWeather & WEATHER_SUN_PRIMAL && !shouldNotClear)
|
||||||
{
|
{
|
||||||
gBattleWeather &= ~WEATHER_SUN_PRIMAL;
|
gBattleWeather &= ~WEATHER_SUN_PRIMAL;
|
||||||
PrepareStringBattle(STRINGID_EXTREMESUNLIGHTFADED, gActiveBattler);
|
PrepareStringBattle(STRINGID_EXTREMESUNLIGHTFADED, gActiveBattler);
|
||||||
gBattleCommunication[MSG_DISPLAY] = 1;
|
gBattleCommunication[MSG_DISPLAY] = 1;
|
||||||
}
|
}
|
||||||
else if (gBattleWeather & WEATHER_RAIN_PRIMAL)
|
else if (gBattleWeather & WEATHER_RAIN_PRIMAL && !shouldNotClear)
|
||||||
{
|
{
|
||||||
gBattleWeather &= ~WEATHER_RAIN_PRIMAL;
|
gBattleWeather &= ~WEATHER_RAIN_PRIMAL;
|
||||||
PrepareStringBattle(STRINGID_HEAVYRAINLIFTED, gActiveBattler);
|
PrepareStringBattle(STRINGID_HEAVYRAINLIFTED, gActiveBattler);
|
||||||
gBattleCommunication[MSG_DISPLAY] = 1;
|
gBattleCommunication[MSG_DISPLAY] = 1;
|
||||||
}
|
}
|
||||||
else if (gBattleWeather & WEATHER_STRONG_WINDS)
|
else if (gBattleWeather & WEATHER_STRONG_WINDS && !shouldNotClear)
|
||||||
{
|
{
|
||||||
gBattleWeather &= ~WEATHER_STRONG_WINDS;
|
gBattleWeather &= ~WEATHER_STRONG_WINDS;
|
||||||
PrepareStringBattle(STRINGID_STRONGWINDSDISSIPATED, gActiveBattler);
|
PrepareStringBattle(STRINGID_STRONGWINDSDISSIPATED, gActiveBattler);
|
||||||
|
@ -8782,6 +8793,7 @@ static void Cmd_various(void)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
gBattlescriptCurrInstr += 3;
|
gBattlescriptCurrInstr += 3;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue