summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Winwood <twwinwood@7storm.org>2019-11-20 16:52:34 +0000
committerThomas Winwood <twwinwood@7storm.org>2019-11-20 16:52:34 +0000
commit435a56809843bf1faa8ca8c6e0dcfbea3cd2866d (patch)
tree318107dd2e7c719f7bee45cbf56f9b1bdfa2439b
parent5fc4c2e7d0945b651f9c88cd42a4e28211597207 (diff)
Updated How to add a new ability (markdown)
-rw-r--r--How-to-add-a-new-ability.md36
1 files changed, 1 insertions, 35 deletions
diff --git a/How-to-add-a-new-ability.md b/How-to-add-a-new-ability.md
index a9c7965..a23c301 100644
--- a/How-to-add-a-new-ability.md
+++ b/How-to-add-a-new-ability.md
@@ -139,29 +139,9 @@ Edit [include/constants/battle.h](../blob/master/include/constants/battle.h):
We've defined a bit for permanent hail, so we need to ensure that existing references to hail are correctly updated. Edit [src/battle_script_commands.c](../blob/master/src/battle_script_commands.c):
```diff
-static void Cmd_weatherdamage(void)
-{
-...
-- if (gBattleWeather & WEATHER_HAIL)
-+ if (gBattleWeather & WEATHER_HAIL_ANY)
- {
- if (!IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_ICE)
- && !(gStatuses3[gBattlerAttacker] & STATUS3_UNDERGROUND)
- && !(gStatuses3[gBattlerAttacker] & STATUS3_UNDERWATER))
- {
- gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 16;
- if (gBattleMoveDamage == 0)
- gBattleMoveDamage = 1;
- }
-...
-}
-
-...
-
static void Cmd_sethail(void)
{
-- if (gBattleWeather & WEATHER_HAIL)
-+ if (gBattleWeather & WEATHER_HAIL_ANY)
+ if (gBattleWeather & WEATHER_HAIL_ANY)
{
gMoveResultFlags |= MOVE_RESULT_MISSED;
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
@@ -210,20 +190,6 @@ u8 DoFieldEndTurnEffects(void)
}
```
-And [src/pokemon.c](../blob/master/src/pokemon.c):
-
-```diff
-s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *defender, u32 move, u16 sideStatus, u16 powerOverride, u8 typeOverride, u8 battlerIdAtk, u8 battlerIdDef)
-{
-...
- // any weather except sun weakens solar beam
-- if ((gBattleWeather & (WEATHER_RAIN_ANY | WEATHER_SANDSTORM_ANY | WEATHER_HAIL)) && gCurrentMove == MOVE_SOLAR_BEAM)
-+ if ((gBattleWeather & (WEATHER_RAIN_ANY | WEATHER_SANDSTORM_ANY | WEATHER_HAIL_ANY)) && gCurrentMove == MOVE_SOLAR_BEAM)
- damage /= 2;
-...
-}
-```
-
### ii. Add a new battle script