mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
comment curse move effect asm
This commit is contained in:
parent
67dd49967d
commit
7a1951528d
@ -9486,25 +9486,40 @@ BattleCommand54: ; 37588
|
|||||||
ld bc, PlayerStatLevels
|
ld bc, PlayerStatLevels
|
||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_37599 ; 37591 $6
|
jr z, .go
|
||||||
ld de, EnemyMonType1
|
ld de, EnemyMonType1
|
||||||
ld bc, EnemyStatLevels
|
ld bc, EnemyStatLevels
|
||||||
.asm_37599
|
|
||||||
|
.go
|
||||||
|
|
||||||
|
; Curse is different for Ghost-types.
|
||||||
|
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
cp $8
|
cp GHOST
|
||||||
jr z, .asm_375d7 ; 3759c $39
|
jr z, .ghost
|
||||||
inc de
|
inc de
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
cp $8
|
cp GHOST
|
||||||
jr z, .asm_375d7 ; 375a2 $33
|
jr z, .ghost
|
||||||
|
|
||||||
|
|
||||||
|
; If no stats can be increased, don't.
|
||||||
|
|
||||||
|
; Attack
|
||||||
ld a, [bc]
|
ld a, [bc]
|
||||||
cp $d
|
cp 13 ; max
|
||||||
jr c, .asm_375af ; 375a7 $6
|
jr c, .raise
|
||||||
|
|
||||||
|
; Defense
|
||||||
inc bc
|
inc bc
|
||||||
ld a, [bc]
|
ld a, [bc]
|
||||||
cp $d
|
cp 13 ; max
|
||||||
jr nc, .asm_3760a ; 375ad $5b
|
jr nc, .cantraise
|
||||||
.asm_375af
|
|
||||||
|
.raise
|
||||||
|
|
||||||
|
; Raise Attack and Defense, and lower Speed.
|
||||||
|
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [$c689], a
|
ld [$c689], a
|
||||||
call Function0x37e01
|
call Function0x37e01
|
||||||
@ -9519,29 +9534,43 @@ BattleCommand54: ; 37588
|
|||||||
call ResetMiss
|
call ResetMiss
|
||||||
call BattleCommand71
|
call BattleCommand71
|
||||||
jp BattleCommand8c
|
jp BattleCommand8c
|
||||||
.asm_375d7
|
|
||||||
|
|
||||||
|
.ghost
|
||||||
|
|
||||||
|
; Cut HP in half and put a curse on the opponent.
|
||||||
|
|
||||||
call CheckHiddenOpponent
|
call CheckHiddenOpponent
|
||||||
jr nz, .asm_37604 ; 375da $28
|
jr nz, .failed
|
||||||
|
|
||||||
call CheckSubstituteOpp
|
call CheckSubstituteOpp
|
||||||
jr nz, .asm_37604 ; 375df $23
|
jr nz, .failed
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
||||||
call GetBattleVarPair
|
call GetBattleVarPair
|
||||||
bit 1, [hl]
|
bit 1, [hl]
|
||||||
jr nz, .asm_37604 ; 375e8 $1a
|
jr nz, .failed
|
||||||
|
|
||||||
set 1, [hl]
|
set 1, [hl]
|
||||||
call Function0x37e01
|
call Function0x37e01
|
||||||
ld hl, $4c9f
|
ld hl, GetHalfMaxHP
|
||||||
call CallBankF
|
call CallBankF
|
||||||
ld hl, $4c3f
|
ld hl, Function3cc3f
|
||||||
call CallBankF
|
call CallBankF
|
||||||
call UpdateUserInParty
|
call UpdateUserInParty
|
||||||
ld hl, PutACurseText
|
ld hl, PutACurseText
|
||||||
jp StdBattleTextBox
|
jp StdBattleTextBox
|
||||||
.asm_37604
|
|
||||||
|
.failed
|
||||||
call Function0x37e77
|
call Function0x37e77
|
||||||
jp PrintButItFailed
|
jp PrintButItFailed
|
||||||
.asm_3760a
|
|
||||||
ld b, $8
|
|
||||||
|
.cantraise
|
||||||
|
|
||||||
|
; Can't raise either stat.
|
||||||
|
|
||||||
|
ld b, $8 ; ABILITY
|
||||||
call GetStatName
|
call GetStatName
|
||||||
call Function0x37e77
|
call Function0x37e77
|
||||||
ld hl, WontRiseAnymoreText
|
ld hl, WontRiseAnymoreText
|
||||||
|
Loading…
Reference in New Issue
Block a user