diff options
author | PikalaxALT <PikalaxALT@gmail.com> | 2015-11-11 14:12:46 -0500 |
---|---|---|
committer | PikalaxALT <PikalaxALT@gmail.com> | 2015-11-11 14:12:46 -0500 |
commit | b522b0f165b6aae278ca9b4b18bada606d4ae737 (patch) | |
tree | 15d4c8be83f1eb658fe40f384d11eddd0354f888 /battle/core.asm | |
parent | 4b35fa05829eb5257186699d8a8e44362905468c (diff) |
engine/mart.asm
Diffstat (limited to 'battle/core.asm')
-rw-r--r-- | battle/core.asm | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/battle/core.asm b/battle/core.asm index cce4daf74..ab7e31f08 100644 --- a/battle/core.asm +++ b/battle/core.asm @@ -7389,6 +7389,7 @@ FinishBattleAnim: ; 3ee27 GiveExperiencePoints: ; 3ee3b ; Give experience. +; Don't give experience if linked or in the Battle Tower. ld a, [wLinkMode] and a ret nz @@ -7499,20 +7500,20 @@ endr jr z, .no_boost .boosted - call DoubleExp + call BoostExp ld a, $1 .no_boost ld [StringBuffer2 + 2], a ld a, [wBattleMode] dec a - call nz, DoubleExp + call nz, BoostExp push bc ld a, MON_ITEM call GetPartyParamLocation ld a, [hl] cp LUCKY_EGG - call z, DoubleExp + call z, BoostExp ld a, [hQuotient + 2] ld [StringBuffer2 + 1], a ld a, [hQuotient + 1] @@ -7796,14 +7797,18 @@ Function3f0d4: ; 3f0d4 ret ; 3f106 -DoubleExp: ; 3f106 +BoostExp: ; 3f106 +; Multiply experience by 1.5x push bc +; load experience value ld a, [hProduct + 2] ld b, a ld a, [hProduct + 3] ld c, a +; halve it srl b rr c +; add it back to the whole exp value add c ld [hProduct + 3], a ld a, [hProduct + 2] |