Print STRINGID_ATTACKWEAKENEDBSTRONGWINDS properly

This commit is contained in:
LOuroboros 2021-08-30 21:21:07 -03:00
parent e39dc493fc
commit 0a38054925
3 changed files with 16 additions and 0 deletions

View file

@ -6936,6 +6936,13 @@ BattleScript_DeltaStreamActivates::
waitmessage B_WAIT_TIME_LONG
end3
BattleScript_AttackWeakenedByStrongWinds::
pause B_WAIT_TIME_SHORT
call BattleScript_AbilityPopUp
printstring STRINGID_ATTACKWEAKENEDBSTRONGWINDS
waitmessage B_WAIT_TIME_LONG
end3
BattleScript_SnowWarningActivates::
pause B_WAIT_TIME_SHORT
call BattleScript_AbilityPopUp

View file

@ -375,5 +375,6 @@ extern const u8 BattleScript_PrimordialSeaActivates[];
extern const u8 BattleScript_PrimordialSeaFizzlesOutFireTypeMoves[];
extern const u8 BattleScript_DeltaStreamActivates[];
extern const u8 BattleScript_MysteriousAirCurrentBlowsOn[];
extern const u8 BattleScript_AttackWeakenedByStrongWinds[];
#endif // GUARD_BATTLE_SCRIPTS_H

View file

@ -484,6 +484,14 @@ void HandleAction_UseMove(void)
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
gBattleStruct->hpBefore[i] = gBattleMons[i].hp;
GET_MOVE_TYPE(gCurrentMove, moveType);
if (WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_STRONG_WINDS)
{
if (IS_BATTLER_OF_TYPE(gBattlerTarget, TYPE_FLYING)
&& CalcTypeEffectivenessMultiplier(gCurrentMove, moveType, gBattlerAttacker, gBattlerTarget, FALSE) >= UQ_4_12(2.0))
BattleScriptPushCursorAndCallback(BattleScript_AttackWeakenedByStrongWinds);
}
gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT;
}