You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
comment nightmare move effect asm
This commit is contained in:
@@ -9432,23 +9432,38 @@ BattleCommand51: ; 37517
|
|||||||
BattleCommand52: ; 37536
|
BattleCommand52: ; 37536
|
||||||
; nightmare
|
; nightmare
|
||||||
|
|
||||||
|
; Can't hit an absent opponent.
|
||||||
|
|
||||||
call CheckHiddenOpponent
|
call CheckHiddenOpponent
|
||||||
jr nz, .asm_3755d ; 37539 $22
|
jr nz, .failed
|
||||||
|
|
||||||
|
; Can't hit a substitute.
|
||||||
|
|
||||||
call CheckSubstituteOpp
|
call CheckSubstituteOpp
|
||||||
jr nz, .asm_3755d ; 3753e $1d
|
jr nz, .failed
|
||||||
|
|
||||||
|
; Only works on a sleeping opponent.
|
||||||
|
|
||||||
ld a, BATTLE_VARS_STATUS_OPP
|
ld a, BATTLE_VARS_STATUS_OPP
|
||||||
call GetBattleVarPair
|
call GetBattleVarPair
|
||||||
and $7
|
and SLP
|
||||||
jr z, .asm_3755d ; 37547 $14
|
jr z, .failed
|
||||||
|
|
||||||
|
; Bail if the opponent is already having a nightmare.
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
||||||
call GetBattleVarPair
|
call GetBattleVarPair
|
||||||
bit 0, [hl]
|
bit SUBSTATUS_NIGHTMARE, [hl]
|
||||||
jr nz, .asm_3755d ; 37550 $b
|
jr nz, .failed
|
||||||
set 0, [hl]
|
|
||||||
|
; Otherwise give the opponent a nightmare.
|
||||||
|
|
||||||
|
set SUBSTATUS_NIGHTMARE, [hl]
|
||||||
call Function0x37e01
|
call Function0x37e01
|
||||||
ld hl, StartedNightmareText
|
ld hl, StartedNightmareText
|
||||||
jp StdBattleTextBox
|
jp StdBattleTextBox
|
||||||
.asm_3755d
|
|
||||||
|
.failed
|
||||||
call Function0x37e77
|
call Function0x37e77
|
||||||
jp PrintButItFailed
|
jp PrintButItFailed
|
||||||
; 37563
|
; 37563
|
||||||
|
Reference in New Issue
Block a user