summaryrefslogtreecommitdiff
path: root/engine/battle/move_effects/selfdestruct.asm
diff options
context:
space:
mode:
authorDaniel Harding <33dannye@gmail.com>2020-05-16 21:42:24 -0500
committerGitHub <noreply@github.com>2020-05-16 21:42:24 -0500
commit8a924f1f783572ff395f617f99546b4c949c8b04 (patch)
tree1b6c7de331cb983256651b11b8adf413a3a434f1 /engine/battle/move_effects/selfdestruct.asm
parent88d7e9a34a8b610b358cec1ccc6660634ca9ce80 (diff)
parented94962edf1668aba3f60938e8a5ba8040e2a59c (diff)
Merge pull request #30 from entrpntr/spring-cleaning
Spring Cleaning
Diffstat (limited to 'engine/battle/move_effects/selfdestruct.asm')
-rw-r--r--engine/battle/move_effects/selfdestruct.asm30
1 files changed, 30 insertions, 0 deletions
diff --git a/engine/battle/move_effects/selfdestruct.asm b/engine/battle/move_effects/selfdestruct.asm
new file mode 100644
index 00000000..b4967b03
--- /dev/null
+++ b/engine/battle/move_effects/selfdestruct.asm
@@ -0,0 +1,30 @@
+BattleCommand_Selfdestruct:
+ ld a, BATTLEANIM_PLAYER_DAMAGE
+ ld [wNumHits], a
+ ld c, 3
+ call DelayFrames
+ ld a, BATTLE_VARS_STATUS
+ call GetBattleVarAddr
+ xor a
+ ld [hli], a
+ inc hl
+ ld [hli], a
+ ld [hl], a
+ ld a, $1
+ ld [wKickCounter], a
+ call BattleCommand_LowerSub
+ call LoadMoveAnim
+ ld a, BATTLE_VARS_SUBSTATUS4
+ call GetBattleVarAddr
+ res SUBSTATUS_LEECH_SEED, [hl]
+ ld a, BATTLE_VARS_SUBSTATUS5_OPP
+ call GetBattleVarAddr
+ res SUBSTATUS_DESTINY_BOND, [hl]
+ ; check battle scene
+ ld a, [wOptions]
+ add a
+ ret nc
+ farcall DrawPlayerHUD
+ farcall DrawEnemyHUD
+ call WaitBGMap
+ jp RefreshBattleHuds