2018-06-24 14:09:41 +00:00
|
|
|
BattleCommand_ClearHazards:
|
2018-01-26 16:36:00 +00:00
|
|
|
; 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
|
|
|
|
|
2018-02-03 23:21:53 +00:00
|
|
|
ld hl, wPlayerScreens
|
2018-01-26 16:36:00 +00:00
|
|
|
ld de, wPlayerWrapCount
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh a, [hBattleTurn]
|
2018-01-26 16:36:00 +00:00
|
|
|
and a
|
|
|
|
jr z, .got_screens_wrap
|
2018-02-03 23:21:53 +00:00
|
|
|
ld hl, wEnemyScreens
|
2018-01-26 16:36:00 +00:00
|
|
|
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
|