Difficulty picker (Easy/Normal/Hard) and a balance pass
Difficulty: - TD.DIFFICULTIES (starting credits, lives, enemy hp/shield, kill reward), validated create-room / newgame option, state carries it; solo menu picker and co-op lobby picker (44px segmented control, reachable on every layout), HUD/room/end-screen labels, best-wave record per map AND difficulty (Normal keeps the legacy key), Play again keeps the running game's difficulty for host and guest Balance (12 bot runs, deterministic, 48/48 games replay identically in QA): - Normal ~71% bot wins at wave 30 (was 94%), Easy 100%, Hard 25% on open - credits tamed: reward growth 3% -> 2% per wave, clear bonus 10+2n -> 10+n, hp scaling eased, Rootkit pays 60 (was 100) but is tougher, flyers slower; unspent credits at wave 30: 1309 -> 335 - IDS Sniper is now a slow heavy hitter (essential, no longer sufficient: IDS-only dies by wave 7); Mortar, Arc and Filter buffed - Orbital Uplink price step per owned unit 30% (buy and upgrade) - remaining imbalances documented in docs/BALANCE.md Tests: difficulty (19) and balance (8) unit suites, 14-difficulty e2e, layout matrix reachability of the picker. 156 unit tests, 17 e2e scenarios. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tb8pW2KAN4oFkh1aK1BfD8
This commit is contained in:
parent
28502984ec
commit
b4ae6cb57d
19 changed files with 1348 additions and 156 deletions
|
|
@ -259,6 +259,10 @@ button.floating { position: absolute; right: 8px; bottom: 8px; background: rgba(
|
|||
#app[data-ui="compact"] .info-head canvas { width: 32px; height: 32px; }
|
||||
|
||||
#nextwave .panel { padding: 8px 10px; }
|
||||
#side h4 .dtag { margin-left: auto; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; font-size: 10px; letter-spacing: .1em; font-weight: 700; color: var(--dim); } /* the game's difficulty, quietly */
|
||||
#side h4 .dtag[data-d="easy"] { color: var(--green); border-color: #1c6a55; }
|
||||
#side h4 .dtag[data-d="hard"] { color: var(--red); border-color: #6a2336; }
|
||||
#nextwave h4, #players h4 { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; }
|
||||
.wv { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-family: var(--mono); font-size: 12.5px; }
|
||||
.wv .e { display: inline-flex; align-items: center; gap: 4px; }
|
||||
.wv .e i { width: 12px; height: 12px; display: inline-block; background: var(--c); flex: none; } /* shape per enemy kind, not just a colour (see .sh-*) */
|
||||
|
|
@ -299,8 +303,22 @@ button.floating { position: absolute; right: 8px; bottom: 8px; background: rgba(
|
|||
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
|
||||
.row.small { margin-top: 4px; }
|
||||
.row > .big { flex: 1 1 180px; }
|
||||
.opts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; } /* difficulty selector goes here */
|
||||
.opts { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 10px; } /* the difficulty selector */
|
||||
.opts:empty { display: none; }
|
||||
/* segmented control (difficulty): one radiogroup of equal buttons, every one a full 44px touch target. The checked one is marked by a
|
||||
* tick and a cyan frame, never by colour alone, and it is NOT .primary (the dialogs focus their first .primary button). */
|
||||
.seg { display: flex; width: 100%; max-width: 380px; border: 1px solid #2c4372; border-radius: 12px; overflow: hidden; background: var(--panel); }
|
||||
.seg button { position: relative; flex: 1 1 0; min-width: 0; min-height: 44px; border: 0; border-radius: 0; background: transparent; padding: 0 4px; font-size: 15px; font-weight: 600; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; line-height: 44px; }
|
||||
.seg button + button { border-left: 1px solid var(--line); }
|
||||
.seg button:hover { background: #15233f; color: var(--text); }
|
||||
.seg button[aria-checked="true"] { background: #0f3550; color: var(--cyan); box-shadow: inset 0 0 0 2px var(--cyan); }
|
||||
.seg button[aria-checked="true"]::after { content: "\2713"; position: absolute; top: 3px; right: 6px; font-size: 11px; line-height: 1; } /* the tick sits in the corner so it never takes room from the word */
|
||||
.seg button:focus-visible { outline-offset: -4px; }
|
||||
.diffnote { margin: 0; min-height: 2.7em; max-width: 380px; text-align: center; color: var(--dim); font-size: 12.5px; line-height: 1.3; }
|
||||
.diffnote.live { min-height: 1.3em; } /* a game is running: one short line saying which difficulty it is on */
|
||||
.diffnote:empty { display: none; }
|
||||
@media (max-width: 480px) { .seg button { font-size: 14px; } }
|
||||
@media (max-height: 640px) { .diffnote:not(.live) { display: none; } .opts { margin-bottom: 8px; } } /* small phones: the description makes way for the maps and buttons */
|
||||
.msg { min-height: 1.4em; text-align: center; color: var(--amber); margin: 0 0 4px; }
|
||||
.msg.bad { color: var(--red); }
|
||||
.msg:empty { min-height: 0; margin: 0; }
|
||||
|
|
@ -422,7 +440,7 @@ input.code { text-align: center; letter-spacing: .5em; font-family: var(--mono);
|
|||
|
||||
/* Windows high contrast: selection must not depend on colours the UA replaces */
|
||||
@media (forced-colors: active) {
|
||||
.tbtn.sel, .mapcard[aria-checked="true"], button.toggle[aria-pressed="true"], button#btnPause[aria-pressed="true"] { outline: 3px solid Highlight; outline-offset: -3px; forced-color-adjust: none; background: Highlight; color: HighlightText; }
|
||||
.tbtn.sel, .mapcard[aria-checked="true"], .seg button[aria-checked="true"], button.toggle[aria-pressed="true"], button#btnPause[aria-pressed="true"] { outline: 3px solid Highlight; outline-offset: -3px; forced-color-adjust: none; background: Highlight; color: HighlightText; }
|
||||
.tbtn.sel .nm, .tbtn.sel .cost, .mapcard[aria-checked="true"] .df, .mapcard[aria-checked="true"] .df b { color: HighlightText; }
|
||||
.overlay { background: Canvas; }
|
||||
#side { border-color: CanvasText; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue