About

History

Originally a 2019 BYU CS 235 (Data Structures) Lab 1 — a C++ exercise in inheritance and polymorphism. The original code parsed text files of instructions, created fighters in an arena, and ran battles to a deterministic output for grading.

Modernized in 2026 as a TypeScript port with a Next.js UI on Vercel. The battle math is preserved exactly — same damage formulas, same regeneration rates, same ability costs. Original C++ archived at github.com/matthewtannyhill/RPG.

Battle rules

Classes

🤖 Robot — damage = strength + ability bonus. Shockwave Punch (5 energy): bonus damage = strength × (energy/max)⁴. Max energy = 2 × magic.

🏹 Archer — damage = current speed. Quickstep (free): speed +1 per use, persists until reset.

✨ Cleric — damage = magic. Healing Light (25 mana): HP + floor(magic/3). Max mana = 5 × magic; regenerate also restores mana.

Stack

Next.js 16, React 19, Tailwind 4, TypeScript. Pure client-side — no backend, no database. The battle simulator is deterministic and runs entirely in the browser.