summaryrefslogtreecommitdiff
path: root/engine/battle/experience.asm
diff options
context:
space:
mode:
authordannye <corrnondacqb@yahoo.com>2016-01-12 18:45:02 -0600
committerdannye <corrnondacqb@yahoo.com>2016-01-12 18:45:02 -0600
commit5914540ba780d7936fd6624d6fde2d67a9f7a773 (patch)
treea1ce27018f39d98f49d89468df426d0291e18560 /engine/battle/experience.asm
parentccf4fe54a8e444aaf966fac7b38bc9452c494222 (diff)
parent8a5a7d8e68538b727e0c166488265f395603366e (diff)
Merge branch 'master' of https://github.com/pret/pokered into rgbgfxrgbgfx
Diffstat (limited to 'engine/battle/experience.asm')
-rw-r--r--engine/battle/experience.asm22
1 files changed, 11 insertions, 11 deletions
diff --git a/engine/battle/experience.asm b/engine/battle/experience.asm
index edee81b1..0480bfcb 100644
--- a/engine/battle/experience.asm
+++ b/engine/battle/experience.asm
@@ -76,14 +76,14 @@ GainExperience: ; 5524f (15:524f)
ld b, [hl]
ld a, [wPlayerID + 1]
cp b
- ld a, $0
+ ld a, 0
jr z, .next
.tradedMon
call BoostExp ; traded mon exp boost
- ld a, $1
+ ld a, 1
.next
ld [wGainBoostedExp], a
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
dec a ; is it a trainer battle?
call nz, BoostExp ; if so, boost exp
inc hl
@@ -92,12 +92,12 @@ GainExperience: ; 5524f (15:524f)
; add the gained exp to the party mon's exp
ld b, [hl]
ld a, [H_QUOTIENT + 3]
- ld [wcf4c], a
+ ld [wExpAmountGained + 1], a
add b
ld [hld], a
ld b, [hl]
ld a, [H_QUOTIENT + 2]
- ld [wcf4b], a
+ ld [wExpAmountGained], a
adc b
ld [hl], a
jr nc, .noCarry
@@ -160,11 +160,11 @@ GainExperience: ; 5524f (15:524f)
ld a, [hl] ; current level
cp d
jp z, .nextMon ; if level didn't change, go to next mon
- ld a, [W_CURENEMYLVL]
+ ld a, [wCurEnemyLVL]
push af
push hl
ld a, d
- ld [W_CURENEMYLVL], a
+ ld [wCurEnemyLVL], a
ld [hl], a
ld bc, wPartyMon1Species - wPartyMon1Level
add hl, bc
@@ -223,7 +223,7 @@ GainExperience: ; 5524f (15:524f)
ld bc, 1 + NUM_STATS * 2 ; size of stats
call CopyData
pop hl
- ld a, [W_PLAYERBATTSTATUS3]
+ ld a, [wPlayerBattleStatus3]
bit 3, a ; is the mon transformed?
jr nz, .recalcStatChanges
; the mon is not transformed, so update the unmodified stats
@@ -231,8 +231,8 @@ GainExperience: ; 5524f (15:524f)
ld bc, 1 + NUM_STATS * 2
call CopyData
.recalcStatChanges
- xor a
- ld [wd11e], a
+ xor a ; battle mon
+ ld [wCalculateWhoseStats], a
callab CalculateModifiedStats
callab ApplyBurnAndParalysisPenaltiesToPlayer
callab ApplyBadgeStatBoosts
@@ -261,7 +261,7 @@ GainExperience: ; 5524f (15:524f)
predef FlagActionPredef
pop hl
pop af
- ld [W_CURENEMYLVL], a
+ ld [wCurEnemyLVL], a
.nextMon
ld a, [wPartyCount]