Manipulation System

Status: Designed Author: Nathan + Claude Last Updated: 2026-03-29 Implements Pillar: Meaningful Choices, Emergent Combos

Overview

The Manipulation System gives players active tools to modify dice during the roll phase of combat. It has two layers: innate abilities (permanent, mana-gated, used every turn) and consumables (single-use items, free to play, found as loot). Relics remain passive. This system is the primary source of player agency beyond hold/reroll — without it, turns reduce to "reroll and hope." With it, players craft hands deliberately.

Player Fantasy

"I'm not just rolling dice — I'm cheating fate." The player should feel like a cunning gambler who always has a trick up their sleeve. Innate abilities provide a steady baseline of control ("I can always nudge a die"), while consumables are dramatic moments of power ("I've been saving this Clone for the boss — watch this five-of-a-kind"). The tension of when to spend a rare consumable mirrors Balatro's Tarot card decisions.

Detailed Design

Core Rules

Layer 1: Innate Abilities

  1. Each run starts with 2 innate ability slots, populated by the character's starting kit.
  2. Default starting kit (Adventurer):
    • Nudge (1 mana): Select a die, change its value by +1 or -1. Cannot go below 1 or above the die's max face value. Can be used multiple times per turn if mana allows.
    • Reroll+ (1 mana): Gain +2 rerolls this turn. Stacks with base rerolls and relic bonuses. Can be used multiple times per turn.
  3. Innate abilities can only be used during the roll phase (before scoring).
  4. Using an innate ability does NOT consume a reroll.
  5. Mana resets to max_mana at the start of each turn.
  6. Base max_mana = 3. Modified by relics (Mana Crystal: +1).
  7. Future character classes replace the default innates (architecture supports this, not implemented now).

Layer 2: Consumables

  1. Players carry up to 5 consumables at a time. Attempting to gain a 6th requires discarding one first.
  2. Consumables are free to use — no mana cost.
  3. Consumables are single-use — removed from inventory after playing.
  4. Consumables can only be used during the roll phase (before scoring).
  5. Sources: combat rewards, shop purchases, rest site events (rare).
  6. Consumable pool (8 types):
IDNameRarityTargetEffect
set_dieSet DieUncommon1 dieSet the die to any face value (1 through max faces)
cloneCloneUncommon2 diceCopy source die's value onto target die
flipFlipCommon1 dieFlip to opposite face: 1↔6, 2↔5, 3↔4 (for d6). Formula: max_face + 1 - current
add_dieAdd DieRarenoneRoll one extra temporary d6. Removed after scoring this turn.
lockLockCommon1 dieLock the die — keeps its value into the next turn (survives roll_all). Unlock after that turn.
transmuteTransmuteUncommon1 dieUpgrade die from d6→d8 for this turn only. Re-rolls it with new range. Reverts after scoring.
salvageSalvageUncommonnoneIf current hand is HIGH_DIE, score as sum_of_all_dice × 2 instead. No effect on better hands.
shatterShatterRare1 dieDestroy a die to deal value × 10 direct damage to target enemy. Die is removed for rest of combat, restored after.

Targeting Flow (UX)

  1. Player clicks a consumable slot or innate ability button.
  2. If the ability needs a target die: UI enters targeting mode.
    • Dice glow/pulse to indicate they're selectable.
    • Phase label shows "Select a die…" (or "Select source die…" / "Select target die…" for Clone).
    • Clicking a die applies the effect.
    • Right-click or pressing Escape cancels targeting mode.
  3. If the ability needs a second target (Clone): after selecting source, prompt for target die.
  4. If the ability needs a value choice (Set Die): after selecting die, show value picker (1 through max faces).
  5. If the ability needs no target (Add Die, Salvage, Reroll+): effect applies immediately on click.
  6. Innate: Nudge shows ±1 buttons on the selected die (or up/down arrows).

States and Transitions

