Skip to content

Zenkai Opcode StackRandChance

Johnathon edited this page Sep 16, 2026 · 1 revision

StackRandChance

Pops a percentage-like value and pushes whether a random roll succeeded against it.

Syntax

StackRandChance(percent)

Parameters

percent
Integer
Chance out of 100 (or similar scale — not fully confirmed).

Remarks

Pushes a boolean (1 = hit, 0 = miss) onto the VM stack.

Pops a percentage-like value and pushes whether a random roll succeeded against it. Pair with JumpIfFalse to gate a script branch on a chance roll.

Examples

Minimal illustrative encoding (synthetic, not from a real ROM script):

0x00, N           // PushByte(percent)
0x02, 0x12        // Step -> BytecodeVM_StackRandChance

See Also

Applies To

Game Notes
Legacy of Goku 2 Supported

Clone this wiki locally