---
name: deterministic-crit
description: Replace frustrating RNG crit dice (where 50% crit rate still suffers a 5-miss dry streak in 55.2% of 50-swing runs) with a 3-formula deterministic charge-stage crit architecture: flat stage damage scaling (damage = 5 + stages * 4, +5 upgraded), a dual-channel guaranteed crit gate (crit_ready = (cards >= 2) || (stages >= 3)), and an independent 1.5x final multiplier (17 * 1.5 = 25) accelerated by a 0-AP tempo card that charges 2 held cards at once. Use in roguelike deckbuilders, tactical RPGs, or action games where finishers should reward calculation instead of coin-flip luck.
---

# Deterministic Crit & Charge-Stage Finisher Contract

Raw 50% crit RNG feels rigged to players because human intuition underestimates streak math: across 50 independent attacks at 50% crit chance, the exact Markov-chain probability of suffering at least **5 consecutive non-crits** is **55.2%** (more than 1 in 2 runs!).

Replace coin-flip crit anxiety with **player-controlled, 100% deterministic crits** built on 3 hard formulas:

## 1. The 3 Mandatory Formulas

1. **Formula 01 — Replace Crit Chance with Linear Charge Stages**:
   - Let players hold/charge cards across turns and compute flat base damage strictly from consumed stages:
     `baseDamage = 5 + stages * 4` (or `5 + stages * 5` when upgraded).
   - Progression: `0 stages -> 5`, `1 -> 9`, `2 -> 13`, `3 -> 17`. Every investment yields an exact, calculable payoff.
2. **Formula 02 — Dual-Channel Guaranteed Crit Gate (`OR` Condition)**:
   - Lock **100% guaranteed crit** (zero RNG roll) whenever EITHER threshold is met:
     `crit_ready = (chargedCards >= 2) || (totalStages >= 3)`
   - **Channel A**: Consume `>= 2` charged cards (wide tempo route).
   - **Channel B**: Consume `>= 3` total charge stages across held cards (tall focus route).
   - Two valid routes keep tactical flexibility high while guaranteeing zero dry-streak heartbreak on lethal finishers.
3. **Formula 03 — Independent `1.5×` Final Multiplier + 0-AP Tempo Accelerator**:
   - Multiply the post-stage base damage cleanly by an independent `1.5×` crit bracket:
     `finalDamage = crit_ready ? Math.floor(baseDamage * 1.5) : baseDamage`
   - Example at 3 stages: `floor(17 * 1.5) = 25` guaranteed crit!
   - Pair the finisher with a **`0 AP` tempo card** (e.g. *Sheath Focus* / `并鞘蓄锋`: `+1 stage` to 2 held cards at 0 cost) so players can assemble a full 100% crit lethal burst inside a single explosive turn.

## 2. Verification Checklist
- [ ] Exact Markov-chain probability check confirms `computeDryStreakProbability(50, 5, 0.5) === 55.2`.
- [ ] Base scaling returns `5, 9, 13, 17` for `0, 1, 2, 3` stages (`5, 10, 15, 20` when upgraded).
- [ ] `crit_ready` triggers `true` when `(chargedCards >= 2)` OR `(totalStages >= 3)` with zero random variance.
- [ ] 3-stage finisher outputs exactly `25` (`floor(17 * 1.5)`) unupgraded and `30` (`floor(20 * 1.5)`) upgraded.
- [ ] 0-AP tempo accelerator increments 2 held cards by `+1` stage each (respecting per-card stage cap) without spending action points.
