Repository navigation
feat(timing): level/total timers, per-level best score+time, win stats, checkpoint bonus - #6
Merged
Merged
Conversation
…s, checkpoint bonus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
B5 — Tid & statistik (speedrun-vänligt)
src/core/Timer.ts— per-nivå + total run-tid, start/stop/pause/resume kopplat till state machine, format mm:ss.xxsrc/save/unlocks.ts— vapenlås-trösklar som data (Puls 0, Spridare 10 000, Piercer 25 000, Studsare 50 000, Fragment 100 000, Nova 200 000) +unlockedWeaponsFor/nextWeaponUnlock/idempotentsyncWeaponUnlocksför kommande vapenvågsrc/game/RunStats.ts— checkpoint-bonus (500 p), fragmentpoäng viaFRAGMENT_POINT_VALUES, deaths, game-over-reset (bankade totals behålls),completeLevel()-snapshot → save + vinstskärmsrc/ui/win.ts—buildWinSummary()(total/lifetime-poäng, total tid, fragment per typ, checkpoints, deaths, best-run) för alla 7 nivårader + minimalDomWinScreen(platshållare för Våg C)Avvikelser: checkpoint-bonus satt till 500 p (planen sa bara "små bonuspoäng"); vinstrader för ej byggda nivåer 4–7 använder syntetiska id:n tills de byggs (auto-resolveras senare); ingen gameplay-event-koppling än (spelaren är inte live i demon — integrationspunkter dokumenterade i RunStats).
Verifierat: typecheck 0 fel, 189/189 tester (46 nya), build + lint clean.