2018-06-24 07:09:41 -07:00
|
|
|
BattleCommand_ClearHazards:
|
2018-01-26 08:36:00 -08:00
|
|
|
ld a, BATTLE_VARS_SUBSTATUS4
|
|
|
|
call GetBattleVarAddr
|
|
|
|
bit SUBSTATUS_LEECH_SEED, [hl]
|
|
|
|
jr z, .not_leeched
|
|
|
|
res SUBSTATUS_LEECH_SEED, [hl]
|
|
|
|
ld hl, ShedLeechSeedText
|
2019-04-08 05:15:10 -07:00
|
|
|
call StdBattleTextbox
|
2018-01-26 08:36:00 -08:00
|
|
|
.not_leeched
|
|
|
|
|
2018-02-03 15:21:53 -08:00
|
|
|
ld hl, wPlayerScreens
|
2018-01-26 08:36:00 -08:00
|
|
|
ld de, wPlayerWrapCount
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh a, [hBattleTurn]
|
2018-01-26 08:36:00 -08:00
|
|
|
and a
|
|
|
|
jr z, .got_screens_wrap
|
2018-02-03 15:21:53 -08:00
|
|
|
ld hl, wEnemyScreens
|
2018-01-26 08:36:00 -08:00
|
|
|
ld de, wEnemyWrapCount
|
|
|
|
.got_screens_wrap
|
|
|
|
bit SCREENS_SPIKES, [hl]
|
|
|
|
jr z, .no_spikes
|
|
|
|
res SCREENS_SPIKES, [hl]
|
|
|
|
ld hl, BlewSpikesText
|
|
|
|
push de
|
2019-04-08 05:15:10 -07:00
|
|
|
call StdBattleTextbox
|
2018-01-26 08:36:00 -08:00
|
|
|
pop de
|
|
|
|
.no_spikes
|
|
|
|
|
|
|
|
ld a, [de]
|
|
|
|
and a
|
|
|
|
ret z
|
|
|
|
xor a
|
|
|
|
ld [de], a
|
|
|
|
ld hl, ReleasedByText
|
2019-04-08 05:15:10 -07:00
|
|
|
jp StdBattleTextbox
|