suloku's modernised Exp. All

suloku dropped a really good guide on implementing modern Exp. All into RBY, making the item actually useful.

This basically fixes all the issues, but does expose one thing: Gaining Exp takes...a long time. So when you have one Pokemon KO another and have 5 others in waiting, the load time before leaving the battle will take about 3 seconds. This is definitely disorientating, but is still much, much, much faster than the original.
This commit is contained in:
Llinos Evans 2023-07-27 21:54:31 +01:00
parent 47f2683d85
commit 754e1cdf28
5 changed files with 53 additions and 28 deletions

View file

@ -877,6 +877,9 @@ FaintEnemyPokemon:
push af
jr z, .giveExpToMonsThatFought ; if no exp all, then jump
; Features suloku's exp all modernisations https://pastebin.com/23r3tLSc
; Basically, we have to make it round up to not lose that crumb of exp points
; the player has exp all
; first, we halve the values that determine exp gain
; the enemy mon base stats are added to stat exp, so they are halved
@ -884,7 +887,11 @@ FaintEnemyPokemon:
ld hl, wEnemyMonBaseStats
ld b, $7
.halveExpDataLoop
ld a, [hl]
and a, $01
srl [hl]
add a, [hl]
ld [hl], a
inc hl
dec b
jr nz, .halveExpDataLoop