Abilities affected by weather conditions
This commit is contained in:
parent
831816e9b2
commit
194adf0ab2
2 changed files with 26 additions and 10 deletions
|
@ -3486,11 +3486,17 @@ BattleScript_DamagingWeatherLoop::
|
|||
copyarraywithindex gBattlerAttacker, gBattlerByTurnOrder, gBattleCommunication, 0x1
|
||||
weatherdamage
|
||||
jumpifword CMP_EQUAL, gBattleMoveDamage, 0x0, BattleScript_DamagingWeatherLoopIncrement
|
||||
jumpifword CMP_COMMON_BITS gBattleMoveDamage, 1 << 31, BattleScript_DamagingWeatherHeal
|
||||
printfromtable gSandStormHailDmgStringIds
|
||||
waitmessage 0x40
|
||||
orword gHitMarker, HITMARKER_x20 | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 | HITMARKER_GRUDGE
|
||||
effectivenesssound
|
||||
hitanimation BS_ATTACKER
|
||||
goto BattleScript_DamagingWeatherHpChange
|
||||
BattleScript_DamagingWeatherHeal:
|
||||
printstring STRINGID_ICEBODYHPGAIN
|
||||
waitmessage 0x40
|
||||
BattleScript_DamagingWeatherHpChange:
|
||||
orword gHitMarker, HITMARKER_x20 | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 | HITMARKER_GRUDGE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
||||
|
|
|
@ -7608,15 +7608,15 @@ static void atk96_weatherdamage(void)
|
|||
{
|
||||
if (WEATHER_HAS_EFFECT)
|
||||
{
|
||||
u32 ability = GetBattlerAbility(gBattlerAttacker);
|
||||
if (gBattleWeather & WEATHER_SANDSTORM_ANY)
|
||||
{
|
||||
if (gBattleMons[gBattlerAttacker].type1 != TYPE_ROCK
|
||||
&& gBattleMons[gBattlerAttacker].type1 != TYPE_STEEL
|
||||
&& gBattleMons[gBattlerAttacker].type1 != TYPE_GROUND
|
||||
&& gBattleMons[gBattlerAttacker].type2 != TYPE_ROCK
|
||||
&& gBattleMons[gBattlerAttacker].type2 != TYPE_STEEL
|
||||
&& gBattleMons[gBattlerAttacker].type2 != TYPE_GROUND
|
||||
&& gBattleMons[gBattlerAttacker].ability != ABILITY_SAND_VEIL
|
||||
if (!IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_ROCK)
|
||||
&& !IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_GROUND)
|
||||
&& !IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_STEEL)
|
||||
&& ability != ABILITY_SAND_VEIL
|
||||
&& ability != ABILITY_SAND_FORCE
|
||||
&& ability != ABILITY_SAND_RUSH
|
||||
&& !(gStatuses3[gBattlerAttacker] & STATUS3_UNDERGROUND)
|
||||
&& !(gStatuses3[gBattlerAttacker] & STATUS3_UNDERWATER))
|
||||
{
|
||||
|
@ -7629,9 +7629,19 @@ static void atk96_weatherdamage(void)
|
|||
gBattleMoveDamage = 0;
|
||||
}
|
||||
}
|
||||
if (gBattleWeather & WEATHER_HAIL)
|
||||
if (gBattleWeather & WEATHER_HAIL_ANY)
|
||||
{
|
||||
if (!IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_ICE)
|
||||
if (ability == ABILITY_ICE_BODY
|
||||
&& !(gStatuses3[gBattlerAttacker] & STATUS3_UNDERGROUND)
|
||||
&& !(gStatuses3[gBattlerAttacker] & STATUS3_UNDERWATER))
|
||||
{
|
||||
gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 16;
|
||||
if (gBattleMoveDamage == 0)
|
||||
gBattleMoveDamage = 1;
|
||||
gBattleMoveDamage *= -1;
|
||||
}
|
||||
else if (!IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_ICE)
|
||||
&& ability != ABILITY_SNOW_CLOAK
|
||||
&& !(gStatuses3[gBattlerAttacker] & STATUS3_UNDERGROUND)
|
||||
&& !(gStatuses3[gBattlerAttacker] & STATUS3_UNDERWATER))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue