summaryrefslogtreecommitdiff
path: root/engine/battle/move_effects/rapid_spin.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/battle/move_effects/rapid_spin.asm')
-rw-r--r--engine/battle/move_effects/rapid_spin.asm38
1 files changed, 38 insertions, 0 deletions
diff --git a/engine/battle/move_effects/rapid_spin.asm b/engine/battle/move_effects/rapid_spin.asm
new file mode 100644
index 000000000..84bcbad7f
--- /dev/null
+++ b/engine/battle/move_effects/rapid_spin.asm
@@ -0,0 +1,38 @@
+BattleCommand_ClearHazards: ; 37b39
+; clearhazards
+
+ ld a, BATTLE_VARS_SUBSTATUS4
+ call GetBattleVarAddr
+ bit SUBSTATUS_LEECH_SEED, [hl]
+ jr z, .not_leeched
+ res SUBSTATUS_LEECH_SEED, [hl]
+ ld hl, ShedLeechSeedText
+ call StdBattleTextBox
+.not_leeched
+
+ ld hl, wPlayerScreens
+ ld de, wPlayerWrapCount
+ ld a, [hBattleTurn]
+ and a
+ jr z, .got_screens_wrap
+ ld hl, wEnemyScreens
+ ld de, wEnemyWrapCount
+.got_screens_wrap
+ bit SCREENS_SPIKES, [hl]
+ jr z, .no_spikes
+ res SCREENS_SPIKES, [hl]
+ ld hl, BlewSpikesText
+ push de
+ call StdBattleTextBox
+ pop de
+.no_spikes
+
+ ld a, [de]
+ and a
+ ret z
+ xor a
+ ld [de], a
+ ld hl, ReleasedByText
+ jp StdBattleTextBox
+
+; 37b74