diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 7e1811c0b..256db2a1e 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -6851,7 +6851,7 @@ BattleScript_RainContinuesOrEndsEnd:: end2 BattleScript_DamagingWeatherContinues:: - printfromtable gSandStormHailContinuesStringIds + printfromtable gSandStormHailSnowContinuesStringIds waitmessage B_WAIT_TIME_LONG playanimation_var BS_ATTACKER, sB_ANIM_ARG1 setbyte gBattleCommunication, 0 @@ -6883,16 +6883,8 @@ BattleScript_DamagingWeatherContinuesEnd:: bicword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_GRUDGE end2 -BattleScript_SnowContinuesOrEnds:: - printfromtable gSnowContinuesStringIds - waitmessage B_WAIT_TIME_LONG - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_SNOW_STOPPED, BattleScript_SnowContinuesOrEndsEnd - playanimation BS_ATTACKER, B_ANIM_SNOW_CONTINUES -BattleScript_SnowContinuesOrEndsEnd:: - end2 - -BattleScript_SandStormHailEnds:: - printfromtable gSandStormHailEndStringIds +BattleScript_SandStormHailSnowEnds:: + printfromtable gSandStormHailSnowEndStringIds waitmessage B_WAIT_TIME_LONG end2 diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 68b3a0c96..320743694 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -45,7 +45,7 @@ extern const u8 BattleScript_LevelUp[]; extern const u8 BattleScript_RainContinuesOrEnds[]; extern const u8 BattleScript_SnowContinuesOrEnds[]; extern const u8 BattleScript_DamagingWeatherContinues[]; -extern const u8 BattleScript_SandStormHailEnds[]; +extern const u8 BattleScript_SandStormHailSnowEnds[]; extern const u8 BattleScript_SunlightContinues[]; extern const u8 BattleScript_SunlightFaded[]; extern const u8 BattleScript_OverworldWeatherStarts[]; diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index 4946f74e7..ddf1be773 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -737,13 +737,10 @@ #define B_MSG_DOWNPOUR_CONTINUES 1 #define B_MSG_RAIN_STOPPED 2 -// gSnowContinuesStringIds -#define B_MSG_SNOW_CONTINUES 0 -#define B_MSG_SNOW_STOPPED 1 - -// gSandStormHailContinuesStringIds / gSandStormHailDmgStringIds/ gSandStormHailEndStringIds +// gSandStormHailSnowContinuesStringIds / gSandStormHailDmgStringIds/ gSandStormHailSnowEndStringIds #define B_MSG_SANDSTORM 0 #define B_MSG_HAIL 1 +#define B_MSG_SNOW 2 // gReflectLightScreenSafeguardStringIds #define B_MSG_SIDE_STATUS_FAILED 0 diff --git a/src/battle_message.c b/src/battle_message.c index e2a8eb0cb..472cdf4d7 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -1568,10 +1568,11 @@ const u16 gMoveWeatherChangeStringIds[] = [B_MSG_STARTED_SNOW] = STRINGID_STARTEDSNOW, }; -const u16 gSandStormHailContinuesStringIds[] = +const u16 gSandStormHailSnowContinuesStringIds[] = { [B_MSG_SANDSTORM] = STRINGID_SANDSTORMRAGES, [B_MSG_HAIL] = STRINGID_HAILCONTINUES, + [B_MSG_SNOW] = STRINGID_SNOWCONTINUES, }; const u16 gSandStormHailDmgStringIds[] = @@ -1580,10 +1581,11 @@ const u16 gSandStormHailDmgStringIds[] = [B_MSG_HAIL] = STRINGID_PKMNPELTEDBYHAIL }; -const u16 gSandStormHailEndStringIds[] = +const u16 gSandStormHailSnowEndStringIds[] = { [B_MSG_SANDSTORM] = STRINGID_SANDSTORMSUBSIDED, [B_MSG_HAIL] = STRINGID_HAILSTOPPED, + [B_MSG_SNOW] = STRINGID_SNOWSTOPPED, }; const u16 gRainContinuesStringIds[] = @@ -1593,12 +1595,6 @@ const u16 gRainContinuesStringIds[] = [B_MSG_RAIN_STOPPED] = STRINGID_RAINSTOPPED }; -const u16 gSnowContinuesStringIds[] = -{ - [B_MSG_SNOW_CONTINUES] = STRINGID_SNOWCONTINUES, - [B_MSG_SNOW_STOPPED] = STRINGID_SNOWSTOPPED, -}; - const u16 gProtectLikeUsedStringIds[] = { [B_MSG_PROTECTED_ITSELF] = STRINGID_PKMNPROTECTEDITSELF2, diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 847ddb9aa..553b4ff97 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -12769,6 +12769,20 @@ static void Cmd_weatherdamage(void) gBattleMoveDamage = 1; } } + if (gBattleWeather & B_WEATHER_SNOW) + { + if (ability == ABILITY_ICE_BODY + && !(gStatuses3[gBattlerAttacker] & (STATUS3_UNDERGROUND | STATUS3_UNDERWATER)) + && !BATTLER_MAX_HP(gBattlerAttacker) + && !(gStatuses3[gBattlerAttacker] & STATUS3_HEAL_BLOCK)) + { + gBattlerAbility = gBattlerAttacker; + gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 16; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + gBattleMoveDamage *= -1; + } + } } gBattlescriptCurrInstr = cmd->nextInstr; diff --git a/src/battle_util.c b/src/battle_util.c index 37fc3d81b..5d13461cf 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2341,7 +2341,7 @@ u8 DoFieldEndTurnEffects(void) if (!(gBattleWeather & B_WEATHER_SANDSTORM_PERMANENT) && --gWishFutureKnock.weatherDuration == 0) { gBattleWeather &= ~B_WEATHER_SANDSTORM_TEMPORARY; - gBattlescriptCurrInstr = BattleScript_SandStormHailEnds; + gBattlescriptCurrInstr = BattleScript_SandStormHailSnowEnds; } else { @@ -2381,7 +2381,7 @@ u8 DoFieldEndTurnEffects(void) if (!(gBattleWeather & B_WEATHER_HAIL_PERMANENT) && --gWishFutureKnock.weatherDuration == 0) { gBattleWeather &= ~B_WEATHER_HAIL_TEMPORARY; - gBattlescriptCurrInstr = BattleScript_SandStormHailEnds; + gBattlescriptCurrInstr = BattleScript_SandStormHailSnowEnds; } else { @@ -2398,20 +2398,19 @@ u8 DoFieldEndTurnEffects(void) case ENDTURN_SNOW: if (gBattleWeather & B_WEATHER_SNOW) { - if (!(gBattleWeather & B_WEATHER_SNOW_PERMANENT)) + if (!(gBattleWeather & B_WEATHER_SNOW_PERMANENT) && --gWishFutureKnock.weatherDuration == 0) { - if (--gWishFutureKnock.weatherDuration == 0) - { - gBattleWeather &= ~B_WEATHER_SNOW_TEMPORARY; - gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SNOW_STOPPED; - } + gBattleWeather &= ~B_WEATHER_SNOW_TEMPORARY; + gBattlescriptCurrInstr = BattleScript_SandStormHailSnowEnds; } else { - gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SNOW_CONTINUES; + gBattlescriptCurrInstr = BattleScript_DamagingWeatherContinues; } - BattleScriptExecute(BattleScript_SnowContinuesOrEnds); + gBattleScripting.animArg1 = B_ANIM_SNOW_CONTINUES; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SNOW; + BattleScriptExecute(gBattlescriptCurrInstr); effect++; } gBattleStruct->turnCountersTracker++; diff --git a/src/data/text/abilities.h b/src/data/text/abilities.h index 96407c340..368b0cb4d 100644 --- a/src/data/text/abilities.h +++ b/src/data/text/abilities.h @@ -113,7 +113,7 @@ static const u8 sFilterDescription[] = _("Weakens “supereffective”."); static const u8 sSlowStartDescription[] = _("Takes a while to get going."); static const u8 sScrappyDescription[] = _("Hits Ghost-type Pokémon."); static const u8 sStormDrainDescription[] = _("Draws in Water moves."); -static const u8 sIceBodyDescription[] = _("Slight HP recovery in Hail."); +static const u8 sIceBodyDescription[] = _("HP recovery in Hail or Snow."); static const u8 sSnowWarningDescription[] = _("Summons a hailstorm."); static const u8 sHoneyGatherDescription[] = _("May gather Honey."); static const u8 sFriskDescription[] = _("Checks a foe's item.");