Configuration to make all Hail moves summon Snow or vis versa, to have only one ice weather (#6149)

This commit is contained in:
surskitty 2025-03-12 16:31:45 -04:00 committed by GitHub
parent 4e01ce6993
commit 7193909fa7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 110 additions and 18 deletions

View File

@ -272,7 +272,11 @@ BattleScript_EffectChillyReception::
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_RAIN_PRIMAL, BattleScript_EffectChillyReceptionBlockedByPrimalRain
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_STRONG_WINDS, BattleScript_EffectChillyReceptionBlockedByStrongWinds
call BattleScript_EffectChillyReceptionPlayAnimation
#if B_PREFERRED_ICE_WEATHER == B_ICE_WEATHER_HAIL
setfieldweather BATTLE_WEATHER_HAIL
#else
setfieldweather BATTLE_WEATHER_SNOW
#endif
call BattleScript_MoveWeatherChangeRet
goto BattleScript_MoveSwitch
BattleScript_EffectChillyReceptionPlayAnimation:

View File

@ -9,7 +9,6 @@
#define B_MULTI_HIT_CHANCE GEN_LATEST // In Gen5+, multi-hit moves have different %. See SetRandomMultiHitCounter for values.
#define B_WHITEOUT_MONEY GEN_LATEST // In Gen4+, the amount of money lost by losing a battle is determined by the amount of badges earned. Previously, it would cut the current money by half. (While this change was also in FRLG, for the sake of simplicity, setting this to GEN_3 will result in RSE behavior.)
#define B_LIGHT_BALL_ATTACK_BOOST GEN_LATEST // In Gen4+, Light Ball doubles the power of physical moves in addition to special moves.
#define B_SANDSTORM_SPDEF_BOOST GEN_LATEST // In Gen4+, Sandstorm weather multiplies the Sp. Defense of Rock-type Pokémon by x1.5.
// Experience settings
#define B_EXP_CATCH GEN_LATEST // In Gen6+, Pokémon get experience from catching.
@ -130,7 +129,6 @@
#define B_PURSUIT_TARGET GEN_LATEST // In Gen4+, Pursuit attacks a switching opponent even if they weren't targeting them. Before Gen4, Pursuit only attacks a switching opponent that it originally targeted.
// Ability settings
#define B_ABILITY_WEATHER GEN_LATEST // In Gen6+, ability-induced weather lasts 5 turns. Before, it lasted until the battle ended or until it was changed by a move or a different weather-affecting ability.
#define B_GALE_WINGS GEN_LATEST // In Gen7+ requires full HP to trigger.
#define B_STANCE_CHANGE_FAIL GEN_LATEST // In Gen7+, Stance Change fails if the Pokémon is unable to use a move because of confusion, paralysis, etc. In Gen6, it doesn't.
#define B_SHADOW_TAG_ESCAPE GEN_LATEST // In Gen4+, if both sides have a Pokémon with Shadow Tag, all battlers can escape. Before, neither side could escape this situation.
@ -147,7 +145,6 @@
#define B_REDIRECT_ABILITY_IMMUNITY GEN_LATEST // In Gen5+, Pokémon with Lightning Rod/Storm Drain become immune to Electric/Water-type moves and increase their Sp. Attack by 1 stage on top of the redirecting effect.
#define B_REDIRECT_ABILITY_ALLIES GEN_LATEST // In Gen4+, Lightning Rod/Storm Drain redirect ally's moves as well.
#define B_LEAF_GUARD_PREVENTS_REST GEN_LATEST // In Gen5+, Leaf Guard prevents the use of Rest in harsh sunlight.
#define B_SNOW_WARNING GEN_LATEST // In Gen9+, Snow Warning will summon snow instead of hail.
#define B_TRANSISTOR_BOOST GEN_LATEST // In Gen9+, Transistor will only boost Electric-type moves by 1.3x as opposed to 1.5x.
#define B_ILLUMINATE_EFFECT GEN_LATEST // In Gen9+, Illuminate prevents accuracy reductions and ignores the target's evasion.
#define B_WEAK_ARMOR_SPEED GEN_LATEST // In Gen7+, Weak Armor raises Speed by 2 stages instead of 1 when hit by a physical move.
@ -221,6 +218,20 @@
// Ingame partner flag
#define B_SHOW_PARTNER_TARGET FALSE // Shows the battler partner will target.
// Weather settings
// Search for 'rain', 'sunny day', and 'hail' for move-specific or species-specific weather interactions.
#define B_ICE_WEATHER_BOTH 0
#define B_ICE_WEATHER_HAIL 1
#define B_ICE_WEATHER_SNOW 2
#define B_ABILITY_WEATHER GEN_LATEST // In Gen6+, ability-induced weather lasts 5 turns. Before, it lasted until the battle ended or until it was changed by a move or a different weather-affecting ability.
#define B_SANDSTORM_SPDEF_BOOST GEN_LATEST // In Gen4+, Sandstorm weather multiplies the Sp. Defense of Rock-type Pokémon by x1.5.
#define B_OVERWORLD_FOG GEN_LATEST // In Gen8+, overworld Fog summons Misty Terrain in battle. In Gen4 only, overworld Fog summons the unique fog weather condition in battle.
#define B_OVERWORLD_SNOW GEN_LATEST // In Gen9+, overworld Snow will summon snow instead of hail in battle.
#define B_SNOW_WARNING GEN_LATEST // In Gen9+, Snow Warning will summon snow instead of hail.
#define B_PREFERRED_ICE_WEATHER B_ICE_WEATHER_BOTH // Toggles Hail move effects to Snow and vis versa.
// Terrain settings
#define B_TERRAIN_BG_CHANGE TRUE // If set to TRUE, terrain moves permanently change the default battle background until the effect fades.
#define B_THUNDERSTORM_TERRAIN TRUE // If TRUE, overworld Thunderstorm generates Rain and Electric Terrain as in Gen 8.
@ -268,8 +279,6 @@
#define B_TRAINER_MON_RANDOM_ABILITY FALSE // If this is set to TRUE a random legal ability will be generated for a trainer mon
#define B_OBEDIENCE_MECHANICS GEN_LATEST // In PLA+ (here Gen8+), obedience restrictions also apply to non-outsider Pokémon, albeit based on their level met rather than actual level
#define B_USE_FROSTBITE FALSE // In PLA, Frostbite replaces Freeze. Enabling this flag does the same here. Moves can still be cherry-picked to either Freeze or Frostbite. Freeze-Dry, Secret Power & Tri Attack depend on this config.
#define B_OVERWORLD_SNOW GEN_LATEST // In Gen9+, overworld Snow will summon snow instead of hail in battle.
#define B_OVERWORLD_FOG GEN_LATEST // In Gen8+, overworld Fog summons Misty Terrain in battle. In Gen4 only, overworld Fog summons the unique fog weather condition in battle.
#define B_TOXIC_REVERSAL GEN_LATEST // In Gen5+, bad poison will change to regular poison at the end of battles.
#define B_TRY_CATCH_TRAINER_BALL GEN_LATEST // In Gen4+, trying to catch a Trainer's Pokémon does not consume the Poké Ball.
#define B_SLEEP_CLAUSE FALSE // Enables Sleep Clause all the time in every case, overriding B_FLAG_SLEEP_CLAUSE. Use that for modularity.

View File

@ -4343,8 +4343,13 @@ void SetMoveEffect(bool32 primary, bool32 certain)
msg = B_MSG_STARTED_SANDSTORM;
break;
case MOVE_EFFECT_HAIL:
weather = BATTLE_WEATHER_HAIL;
msg = B_MSG_STARTED_HAIL;
if (B_PREFERRED_ICE_WEATHER == B_ICE_WEATHER_SNOW) {
weather = BATTLE_WEATHER_SNOW;
msg = B_MSG_STARTED_SNOW;
} else {
weather = BATTLE_WEATHER_HAIL;
msg = B_MSG_STARTED_HAIL;
}
break;
}
if (TryChangeBattleWeather(gBattlerAttacker, weather, FALSE))

