-
Notifications
You must be signed in to change notification settings - Fork 0
Zenkai Opcode StackRand
Johnathon edited this page Sep 16, 2026
·
1 revision
Pops the upper bound and pushes a random value below it.
StackRand(max)max
Integer
Exclusive upper bound.
Pushes a random integer in [0, max) onto the VM stack.
Pops the upper bound and pushes a random value below it. Use with JumpIfFalse/comparisons for branching scripts (e.g. random encounter chance).
Minimal illustrative encoding (synthetic, not from a real ROM script):
0x00, N // PushByte(max)
0x02, 0x11 // Step -> BytecodeVM_StackRand| Game | Notes |
|---|---|
| Legacy of Goku 2 | Supported |