mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
refactored snow into damaging weather
this is necessary for ice body to properly work. doesnt actually do any damage
This commit is contained in:
parent
74f074f5f3
commit
eb5b81684c
@ -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
|
||||
|
||||
|
@ -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[];
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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++;
|
||||
|
@ -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.");
|
||||
|
Loading…
Reference in New Issue
Block a user