View File

@ -8008,10 +8008,22 @@ const struct Item gItemsInfo[] =
.name = _("Icy Rock"),
.price = (I_PRICE >= GEN_9) ? 8000 : ((I_PRICE >= GEN_7) ? 4000 : 200),
.holdEffect = HOLD_EFFECT_ICY_ROCK,
#if B_PREFERRED_ICE_WEATHER == B_ICE_WEATHER_HAIL
.description = COMPOUND_STRING(
"Extends the length\n"
"of the move Hail\n"
"used by the holder."),
#elif B_PREFERRED_ICE_WEATHER == B_ICE_WEATHER_SNOW
.description = COMPOUND_STRING(
"Extends the length\n"
"of Snowscape if\n"
"used by the holder."),
#else
.description = COMPOUND_STRING(
"Extends the length\n"
"of cold weathers\n"
"used by the holder."),
#endif
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
@ -10502,10 +10514,17 @@ const struct Item gItemsInfo[] =
{
.name = _("TM07"),
.price = 3000,
#if B_PREFERRED_ICE_WEATHER == B_ICE_WEATHER_SNOW
.description = COMPOUND_STRING(
"Raises the Defense\n"
"of Ice type {PKMN}\n"
"for 5 turns."),
#else
.description = COMPOUND_STRING(
"Creates a hailstorm\n"
"that damages all\n"
"types except Ice."),
#endif
.importance = I_REUSABLE_TMS,
.pocket = POCKET_TM_HM,
.type = ITEM_USE_PARTY_MENU,

View File

@ -6757,10 +6757,17 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_ALL] =
[MOVE_HAIL] =
{
.name = COMPOUND_STRING("Hail"),
.description = COMPOUND_STRING(
"Summons a hailstorm that\n"
"strikes every turn."),
.effect = EFFECT_HAIL,
#if B_PREFERRED_ICE_WEATHER == B_ICE_WEATHER_SNOW
.description = COMPOUND_STRING(
"Summons a snowstorm that\n"
"lasts for five turns."),
.effect = EFFECT_SNOWSCAPE,
#else
.description = COMPOUND_STRING(
"Summons a hailstorm that\n"
"strikes every turn."),
.effect = EFFECT_HAIL,
#endif
.power = 0,
.type = TYPE_ICE,
.accuracy = 0,
@ -6775,7 +6782,7 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_ALL] =
.contestCategory = CONTEST_CATEGORY_BEAUTY,
.contestComboStarterId = COMBO_STARTER_HAIL,
.contestComboMoves = {0},
.battleAnimScript = gBattleAnimMove_Hail,
.battleAnimScript = (B_PREFERRED_ICE_WEATHER == B_ICE_WEATHER_SNOW) ? gBattleAnimMove_Snowscape : gBattleAnimMove_Hail,
.validApprenticeMove = TRUE,
},
@ -16629,9 +16636,19 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_ALL] =
[MOVE_AURORA_VEIL] =
{
.name = COMPOUND_STRING("Aurora Veil"),
#if B_PREFERRED_ICE_WEATHER == B_ICE_WEATHER_SNOW
.description = COMPOUND_STRING(
"Weakens all attacks, but\n"
"only usable with snow."),
#elif B_PREFERRED_ICE_WEATHER == B_ICE_WEATHER_BOTH
.description = COMPOUND_STRING(
"Weakens all attacks if\n"
"used in hail or snow."),
#else
.description = COMPOUND_STRING(
"Weakens all attacks, but\n"
"only usable with hail."),
#endif
.effect = EFFECT_AURORA_VEIL,
.power = 0,
.type = TYPE_ICE,
@ -20130,9 +20147,15 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_ALL] =
[MOVE_CHILLY_RECEPTION] =
{
.name = COMPOUND_STRING("Chilly Reception"),
#if B_PREFERRED_ICE_WEATHER == B_ICE_WEATHER_HAIL
.description = COMPOUND_STRING(
"Bad joke summons hailstorm.\n"
"The user also switches out."),
#else
.description = COMPOUND_STRING(
"Bad joke summons snowstorm.\n"
"The user also switches out."),
#endif
.effect = EFFECT_CHILLY_RECEPTION,
.power = 0,
.type = TYPE_ICE,
@ -20171,10 +20194,17 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_ALL] =
[MOVE_SNOWSCAPE] =
{
.name = COMPOUND_STRING("Snowscape"),
.description = COMPOUND_STRING(
"Summons a snowstorm that\n"
"lasts for five turns."),
.effect = EFFECT_SNOWSCAPE,
#if B_PREFERRED_ICE_WEATHER == B_ICE_WEATHER_HAIL
.description = COMPOUND_STRING(
"Summons a hailstorm that\n"
"strikes every turn."),
.effect = EFFECT_HAIL,
#else
.description = COMPOUND_STRING(
"Summons a snowstorm that\n"
"lasts for five turns."),
.effect = EFFECT_SNOWSCAPE,
#endif
.power = 0,
.type = TYPE_ICE,
.accuracy = 0,
@ -20186,7 +20216,7 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_ALL] =
.ignoresProtect = TRUE,
.mirrorMoveBanned = TRUE,
.metronomeBanned = TRUE,
.battleAnimScript = gBattleAnimMove_Snowscape,
.battleAnimScript = (B_PREFERRED_ICE_WEATHER == B_ICE_WEATHER_HAIL) ? gBattleAnimMove_Hail : gBattleAnimMove_Snowscape,
},
[MOVE_POUNCE] =

