diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 01311c35d..a0b035704 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -947,7 +947,7 @@ gBattleAnims_General:: .4byte General_ShellTrapSetUp @ B_ANIM_SHELL_TRAP_SETUP .4byte General_ZMoveActivate @ B_ANIM_ZMOVE_ACTIVATE .4byte General_AffectionHangedOn @ B_ANIM_AFFECTION_HANGED_ON - .4byte General_Snow @ B_ANIM_SNOW_CONTINUES + .4byte General_Snow @ B_ANIM_SNOW_CONTINUES .align 2 gBattleAnims_Special:: @@ -14386,6 +14386,18 @@ Move_SILK_TRAP:: clearmonbg ANIM_ATK_PARTNER end +@ Also used by Snow weather. Currently identical with Move_HAIL +Move_SNOWSCAPE:: + loadspritegfx ANIM_TAG_HAIL + loadspritegfx ANIM_TAG_ICE_CRYSTALS + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 0, 6, RGB_BLACK + waitforvisualfinish + createvisualtask AnimTask_Hail, 5 + loopsewithpan SE_M_HAIL, 0, 8, 10 + waitforvisualfinish + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 6, 0, RGB_BLACK + end + Move_WICKED_BLOW:: Move_SURGING_STRIKES:: Move_THUNDER_CAGE:: @@ -14449,19 +14461,6 @@ Move_ELECTRO_DRIFT:: Move_SHED_TAIL:: Move_CHILLY_RECEPTION:: Move_TIDY_UP:: - -@ Also used by Snow weather. Currently identical with Move_HAIL -Move_SNOWSCAPE: - loadspritegfx ANIM_TAG_HAIL - loadspritegfx ANIM_TAG_ICE_CRYSTALS - createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 0, 6, RGB_BLACK - waitforvisualfinish - createvisualtask AnimTask_Hail, 5 - loopsewithpan SE_M_HAIL, 0, 8, 10 - waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 6, 0, RGB_BLACK - end - Move_POUNCE:: Move_TRAILBLAZE:: Move_CHILLING_WATER:: diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index d1795dcf5..90459c5ba 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -429,7 +429,7 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectBarbBarrage @ EFFECT_BARB_BARRAGE .4byte BattleScript_EffectRevivalBlessing @ EFFECT_REVIVAL_BLESSING .4byte BattleScript_EffectFrostbiteHit @ EFFECT_FROSTBITE_HIT - .4byte BattleScript_EffectSnow @ EFFECT_SNOW + .4byte BattleScript_EffectSnow @ EFFECT_SNOWSCAPE BattleScript_EffectRevivalBlessing:: attackcanceler diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index bcc077055..4d8330498 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -406,7 +406,7 @@ #define EFFECT_BARB_BARRAGE 400 #define EFFECT_REVIVAL_BLESSING 401 #define EFFECT_FROSTBITE_HIT 402 -#define EFFECT_SNOW 403 +#define EFFECT_SNOWSCAPE 403 #define NUM_BATTLE_MOVE_EFFECTS 404 diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 2aedc32ee..1fd07ef79 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -1582,7 +1582,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) || PartnerMoveEffectIsWeather(BATTLE_PARTNER(battlerAtk), AI_DATA->partnerMove)) score -= 8; break; - case EFFECT_SNOW: + case EFFECT_SNOWSCAPE: if (gBattleWeather & (B_WEATHER_SNOW | B_WEATHER_PRIMAL_ANY) // should snow be discouraged if hail is up? || PartnerMoveEffectIsWeather(BATTLE_PARTNER(battlerAtk), AI_DATA->partnerMove)) score -= 8; @@ -2808,7 +2808,7 @@ static s16 AI_DoubleBattle(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) RETURN_SCORE_PLUS(2); // our partner benefits from hail } break; - case EFFECT_SNOW: + case EFFECT_SNOWSCAPE: if (IsBattlerAlive(battlerAtkPartner) && ShouldSetSnow(battlerAtkPartner, atkPartnerAbility, atkPartnerHoldEffect)) { @@ -3977,7 +3977,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score += 2; } break; - case EFFECT_SNOW: // any other reasons? + case EFFECT_SNOWSCAPE: // any other reasons? if (ShouldSetSnow(battlerAtk, AI_DATA->abilities[battlerAtk], AI_DATA->holdEffects[battlerAtk])) { if ((HasMoveEffect(battlerAtk, EFFECT_AURORA_VEIL) || HasMoveEffect(BATTLE_PARTNER(battlerAtk), EFFECT_AURORA_VEIL)) @@ -4976,7 +4976,7 @@ static s16 AI_SetupFirstTurn(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_SUNNY_DAY: case EFFECT_SANDSTORM: case EFFECT_HAIL: - case EFFECT_SNOW: + case EFFECT_SNOWSCAPE: case EFFECT_GEOMANCY: case EFFECT_VICTORY_DANCE: case EFFECT_HIT_SET_ENTRY_HAZARD: @@ -5203,7 +5203,7 @@ static s16 AI_HPAware(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_SUNNY_DAY: case EFFECT_SANDSTORM: case EFFECT_HAIL: - case EFFECT_SNOW: + case EFFECT_SNOWSCAPE: case EFFECT_RAIN_DANCE: score -= 2; break; diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index 010c5a01c..18acf15cc 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -331,7 +331,7 @@ static const u16 sEncouragedEncoreEffects[] = EFFECT_SPIT_UP, EFFECT_SWALLOW, EFFECT_HAIL, - EFFECT_SNOW, + EFFECT_SNOWSCAPE, EFFECT_TORMENT, EFFECT_WILL_O_WISP, EFFECT_FOLLOW_ME, @@ -3264,7 +3264,7 @@ bool32 PartnerMoveEffectIsWeather(u8 battlerAtkPartner, u16 partnerMove) || gBattleMoves[partnerMove].effect == EFFECT_RAIN_DANCE || gBattleMoves[partnerMove].effect == EFFECT_SANDSTORM || gBattleMoves[partnerMove].effect == EFFECT_HAIL - || gBattleMoves[partnerMove].effect == EFFECT_SNOW)) + || gBattleMoves[partnerMove].effect == EFFECT_SNOWSCAPE)) return TRUE; return FALSE; diff --git a/src/battle_message.c b/src/battle_message.c index 66bc4a773..e2a8eb0cb 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -363,10 +363,10 @@ static const u8 sText_SunlightGotBright[] = _("The sunlight got bright!"); static const u8 sText_SunlightStrong[] = _("The sunlight is strong."); static const u8 sText_SunlightFaded[] = _("The sunlight faded."); static const u8 sText_StartedHail[] = _("It started to hail!"); -static const u8 sText_StartedSnow[] = _("It started to snow!"); static const u8 sText_HailContinues[] = _("Hail continues to fall."); -static const u8 sText_SnowContinues[] = _("Snow continues to fall."); static const u8 sText_HailStopped[] = _("The hail stopped."); +static const u8 sText_StartedSnow[] = _("It started to snow!"); +static const u8 sText_SnowContinues[] = _("Snow continues to fall."); static const u8 sText_SnowStopped[] = _("The snow stopped."); static const u8 sText_FailedToSpitUp[] = _("But it failed to spit up\na thing!"); static const u8 sText_FailedToSwallow[] = _("But it failed to swallow\na thing!"); diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 3bc77e848..847ddb9aa 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -16577,4 +16577,4 @@ void BS_SetSnow(void) gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STARTED_SNOW; } gBattlescriptCurrInstr = cmd->nextInstr; -} \ No newline at end of file +} diff --git a/src/battle_tv.c b/src/battle_tv.c index 74f8c7008..7379b72e4 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -251,7 +251,7 @@ static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] = [EFFECT_SWALLOW] = 3, // [EFFECT_UNUSED_A3] = 1, [EFFECT_HAIL] = 4, - [EFFECT_SNOW] = 4, + [EFFECT_SNOWSCAPE] = 4, [EFFECT_TORMENT] = 7, [EFFECT_FLATTER] = 7, [EFFECT_WILL_O_WISP] = 5, diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 6d88acb8c..522895992 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -13356,7 +13356,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = [MOVE_SNOWSCAPE] = { - .effect = EFFECT_SNOW, + .effect = EFFECT_SNOWSCAPE, .power = 0, .type = TYPE_ICE, .accuracy = 0, diff --git a/test/ability_snow_warning.c b/test/ability_snow_warning.c index 6c0753ad3..200a14aca 100644 --- a/test/ability_snow_warning.c +++ b/test/ability_snow_warning.c @@ -1,7 +1,11 @@ #include "global.h" #include "test_battle.h" -SINGLE_BATTLE_TEST("Snow Warning summons hail(snow)") +#if B_SNOW_WARNING < GEN_9 +SINGLE_BATTLE_TEST("Snow Warning summons hail") +#elif B_SNOW_WARNING >= GEN_9 +SINGLE_BATTLE_TEST("Snow Warning summons snow") +#endif { GIVEN { PLAYER(SPECIES_ABOMASNOW) { Ability(ABILITY_SNOW_WARNING); }; diff --git a/test/weather_snow.c b/test/weather_snow.c index 07afa48d5..d313c921b 100644 --- a/test/weather_snow.c +++ b/test/weather_snow.c @@ -6,11 +6,9 @@ ASSUMPTIONS { - ASSUME(gBattleMoves[MOVE_SNOWSCAPE].effect == EFFECT_SNOW); - ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[0] == TYPE_PSYCHIC); - ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[1] == TYPE_PSYCHIC); - ASSUME(gSpeciesInfo[SPECIES_GLALIE].types[0] == TYPE_ICE); - ASSUME(gSpeciesInfo[SPECIES_GLALIE].types[1] == TYPE_ICE); + ASSUME(gBattleMoves[MOVE_SNOWSCAPE].effect == EFFECT_SNOWSCAPE); + ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[0] != TYPE_ICE && gSpeciesInfo[SPECIES_WOBBUFFET].types[1] != TYPE_ICE); + ASSUME(gSpeciesInfo[SPECIES_GLALIE].types[0] == TYPE_ICE || gSpeciesInfo[SPECIES_GLALIE].types[1] == TYPE_ICE); } SINGLE_BATTLE_TEST("Snow increases the defense of Ice types by 50 %", s16 damage) @@ -156,4 +154,4 @@ SINGLE_BATTLE_TEST("Snow causes Morning Sun to recover 1/4 of the user's max HP" } #undef MAX_HP -#undef TEST_HP \ No newline at end of file +#undef TEST_HP