Document gameplay logic and controls

This commit is contained in:
chris 2025-11-20 10:45:48 -05:00
parent feec0f39fb
commit 394693f049

View File

@ -1,23 +1,30 @@
# Hogwarts Arithmancy Flash Cards
Interactive, themeable multiplication drill game with a Hogwarts aesthetic. Solve equations quickly to push back the “dementor” overlay, earn gold, buy cosmetics, and track mastery.
Interactive, themeable multiplication drill game with a Hogwarts aesthetic. Solve equations quickly to push back the “dementor” overlay, earn gold, buy cosmetics, and track mastery. Supports keyboard play and a quick-use consumables bar.
## Highlights
- Progressive levels tied to specific fact sets; mastery is earned per fact.
- Dementor pressure overlay with growing dark circles and responsive glow on keypad/equation.
- Gold + shop for skins, trails, pets; golden snitch bonus events.
- Hint grid for misses, trouble-list focus, XP → queued fact practice (no auto-master).
- Progressive levels tied to specific fact sets; XP queues focus facts (no auto-master).
- Dementor pressure overlay + CAST timer that scales with problem difficulty.
- Keyboard + on-screen keypad; quick consumables bar for instant use.
- Gold shop: skins (Houses, Marauders Map, Spellbook), trails, pets; snitch bonuses (infrequent, hides when dementor is near).
- Hint grid after repeated misses; darker overlays brighten UI/text for readability.
- Persistent progress via `localStorage`.
## Play
1) Open `index.html` in a browser (or serve the folder with any static server).
2) Tap numbers to answer; `CAST SPELL` submits, `C` clears, `⌫` deletes.
3) Earn gold/XP on correct answers; spend gold in the Student Trunk; track stats via the report card.
2) Enter answers via keypad or keyboard (`09`, `Backspace`, `C`/`Esc` to clear, `Enter` to CAST).
3) Earn gold/XP on correct answers; spend gold in the Student Trunk; quick-use consumables from the bar under the keypad.
## Gameplay logic
- Timer: CAST bar drains with dementor; duration scales with problem difficulty (larger factors give more time). Timer-out counts as a third miss after a brief grace period.
- Miss flow: 1st miss shakes; 2nd miss shakes + shows star grid; 3rd miss (or timeout) auto-fills the answer, adds to trouble list, and requires pressing CAST to continue.
- Focus facts: XP fills queue entries instead of auto-mastering; queued facts are injected into upcoming questions.
- Snitch: appears rarely (4575s) and only when dementor pressure is low; grants bonus gold when clicked.
- Data/key: `arithmancyDataV17` stored in `localStorage`.
## Development
- Tech: vanilla HTML/CSS/JS (no build step).
- Entry points: `index.html`, `style.css`, `app.js`.
- Save data key: `arithmancyDataV17` in `localStorage`.
## License
MIT License. See `LICENSE` for details.