StateDescriptionValid Actions
IDLENormal roll phase, no ability selectedClick die (hold/unhold), Reroll, Score, click ability/consumable
TARGETING_DIEAbility selected, waiting for die pickClick die (applies effect), right-click/Esc (cancel)
TARGETING_SECONDClone selected source, waiting for targetClick different die (applies clone), right-click/Esc (cancel)
CHOOSING_VALUESet Die targeting done, choosing valueClick value button (1-N), right-click/Esc (cancel)
NUDGE_DIRECTIONNudge selected a die, choosing ±1Click +1 or -1, right-click/Esc (cancel)

Transitions:

  • IDLE → TARGETING_DIE: click consumable/innate that needs a die target
  • IDLE → (effect applied): click consumable/innate with no target needed
  • TARGETING_DIE → CHOOSING_VALUE: die selected for Set Die
  • TARGETING_DIE → NUDGE_DIRECTION: die selected for Nudge
  • TARGETING_DIE → TARGETING_SECOND: source die selected for Clone
  • TARGETING_SECOND → IDLE: target die selected, clone applied
  • CHOOSING_VALUE → IDLE: value picked, Set Die applied
  • NUDGE_DIRECTION → IDLE: direction picked, Nudge applied
  • Any targeting state → IDLE: cancel (right-click/Esc)

Interactions with Other Systems

SystemDirectionInterface
DicePoolOutboundManipulation calls set_die_value(), add_die(), remove_die(), lock_die() + new flip_die(), nudge_die()
DiceCombatManagerBidirectionalOwns mana state, routes ability/consumable use, resets mana per turn
HandScorerDownstreamScores dice after all manipulations applied. No changes needed.
SoloGameManagerUpstreamTracks consumable inventory between combats, adds consumables to reward options
RelicDatabaseReadMana Crystal relic increases max_mana. Future relics may modify consumable effects.
UI (dice_combat_screen)OutboundEmits signals for mana changes, consumable use, targeting state. UI subscribes.

Formulas

Mana

max_mana = BASE_MANA + relic_bonus_mana
# BASE_MANA = 3
# mana_crystal relic: +1

mana_at_turn_start = max_mana  (full reset each turn)

Nudge

new_value = clamp(current_value + direction, 1, die.max_faces)
# direction ∈ {-1, +1}
# If already at boundary (1 or max), that direction is disabled

Flip

new_value = die.max_faces + 1 - current_value
# d6: 1↔6, 2↔5, 3↔4
# d8: 1↔8, 2↔7, 3↔6, 4↔5

Shatter

direct_damage = die_value × SHATTER_MULTIPLIER
# SHATTER_MULTIPLIER = 10
# Die is removed from pool for remainder of combat
# Pool restored to pre-combat state after combat ends

Salvage

if hand_type == HIGH_DIE:
    score = sum(all_dice_values) × SALVAGE_MULTIPLIER
    # SALVAGE_MULTIPLIER = 2
else:
    no effect (consumable still consumed)

Reward Rates

# After combat, reward options (pick 1 of 3):
#   - Relic (weight 3)
#   - Consumable (weight 4)
#   - Gold (weight 3)
# Consumables appear more frequently since they're single-use

# Shop prices:
#   Common consumable: 15 gold
#   Uncommon consumable: 30 gold
#   Rare consumable: 50 gold

Edge Cases

