use constants for berserk gene, kings rock, scope lens effects

This commit is contained in:
yenatch 2014-01-20 00:07:51 -05:00
parent 04f5c51753
commit 08a0462c1e
2 changed files with 23 additions and 17 deletions

View File

@ -354,47 +354,53 @@ Function3c25c: ; 3c25c
Function3c27c: ; 3c27c
ld a, [$ffcb]
cp $1
jr z, .asm_3c287
call .asm_3c28a
jr .asm_3c296
jr z, .reverse
.asm_3c287
call .asm_3c296
.asm_3c28a
call .player
jr .enemy
.reverse
call .enemy
; jr .player
.player
call SetPlayerTurn
ld de, PartyMon1Item
ld a, [CurBattleMon]
ld b, a
jr .asm_3c2a0
jr .go
.asm_3c296
.enemy
call SetEnemyTurn
ld de, OTPartyMon1Item
ld a, [CurOTMon]
ld b, a
; jr .go
.asm_3c2a0
.go
push de
push bc
callab GetUserItem
ld a, [hl]
ld [$d265], a
sub $98
sub BERSERK_GENE
pop bc
pop de
ret nz
ld [hl], a
ld h, d
ld l, e
ld a, b
call GetPartyLocation
xor a
ld [hl], a
ld a, $2
ld a, BATTLE_VARS_SUBSTATUS3
call _GetBattleVar
push af
set 7, [hl]
ld a, $c
set SUBSTATUS_CONFUSED, [hl]
ld a, BATTLE_VARS_MOVE_ANIM
call _GetBattleVar
push hl
push af
@ -411,7 +417,7 @@ Function3c27c: ; 3c27c
call StdBattleTextBox
callab BattleCommand8c
pop af
bit 7, a
bit SUBSTATUS_CONFUSED, a
ret nz
xor a
ld [$cfca], a
@ -1340,7 +1346,7 @@ Function3c8eb: ; 3c8eb
ld [$d265], a
call GetItemName
ld a, b
cp $3
cp HELD_LEFTOVERS
ret nz
ld hl, BattleMonHP
ld a, [hBattleTurn]

View File

@ -1313,7 +1313,7 @@ BattleCommand05: ; 34631
push bc
call GetUserItem
ld a, b
cp $49 ; Increased critical chance. Only Scope Lens has this.
cp HELD_CRITICAL_UP ; Increased critical chance. Only Scope Lens has this.
pop bc
jr nz, .Tally
@ -7654,7 +7654,7 @@ BattleCommand4d: ; 36ac9
call GetUserItem
ld a, b
cp $4b ; king's rock
cp HELD_TRADE_EVOLVE ; king's rock
ret nz
call CheckSubstituteOpp