Skip to main content

Pick Bonus

A pick-and-reveal bonus that shuffles a hidden pool of prizes and end markers once from the seeds, then reveals one tile per pick. Stateful maths node that also compiles to the RGS.

Fire Start to build the pool: Prizes plus End Markers copies of End Value, shuffled once from Seeds[0] with a Park-Miller generator, so the same seed lays out the same pool in the editor preview and on the RGS. Seeds are read only when Start fires; wire them from ISAAC Random Number Array Generator array. Prizes may be numbers or strings such as FREE_SPINS; JSON text is accepted.

Per tap, set Pick Index (0-based) and fire Pick in the same update; the node waits for both. The prize at that index is revealed and, when numeric, added to Total. Revealing End Value ends the bonus with Last Is End true; so does reaching Max Picks (0 = unlimited) or emptying the pool. An out-of-range or already-revealed index, or a pick before Start, is ignored and Revealed Now stays false.

Revealed is [{ index, prize }] in pick order: drive the tile faces from it. Remaining Picks is -1 when uncapped, Last Prize is null when nothing was revealed this call, and Pool Size and Hidden Count size the board. Do re-emits the current state without changing it and Reset clears everything. On the RGS, where signals are booleans for the round, they apply in the order reset, start, pick.

Start with an empty Prizes list, or without seeds, fails closed: the node logs the reason, writes it to inspect data, empties every output and still fires Done; the stored state is not touched. In the editor preview the inspector shows the whole state, pool included, for debugging.

The shuffled pool is deliberately never an output. Only revealed tiles leave the node, and on the RGS the state stays in the session's round state while the response carries only the output ports, so unrevealed prizes never reach the browser. State persists across rounds for identified players only; a guest session starts fresh every round, so a bonus spread over several requests needs an identified player.

Inputs​

Parameters​

DataDescription
Prizes (array)One prize per tile: numeric prizes are summed into Total, strings such as FREE_SPINS are revealed only; array or JSON text. Default [].
End Markers (number)How many End Value tiles join the pool; negative values count as 0. Default 1.
End Value (string)The tile that ends the bonus when revealed, matched exactly. Default END.
Max Picks (0 = unlimited) (number)Maximum picks before the bonus ends; 0 means unlimited. Default 0.
Pick Index (number)0-based index of the tile the player chose; set it together with Pick. Default -1.
Seeds (array)Random seeds, wired from ISAAC Random Number Array Generator array. Required; the node refuses to run unseeded. Read only when Start fires.

Actions​

SignalDescription
DoRuns the node.
StartBuilds and shuffles the pool from the seeds, clearing any earlier progress.
PickReveals the tile at Pick Index; ignored before Start, after the end, out of range or already revealed.
ResetClears the node's state and starts again.

Outputs​

Events​

SignalDescription
DoneFires when the node has finished, on success and failure alike.

Results​

DataDescription
Revealed (array)Tiles revealed so far, [{ index, prize }] in pick order.
Total (number)Sum of the numeric prizes revealed so far.
Remaining Picks (number)Picks left before the cap; -1 when Max Picks is 0.
Ended (boolean)true once an end tile, the pick cap or an empty pool has finished the bonus.
Active (boolean)true from Start until the bonus ends.
Last Prize (any)The prize revealed by this call; null when nothing was revealed.
Last Is End (boolean)true when the tile revealed by this call was End Value.
Revealed Now (boolean)true when this call revealed a tile.
Pool Size (number)Tiles in the pool: prizes plus end markers.
Picks Made (number)Picks accepted since Start.
Hidden Count (number)Tiles not yet revealed.

Usage​

  1. Wire ISAAC Random Number Array Generator array into Seeds.
  2. Set Prizes, End Markers, End Value and Max Picks (0 = unlimited).
  3. Fire Start when the bonus is awarded and size the board from Pool Size.
  4. On each tap, set Pick Index and fire Pick together; redraw the tiles from Revealed.
  5. When Ended turns true, pay Total and fire Reset before the next award.
caution

Fire Start once per award, not once per round: every Start reshuffles the pool and clears the progress so far.