summaryrefslogtreecommitdiff
path: root/home/random.asm
diff options
context:
space:
mode:
Diffstat (limited to 'home/random.asm')
-rw-r--r--home/random.asm12
1 files changed, 12 insertions, 0 deletions
diff --git a/home/random.asm b/home/random.asm
index e150312..80938d0 100644
--- a/home/random.asm
+++ b/home/random.asm
@@ -30,3 +30,15 @@ Random::
ldh [hRandomSub], a
pop bc
ret
+
+BattleRandom::
+ ldh a, [hROMBank]
+ push af
+ ld a, BANK(_BattleRandom)
+ call Bankswitch
+ call _BattleRandom
+ ld [wPredefHL + 1], a
+ pop af
+ call Bankswitch
+ ld a, [wPredefHL + 1]
+ ret