ScenarioResolution
Nudge at boundary (die = 1, nudge -1)Disable the -1 button. Only +1 is available. Same for max face.
Flip a non-standard die (d8, crystal)Formula max + 1 - value works for any die. Crystal die [2,2,4,4,6,6]: flip 2→5, but 5 isn't a face. Resolution: Flip uses the die's actual value, not face list. Result may be a value not on the face list — that's fine, the value is what matters for scoring.
Clone onto a locked dieAllowed. Clone overwrites the current value. Lock preserves the new value into next turn.
Set Die on a d8Value picker shows 1-8 (die's max faces).
Add Die when pool already at maxNo hard max on dice count. The temporary die is added and removed after scoring.
Shatter last diePrevented — cannot Shatter if only 1 die remains in pool.
Shatter a temporary die (from Add Die)Allowed. Deals damage, temp die is removed. No lasting pool loss.
Salvage with hand better than HIGH_DIEConsumable is consumed but no effect. Player is warned in targeting mode: "Only works on High Die hands."
Use consumable when inventory full + rewardBefore adding, show discard picker: "Inventory full. Discard one to make room?"
Mana at 0, try to use innateButton disabled. Greyed out with "Not enough mana" tooltip.
Transmute — what happens to held status?Transmuted die is unheld and re-rolled with new range.
Lock + next turn roll_allroll_all() already skips locked dice. Lock consumable sets locked = true, which persists one turn, then auto-unlocks at the start of the following turn.
Cancel during targetingReturn to IDLE, no effect applied, consumable/mana not spent.

Dependencies

SystemDirectionHard/SoftInterface
DicePoolHardManipulation cannot function without dice to modify
DiceCombatManagerHardOwns combat flow, mana state, and turn lifecycle
HandScorerSoftScoring happens after manipulation; scorer doesn't know about manipulation
SoloGameManagerHardOwns consumable inventory persistence between combats
RelicDatabaseSoftMana Crystal relic boosts max_mana; future relics may interact
StatusEffectSystemSoftFuture: status effects could disable abilities (e.g., "Silenced" prevents innates)
EnemyDatabaseNoneEnemies don't interact with manipulation directly

Tuning Knobs

KnobDefaultSafe RangeBreaks If
BASE_MANA32–5<2: innates unusable most turns. >5: too much control, dice rolls irrelevant
MAX_CONSUMABLE_SLOTS53–7<3: too scarce, feels bad. >7: hoarding, choice paralysis
NUDGE_MANA_COST11–20: free manipulation breaks difficulty. >2: never used
REROLL_PLUS_MANA_COST11–2Same as Nudge
REROLL_PLUS_AMOUNT21–3>3: infinite rerolls with mana, trivializes rolling
SHATTER_MULTIPLIER105–15<5: not worth losing a die. >15: always shatter high dice
SALVAGE_MULTIPLIER21.5–3.0<1.5: worse than just scoring normally. >3: intentionally aim for bad hands
CONSUMABLE_REWARD_WEIGHT42–6<2: too rare, system feels absent. >6: floods inventory
SHOP_PRICE_COMMON1510–25<10: trivial to buy. >25: never bought
SHOP_PRICE_UNCOMMON3020–45Same scaling
SHOP_PRICE_RARE5035–75Same scaling

Acceptance Criteria

  1. Mana display: Mana shows in combat UI, decrements on innate use, resets each turn.
  2. Nudge works: Clicking Nudge → die → ±1 changes die value. Mana deducted. Boundary clamped.
  3. Reroll+ works: Clicking Reroll+ adds 2 to reroll counter. Mana deducted.
  4. All 8 consumables function: Each consumable applies its effect correctly per the rules table.
  5. Targeting flow: Click consumable → targeting mode → click die → effect. Esc cancels. No mana/consumable spent on cancel.
  6. Consumable persistence: Consumables carry between combats via SoloGameManager.
  7. Consumable rewards: Consumables appear as reward options after combat.
  8. Inventory limit: Cannot exceed 5 consumables. Prompted to discard when full.
  9. Shatter guard: Cannot shatter last remaining die.
  10. Lock persistence: Locked die survives into next turn, then auto-unlocks.
  11. Temporary die cleanup: Add Die's extra die is removed after scoring.
  12. Hand preview updates: Dice preview (hand name + score) updates live after any manipulation.
  13. Scoring unaffected: HandScorer produces correct results regardless of how dice values were set.
Built with LogoFlowershow