View File

@ -5,8 +5,11 @@ ASSUMPTIONS
{
ASSUME(GetMoveEffect(MOVE_CHILLY_RECEPTION) == EFFECT_CHILLY_RECEPTION);
}
#if B_PREFERRED_ICE_WEATHER == B_ICE_WEATHER_HAIL
SINGLE_BATTLE_TEST("Chilly Reception sets up hail and switches the user out")
#else
SINGLE_BATTLE_TEST("Chilly Reception sets up snow and switches the user out")
#endif
{
GIVEN {
PLAYER(SPECIES_SLOWKING_GALAR);
@ -17,13 +20,23 @@ SINGLE_BATTLE_TEST("Chilly Reception sets up snow and switches the user out")
} SCENE {
MESSAGE("Slowking is preparing to tell a chillingly bad joke!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_CHILLY_RECEPTION, player);
#if B_PREFERRED_ICE_WEATHER == B_ICE_WEATHER_HAIL
MESSAGE("It started to hail!");
#else
MESSAGE("It started to snow!");
#endif
MESSAGE("Slowking went back to 1!");
SEND_IN_MESSAGE("Slowpoke");
#if B_PREFERRED_ICE_WEATHER == B_ICE_WEATHER_HAIL
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HAIL_CONTINUES);
#else
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_SNOW_CONTINUES);
#endif
}
}
SINGLE_BATTLE_TEST("Chilly Reception switches the user out, even if the weather does not change")
{
GIVEN {
@ -83,7 +96,11 @@ SINGLE_BATTLE_TEST("Chilly Reception changes the weather, even if the user canno
} SCENE {
MESSAGE("Slowking is preparing to tell a chillingly bad joke!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_CHILLY_RECEPTION, player);
#if B_PREFERRED_ICE_WEATHER == B_ICE_WEATHER_HAIL
MESSAGE("It started to hail!");
#else
MESSAGE("It started to snow!");
#endif
NOT MESSAGE("Slowking went back to 1!");
}
}

View File

@ -2,6 +2,14 @@
#include "test/battle.h"
// Please add Hail interactions with move, item and ability effects on their respective files.
ASSUMPTIONS
{
ASSUME(GetMoveEffect(MOVE_HAIL) == EFFECT_HAIL);
ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[0] != TYPE_ICE && gSpeciesInfo[SPECIES_WOBBUFFET].types[1] != TYPE_ICE);
ASSUME(gSpeciesInfo[SPECIES_WYNAUT].types[0] != TYPE_ICE && gSpeciesInfo[SPECIES_WYNAUT].types[1] != TYPE_ICE);
ASSUME(gSpeciesInfo[SPECIES_GLALIE].types[0] == TYPE_ICE || gSpeciesInfo[SPECIES_GLALIE].types[1] == TYPE_ICE);
}
SINGLE_BATTLE_TEST("Hail deals 1/16 damage per turn")
{
s16 hailDamage;