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

View File

@@ -1313,7 +1313,7 @@ BattleCommand05: ; 34631
push bc push bc
call GetUserItem call GetUserItem
ld a, b 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 pop bc
jr nz, .Tally jr nz, .Tally
@@ -7654,7 +7654,7 @@ BattleCommand4d: ; 36ac9
call GetUserItem call GetUserItem
ld a, b ld a, b
cp $4b ; king's rock cp HELD_TRADE_EVOLVE ; king's rock
ret nz ret nz
call CheckSubstituteOpp call CheckSubstituteOpp