Skip to content

Commit

Permalink
Storm Drain.
Browse files Browse the repository at this point in the history
  • Loading branch information
LOuroboros committed May 31, 2019
1 parent 5cada11 commit 81f2e76
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 17 deletions.
6 changes: 3 additions & 3 deletions data/text/ability_descriptions.inc
Expand Up @@ -352,8 +352,8 @@ gAbilityDescription_Stall:
gAbilityDescription_Steadfast:
.string "Ups SPEED if flinched.$"

gAbilityDescription_StormDrain: @ Placeholder
.string "Placeholder text.$"
gAbilityDescription_StormDrain:
.string "Draws WATER-type moves.$"

gAbilityDescription_SuperLuck:
.string "Prone to critical hits.$"
Expand Down Expand Up @@ -493,7 +493,7 @@ gAbilityDescriptions:: @ 81FA110
.4byte gAbilityDescription_SolidRock
.4byte gAbilityDescription_Stall
.4byte gAbilityDescription_Steadfast
.4byte gAbilityDescription_StormDrain @ Placeholder
.4byte gAbilityDescription_StormDrain
.4byte gAbilityDescription_SuperLuck
.4byte gAbilityDescription_TangledFeet
.4byte gAbilityDescription_Technician
Expand Down
2 changes: 1 addition & 1 deletion data/text/ability_names.inc
Expand Up @@ -117,7 +117,7 @@ gAbilityNames:: @ 81FA248
.string "SOLID ROCK$", 13
.string "STALL$", 13
.string "STEADFAST$", 13
.string "STORM DRAIN$", 13 @ Placeholder
.string "STORM DRAIN$", 13
.string "SUPER LUCK$", 13
.string "TANGLED FEET$", 13
.string "TECHNICIAN$", 13
Expand Down
2 changes: 1 addition & 1 deletion include/constants/abilities.h
Expand Up @@ -121,7 +121,7 @@
#define ABILITY_SOLID_ROCK 115
#define ABILITY_STALL 116
#define ABILITY_STEADFAST 117
#define ABILITY_STORM_DRAIN 118 // Placeholder
#define ABILITY_STORM_DRAIN 118
#define ABILITY_SUPER_LUCK 119
#define ABILITY_TANGLED_FEET 120
#define ABILITY_TECHNICIAN 121
Expand Down
9 changes: 5 additions & 4 deletions src/battle/battle_2.c
Expand Up @@ -5196,15 +5196,16 @@ void HandleAction_UseMove(void)
&& gSideTimers[side].followmeTimer == 0
&& (gBattleMoves[gCurrentMove].power != 0
|| gBattleMoves[gCurrentMove].target != MOVE_TARGET_x10)
&& gBattleMons[ewram16010arr(gBankAttacker)].ability != ABILITY_LIGHTNING_ROD
&& gBattleMoves[gCurrentMove].type == TYPE_ELECTRIC)
&& ((gBattleMons[ewram16010arr(gBankAttacker)].ability != ABILITY_LIGHTNING_ROD && gBattleMoves[gCurrentMove].type == TYPE_ELECTRIC) ||
(gBattleMons[ewram16010arr(gBankAttacker)].ability != ABILITY_STORM_DRAIN && gBattleMoves[gCurrentMove].type == TYPE_WATER)))
{
side = GetBattlerSide(gBankAttacker);
for (gActiveBattler = 0; gActiveBattler < gBattlersCount; gActiveBattler++)
{
if (side != GetBattlerSide(gActiveBattler)
if (gBankAttacker != gActiveBattler
&& ewram16010arr(gBankAttacker) != gActiveBattler
&& gBattleMons[gActiveBattler].ability == ABILITY_LIGHTNING_ROD
&& ((gBattleMons[gActiveBattler].ability == ABILITY_LIGHTNING_ROD && gBattleMoves[gCurrentMove].type == TYPE_ELECTRIC) ||
(gBattleMons[gActiveBattler].ability == ABILITY_STORM_DRAIN && gBattleMoves[gCurrentMove].type == TYPE_WATER))
&& BankGetTurnOrder(gActiveBattler) < var)
{
var = BankGetTurnOrder(gActiveBattler);
Expand Down
5 changes: 1 addition & 4 deletions src/battle/battle_4.c
Expand Up @@ -1428,13 +1428,10 @@ static void atk00_attackcanceler(void)
}
}

if (gSpecialStatuses[gBankTarget].lightningRodRedirected)
if (gSpecialStatuses[gBankTarget].lightningRodRedirected) // I decided to remove the battle message as it was not behaving correctly if a pokémon with Lightning Rod and an ally with Storm Drain were on the field at the same time. Both abilities still do their thing correctly.
{
gSpecialStatuses[gBankTarget].lightningRodRedirected = 0;
gLastUsedAbility = ABILITY_LIGHTNING_ROD;
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_TookAttack;
RecordAbilityBattle(gBankTarget, gLastUsedAbility);
}
else if (TARGET_PROTECT_AFFECTED
&& (gCurrentMove != MOVE_CURSE || (gBattleMons[gBankAttacker].type1 == TYPE_GHOST || gBattleMons[gBankAttacker].type2 == TYPE_GHOST))
Expand Down
8 changes: 4 additions & 4 deletions src/data/pokemon/base_stats.h
Expand Up @@ -14012,7 +14012,7 @@ const struct BaseStats gBaseStats[] =
.eggGroup1 = EGG_GROUP_WATER_1,
.eggGroup2 = EGG_GROUP_AMORPHOUS,
.ability1 = ABILITY_STICKY_HOLD,
.ability2 = ABILITY_RAIN_DISH,
.ability2 = ABILITY_STORM_DRAIN,
.safariZoneFleeRate = 0,
.bodyColor = BODY_COLOR_PURPLE,
.noFlip = FALSE,
Expand Down Expand Up @@ -14045,7 +14045,7 @@ const struct BaseStats gBaseStats[] =
.eggGroup1 = EGG_GROUP_WATER_1,
.eggGroup2 = EGG_GROUP_AMORPHOUS,
.ability1 = ABILITY_STICKY_HOLD,
.ability2 = ABILITY_RAIN_DISH,
.ability2 = ABILITY_STORM_DRAIN,
.safariZoneFleeRate = 0,
.bodyColor = BODY_COLOR_PURPLE,
.noFlip = FALSE,
Expand Down Expand Up @@ -15134,7 +15134,7 @@ const struct BaseStats gBaseStats[] =
.eggGroup1 = EGG_GROUP_WATER_2,
.eggGroup2 = EGG_GROUP_WATER_2,
.ability1 = ABILITY_SWIFT_SWIM,
.ability2 = ABILITY_WATER_VEIL,
.ability2 = ABILITY_STORM_DRAIN,
.safariZoneFleeRate = 0,
.bodyColor = BODY_COLOR_BLUE,
.noFlip = FALSE,
Expand Down Expand Up @@ -15167,7 +15167,7 @@ const struct BaseStats gBaseStats[] =
.eggGroup1 = EGG_GROUP_WATER_2,
.eggGroup2 = EGG_GROUP_WATER_2,
.ability1 = ABILITY_SWIFT_SWIM,
.ability2 = ABILITY_WATER_VEIL,
.ability2 = ABILITY_STORM_DRAIN,
.safariZoneFleeRate = 0,
.bodyColor = BODY_COLOR_BLUE,
.noFlip = FALSE,
Expand Down

0 comments on commit 81f2e76

Please sign in to comment.