summaryrefslogtreecommitdiff
path: root/home/random.asm
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2020-11-04 00:06:44 -0600
committerdannye <33dannye@gmail.com>2020-11-04 00:06:44 -0600
commit5647ca687b92954dcf37a6ea6bfbc9a341c32de4 (patch)
treedde1937a1bfdb3a835f4155e1c2eb8f1aaf86f63 /home/random.asm
parent53fcd05aa24693093d8af1dc8ec4fedd3957decc (diff)
Sync with pokered
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
new file mode 100644
index 00000000..33a24425
--- /dev/null
+++ b/home/random.asm
@@ -0,0 +1,12 @@
+Random::
+; Return a random number in a.
+; For battles, use BattleRandom.
+ push hl
+ push de
+ push bc
+ farcall Random_
+ ldh a, [hRandomAdd]
+ pop bc
+ pop de
+ pop hl
+ ret