Skip to content

Immersive Terminal for RPGs v1.7.0

Choose a tag to compare

@flippelt flippelt released this 28 May 15:39
· 35 commits to main since this release

"Feelin' Lucky? ;)" β€” a one-shot d20 roll the player can pull right before tackling the decrypt minigame, for a chance at burned attempts or revealed letters. Feature suggested by Pedro Fuster.

✨ Features

  • decrypt luck roll. When the cipher minigame opens, a small popup sits above the wordle: type a number 1–20, hit Enter, and the d20 decides whether you walk in with an edge or a handicap.
    • Roll 1 β€” critical fail. Smiley ;_; with red jitter; 2 attempts burned as βœ— phantom rows at the top of the grid.
    • Rolls 2–9 β€” 1 attempt burned.
    • Rolls 10–14 β€” 1 letter of the target word revealed in a hint row above the grid.
    • Rolls 15–19 β€” 2 letters revealed.
    • Natural 20 β€” \o/ with green burst; 3 letters revealed.
  • One shot per file, persisted across cancels. Open, roll, press Esc, re-run decrypt on the same file β€” the popup stays gone AND the roll's effect (burned rows or revealed letters) is restored exactly as you left it. Cancelling without rolling or guessing keeps your shot available for next time.
  • Skip without using the slot: just start typing your guess in the wordle. Submitting any guess auto-dismisses the popup without burning the luck roll's consequences.
  • GM opt-out per file. Add decryptLuck: false to a file's front-matter to hide the popup entirely on that file β€” useful for hard-mode challenges where you don't want a bailout.
  • Reduced-motion respected. All luck animations (jitter, pulse, burst) are gated by prefers-reduced-motion.
  • Bilingual. Full English + Brazilian Portuguese translations for the title, label, result messages, and the "REVEALED" caption.

πŸ”§ Under the hood

  • New components: WordleLuckPopup.jsx and integration into DecryptGame.jsx.
  • New engine helpers in engine/wordle.js: rollLuck(n) (pure tier resolver) and pickRevealPositions(len, count, taken, rand) (deterministic with an injectable RNG, so tests pin the picks).
  • DecryptGame accepts initialLostByLuck and initialRevealed props seeded from Terminal's per-path luckEffects map, so the roll's outcome survives unmount/remount cycles.
  • 36 new tests covering: rollLuck tier boundaries (including the 15-overlap resolution), pickRevealPositions selection + pool exhaustion, the luck popup's autofocus / digit-only input / shake-on-invalid / hold-then-commit timing, the integration paths (roll, skip-via-guess, cancel-without-interaction), and the effect-persistence props (restored burned rows + restored hint row from initial state). 209 automated tests total (up from 176); lint + build clean.

πŸ› Fix tagging along

  • Fallout directive_06.md now has crackDC: 14 β€” crack correctly opens the roll dialog instead of falling straight through to the brute-force bar. (Audit found this was the only tracked locked file in the project missing its DC.)

Credits

Luck roll idea + spec: Pedro Fuster. Thanks Pedro!