diff options
Diffstat (limited to 'Add-a-new-move-effect.md')
-rw-r--r-- | Add-a-new-move-effect.md | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/Add-a-new-move-effect.md b/Add-a-new-move-effect.md index 5b813e7..d85731e 100644 --- a/Add-a-new-move-effect.md +++ b/Add-a-new-move-effect.md @@ -39,7 +39,7 @@ If you want to be save space, there are six `UNUSED` effects you can replace, in Edit [data/moves/effects_pointers.asm](../blob/master/data/moves/effects_pointers.asm): ```diff - MoveEffectsPointers: ; 271f4 + MoveEffectsPointers: ; entries correspond to EFFECT_* constants dw NormalHit ... @@ -100,13 +100,12 @@ You can replace `effect0x3c` or `effect0x5d` before adding to the end of the lis Anyway, edit [data/battle/effect_command_pointers.asm](../blob/master/data/battle/effect_command_pointers.asm): ```diff - BattleCommandPointers: ; 3fd28 + BattleCommandPointers: ; entries correspond to macros/scripts/battle_commands.asm - dw BattleCommand_CheckTurn ; 34084 + dw BattleCommand_CheckTurn ... - dw BattleCommand_Curl ; 365a7 + dw BattleCommand_Curl + dw BattleCommand_Hex - ; 3fe86 ``` Create **engine/battle/move_effects/hex.asm**: @@ -131,7 +130,7 @@ And edit [engine/battle/effect_commands.asm](../blob/master/engine/battle/effect + +INCLUDE "engine/battle/move_effects/hex.asm" - BattleCommand_DoubleFlyingDamage: ; 36f25 + BattleCommand_DoubleFlyingDamage: ; doubleflyingdamage ld a, BATTLE_VARS_SUBSTATUS3_OPP call GetBattleVar @@ -154,7 +153,7 @@ First, look at the tables of moves and effects in [data/battle/ai](../tree/maste Next, we'll teach `AI_SMART` to take advantage of `EFFECT_HEX` when the player has a status condition. Edit [engine/battle/ai/scoring.asm](../blob/master/engine/battle/ai/scoring.asm): ```diff - AI_Smart: ; 386be + AI_Smart: ; Context-specific scoring. ... @@ -165,11 +164,10 @@ Next, we'll teach `AI_SMART` to take advantage of `EFFECT_HEX` when the player h dbw EFFECT_FLY, AI_Smart_Fly + dbw EFFECT_HEX, AI_Smart_Hex db -1 ; end - ; 387e3 ... - AI_Smart_DefrostOpponent: ; 38ccb + AI_Smart_DefrostOpponent: ; Greatly encourage this move if enemy is frozen. ; No move has EFFECT_DEFROST_OPPONENT, so this layer is unused. @@ -180,7 +178,6 @@ Next, we'll teach `AI_SMART` to take advantage of `EFFECT_HEX` when the player h dec [hl] dec [hl] ret - ; 38cd5 + +AI_Smart_Hex: +; Greatly encourage this move if the player has a status condition. |