diff options
| author | dannye <33dannye@gmail.com> | 2024-09-25 00:45:00 -0500 |
|---|---|---|
| committer | dannye <33dannye@gmail.com> | 2024-09-25 00:45:00 -0500 |
| commit | a02a98ee7ada1a658e28698484058be2796dc0df (patch) | |
| tree | 945986054565bd8b5212fc755415096050d1d3a8 /engine/battle/experience.asm | |
| parent | Use long option flags for rgbgfx, same as tools/gfx (diff) | |
| parent | Use `const_skip` (diff) | |
| download | pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.tar.gz pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.tar.xz pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.zip | |
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'engine/battle/experience.asm')
| -rw-r--r-- | engine/battle/experience.asm | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/engine/battle/experience.asm b/engine/battle/experience.asm index 61fbdfa3..35f9f1a4 100644 --- a/engine/battle/experience.asm +++ b/engine/battle/experience.asm @@ -113,8 +113,8 @@ GainExperience: ld b, 0 ld hl, wPartySpecies add hl, bc - ld a, [hl] ; species - ld [wd0b5], a + ld a, [hl] + ld [wCurSpecies], a call GetMonHeader ld d, MAX_LEVEL callfar CalcExperience ; get max exp @@ -160,17 +160,17 @@ GainExperience: ld a, [hl] ; current level cp d jp z, .nextMon ; if level didn't change, go to next mon - ld a, [wCurEnemyLVL] + ld a, [wCurEnemyLevel] push af push hl ld a, d - ld [wCurEnemyLVL], a + ld [wCurEnemyLevel], a ld [hl], a ld bc, wPartyMon1Species - wPartyMon1Level add hl, bc - ld a, [hl] ; species - ld [wd0b5], a - ld [wd11e], a + ld a, [hl] + ld [wCurSpecies], a + ld [wPokedexNum], a call GetMonHeader ld bc, (wPartyMon1MaxHP + 1) - wPartyMon1Species add hl, bc @@ -224,7 +224,7 @@ GainExperience: call CopyData pop hl ld a, [wPlayerBattleStatus3] - bit 3, a ; is the mon transformed? + bit TRANSFORMED, a jr nz, .recalcStatChanges ; the mon is not transformed, so update the unmodified stats ld de, wPlayerMonUnmodifiedLevel @@ -257,8 +257,8 @@ GainExperience: call LoadScreenTilesFromBuffer1 xor a ; PLAYER_PARTY_DATA ld [wMonDataLocation], a - ld a, [wd0b5] - ld [wd11e], a + ld a, [wCurSpecies] + ld [wPokedexNum], a predef LearnMoveFromLevelUp ld hl, wCanEvolveFlags ld a, [wWhichPokemon] @@ -267,7 +267,7 @@ GainExperience: predef FlagActionPredef pop hl pop af - ld [wCurEnemyLVL], a + ld [wCurEnemyLevel], a .nextMon ld a, [wPartyCount] @@ -312,7 +312,7 @@ DivideExpDataByNumMonsGainingExp: jr nz, .countSetBitsLoop cp $2 ret c ; return if only one mon is gaining exp - ld [wd11e], a ; store number of mons gaining exp + ld [wTempByteValue], a ; store number of mons gaining exp ld hl, wEnemyMonBaseStats ld c, wEnemyMonBaseExp + 1 - wEnemyMonBaseStats .divideLoop @@ -320,7 +320,7 @@ DivideExpDataByNumMonsGainingExp: ldh [hDividend], a ld a, [hl] ldh [hDividend + 1], a - ld a, [wd11e] + ld a, [wTempByteValue] ldh [hDivisor], a ld b, $2 call Divide ; divide value by number of mons gaining exp |
