Commit Graph

32 Commits

Author SHA1 Message Date
Brian Fertig a91db38a0f feat(civilization): balance difficulty combat, enhance UI tooltips, and improve setup flow
- Introduce difficulty-based combat multipliers and veteran promotion chances (Chieftain/Warlord eased, Prince+ neutral)
- Randomize leader selection on setup screen and add dynamic portrait with pick speech
- Replace inline hover text with a centralized Tooltip component for tech tree, foreign cities, and buildings
- Add descriptive flavor text for governments and terrain improvements
- Add building completion notifications with a "VIEW CITY" action button
- Expand deferred city attack cinematics to cover explored rival cities
- Improve Tempest flipper AI to scale lane-flipping chance/cooldown with level and enable climbing flips
- Add verification tests for difficulty combat modifiers and veteran rates
2026-07-16 23:22:29 -06:00
Brian Fertig 0f2fc829c8 feat: add Tempest arcade game and Civilization tooltips
- Add Tempest (Atari 1981 vector arcade clone) with full simulation logic,
  Phaser rendering scene, vector font, and headless verification suite
- Register Tempest in games registry, main scene list, and game room dispatch
- Add reusable Tooltip UI component for hover-based information display
- Add Civilization unit/building tooltips in city screen and map hover
  (CivilizationTooltips.js with flag and effect descriptions)
- Update Civilization click handling to distinguish hover-only from real
  click targets via hoverOnly data flag
- Update civilization-units and game-icons assets
2026-07-16 20:05:00 -06:00
Brian Fertig 237a024f80 feat(civ): add status log panel, event announcements, smooth camera pan, and city sprites
- Add bottom-right status log panel with scrollable entries, word wrap,
  mask clipping, and mouse wheel scrolling; cap at 60 entries
- Replace toast popups with announceStatus() for major events (war, tech,
  first contact, city founded, trade routes, huts) — centered modal with
  CONTINUE button that animates into the log; supports queued popups and
  custom onDismiss callbacks (e.g. first contact opens diplomacy)
- Add smooth panToTile() tween for camera movement when selecting next unit,
  refactored clampPan into panBounds() reused by both clamp and tween
- Add classic city sprite sheet (civilization-cities-classic.png) and
  register it in artwork JSON and asset manifest
- Replace circular civ rings and selection ring with isometric ellipses
  matching the 2:1 tile ratio for better depth reading
- Paint tile neighbors in ascending c+r order during repaintTileAndNeighbors
  to prevent tall features from being overwritten by lower-sum neighbors
- Stop panTween on pointer down to avoid conflict with manual dragging
2026-07-16 13:48:39 -06:00
Brian Fertig def5c9904a feat(civ): add per-leader starting techs, union with trait techs, and setup background
Allow each opponent to declare their own 2-3 starting technologies in
opponents.json, independent of their civ trait. During game creation,
personal and trait-based starting techs are unioned (deduped) so
pioneering leaders with overlapping lists don't double-grant.

- Add optional setup screen background image (civilization-setup-bg)
- Update leader detail panel description to list personal starting techs
- Deduplicate trait + personal techs via Set in CivilizationLogic
- Add validation for startingTechs arrays, tech existence, 2-3 total count,
  and variety across leaders in verifyCivilization
- Add integration tests for personal tech granting and overlap deduplication
2026-07-16 10:31:25 -06:00
Brian Fertig 80d4a79593 feat(civ): add leader trait system with bonuses, starting techs, and UI
Introduce civTraits data structure with 8 traits (scientific, industrious,
commercial, philosophical, zealous, mercantile, pioneering, wealthy) that
provide science/gold/shield multipliers, starting gold, and starting
technologies. Assign each opponent a trait in opponents.json.

- Apply trait bonuses to starting gold and grant starting techs during
  game creation in CivilizationLogic
- Route trait multipliers into cityYields for science, gold, and production
- Add a leader detail panel to the setup screen showing name, trait name,
  and description, updated live when selecting leaders
- Add validation for civTraits in CivilizationRules (multipliers positive,
  starting techs valid, etc.)
- Add verification tests for trait application and city yield multipliers
- Nudge unit sprite position 5px down for better tile alignment
2026-07-16 10:31:02 -06:00
Brian Fertig 4d864503f2 fix: cap city shields at build cost to prevent overflow display
When a city cannot complete a build (e.g., size < 2 for settlers),
shields were accumulating past the build cost, showing confusing
values like "60/40 shields" or negative turn counts.

- Cap shieldBox at buildCost each turn in processCity
- Clamp displayed shields to min(shieldBox, cost) in city screen
- Add tests verifying shield capping and stalled build completion
2026-07-15 23:36:53 -06:00
Brian Fertig 325692fa35 feat(civ): animate combat events with attacker/defender ghosts and victory advance
- Capture attacker/defender snapshot (id, civ, type, start position) in
  combat events so the UI can reconstruct them after resolution
- Add `animateCombat()` that plays sequential lunge/retreat animations for
  each combat, death flash/shrink for the loser, and optional victory glide
  for unopposed winners stepping onto the cleared tile
- Add `animateUnitsAlong()` to glide AI civ units between before/after
  snapshots, enabling the same "resolve now, animate after" pattern for
  AI turns
- Track unit containers in `unitContainers` map for lookup by unitId
- When player unit encounters combat mid-path, animate the peaceful leg
  first then play the clash
- Add `collectNewCombatEvents()` to pick up and mark consumed combat events
- Add `isTileVisible()` helper for filtering AI combat to visible tiles
- Update tests to verify advance-after-kill and combat event shape
2026-07-15 23:26:29 -06:00
Brian Fertig 67a7ac857e feat: add Civilization II-lite game engine and UI
Implement a complete turn-based strategy game with:

- Deterministic headless engine: cities, units, combat, research, governments
- Seeded world generation with noise-based terrain, continents, quality scoring
- Isometric map renderer with procedural fallbacks and optional sprite sheets
- AI rivals with strategy phases, diplomacy, trade routes, and unit control
- Full UI: setup, city screen, tech tree, diplomacy, spaceship tracker, victory
- 80 techs, 51 units, 26 buildings, 11 terrains, 6 governments, 5 difficulties
- Comprehensive headless verification suite (rules integrity, worldgen, combat, AI self-play)
2026-07-15 18:56:02 -06:00
Brian Fertig e9ddebc891 refactor: improve Star Control ship rendering and ship picker UX
- Update ship sprite frame dimensions to match actual UQM rotation assets
- Parse .ani hotspot files to correctly center tightly-cropped ship frames
- Replace CRT overlay effect with native camera shake for hit/explosion feedback
- Fix camera zoom clamping to prevent ships from going off-screen on 16:9 display
- Correct ship rotation frame mapping (UQM sheets rotate clockwise)
- Add keyboard navigation to ship picker with focus rings and sound feedback
- Support both control clusters for hotseat and single-player ship selection
- Remove unused CRT overlay import and related cleanup code
- Update asset fetcher to handle per-frame hotspot alignment from .ani files
2026-07-15 11:45:08 -06:00
Brian Fertig 3f1d534ec2 feat: add Star Control space combat game
- Register Star Control in games registry as 2-player arcade game
- Import and register StarControlGame scene
- Add starcontrol slug mapping in GameRoomScene dispatch
- Load star-control-ships.json asset data in PreloadScene
- Add dynamic ship sprite sheet loading in asset manifest
- Update README to reflect new game in Arcade/Console/PC category
- Update game icons to include Star Control icon (frame 82)
2026-07-14 22:45:56 -06:00
Brian Fertig 8399cc69db Further Tweaks to Colorado Defense 2026-07-14 13:19:07 -06:00
Brian Fertig bfa2359ea2 Adjustments to Colorado Defense 2026-07-14 08:17:57 -06:00
Brian Fertig 6cef254dde refactor(coloradodefense): replace MIRV splitAt/splitDone with split-zone geometry
- Replace time-based splitAt/splitDone with screen-space Y zones (SPLIT_ZONE_1
  at top third, SPLIT_ZONE_2 at halfway) for more predictable MIRV behavior
- Add MIRV_RESPLIT_WAVE (wave 8): from wave 8 onward, MIRV buses split twice
  instead of once, creating more late-game pressure
- Lower early-game difficulty: MIRV starts at wave 3 (was 6), reduced base
  chance (0.05 vs 0.15), increased growth rate, lowered max (0.4 vs 0.5)
- MIRV trunk continues flying toward its target after each split
- Updated verification tests for split-zone geometry and new missile fields
- Cleaned up obsolete splitAt/splitDone fields across test fixtures
2026-07-13 19:53:41 -06:00
Brian Fertig db1e36a42c feat(coloradodefense): add chain reactions, inter-wave recap, vector skyline, and curved CRT
- Chain reaction explosions: player kills trigger delayed secondary blasts
  that can destroy nearby missiles (bounded to one extra tier)
- Inter-wave "COLORADO DEFENDED" recap animation showing surviving cities
  (+500 each) and leftover missiles (+25 each) with tallying sounds
- Dynamic wave bonus: replaced flat SCORE_WAVE_BONUS with per-surviving-city
  and per-remaining-missile bonuses, emitted in waveComplete event data
- Vector-style skyline: hand-authored Rocky Mountain ridgelines with snow
  caps, building presets for varied city skylines, wireframe silos/cities
- Minimal VectorFont module for the recap banner text
- Curved CRT overlay: WebGL barrel-distortion pipeline with chromatic
  aberration, sheen highlight, vignette, and pulse on impacts
- Three new 8-bit SFX: explode, explode2 (chain), count (tally)
- Updated verification tests for chain reactions, wave bonus breakdown
2026-07-13 19:52:55 -06:00
Brian Fertig dadf8c28dc feat(peggle): overhaul 7 powers with enhanced mechanics, visuals, and audio
Add character assets (sprites/videos) and sound effects for Aiko, Blackwind,
DV-8-2303, Kage, Nadia, Nicole, and Steve.

Power overhauls:
- Extreme Ball: lasts 2 shots, cascade splits into 4 balls on 2nd bounces
- Cannonball: adds Space Blast-style explosion on green peg trigger
- Beam Up: retargets to a clear-path orange peg on return
- Overclock: lasts 2 shots, grants free ball every 6 pegs, pitch-rising hum
- Laser Sweep: follow-up sweep on random orange peg after 1s delay
- Shadow Slash: follow-up slash on random orange peg after 1s delay
- Cosmic Bloom: adds small Space Blast around green peg
- Rewind: glitch effect, portal opens targeting clear orange peg, refunds on drain

Add visual effects (shockwave rings, portal animation, glitch bars, split
particles), happy reaction dedup per ball, and comprehensive verification
tests for all new mechanics.
2026-07-13 17:50:24 -06:00
Brian Fertig fa4ef2233b feat(peggle): overhaul 7 powers with enhanced mechanics, visuals, and audio
Add character assets (sprites/videos) and sound effects for Aiko, Blackwind,
DV-8-2303, Kage, Nadia, Nicole, and Steve.

Power overhauls:
- Extreme Ball: lasts 2 shots, cascade splits into 4 balls on 2nd bounces
- Cannonball: adds Space Blast-style explosion on green peg trigger
- Beam Up: retargets to a clear-path orange peg on return
- Overclock: lasts 2 shots, grants free ball every 6 pegs, pitch-rising hum
- Laser Sweep: follow-up sweep on random orange peg after 1s delay
- Shadow Slash: follow-up slash on random orange peg after 1s delay
- Cosmic Bloom: adds small Space Blast around green peg
- Rewind: glitch effect, portal opens targeting clear orange peg, refunds on drain

Add visual effects (shockwave rings, portal animation, glitch bars, split
particles), happy reaction dedup per ball, and comprehensive verification
tests for all new mechanics.
2026-07-12 15:29:55 -06:00
Brian Fertig 3942b0b89e Peggle Adjustments 2026-07-12 09:14:06 -06:00
Brian Fertig bb91a21c8d feat(peggle): weighted orange selection, Body Slam physics rework, and level adjustments
- Replace uniform orange peg selection with weighted sampling, favoring circle pegs over brick sections (~2:1 ratio) to keep gameplay peg-centric
- Rework Body Slam (The Smasher) power to launch at 0.7× speed with reduced gravity, aligning physics with updated power documentation
- Adjust orange/green peg counts for levels 26, 27, 30, and 32 to fine-tune difficulty
- Add Maurice character assets (PNG & MP4)
- Clean up redundant portrait emotion triggers and add verification tests for weighted sampling and slam ball behavior
2026-07-12 00:42:13 -06:00
Brian Fertig 733406a2a5 Added a bunch more levels 2026-07-11 23:36:01 -06:00
Brian Fertig f7d9ee12f1 feat: enhance peggle powers and add swdbg portrait reactions
- Multiball now spawns 3 additional balls fanned at ±18° instead of 1 mirrored ball
- Fireball scales ball radius by 3x
- Zen Ball grants 3 stacking charges, consuming one per shot
- Reduce base launch speed to 920 and add rotateVec utility for velocity rotation
- Update verification tests to match new power behaviors
- Add opponent portrait emotional reactions in SWDBG for expensive purchases and bounty defeats
2026-07-11 21:07:25 -06:00
Brian Fertig 58d51503eb Level Adjustments 2026-07-11 18:39:42 -06:00
Brian Fertig 51199534a6 More powers and videos 2026-07-11 17:22:40 -06:00
Brian Fertig fba1f0c53d feat(peggle): expand to 25 levels with friend intros and redesigned level select
Expand Peggle from 5 to 25 levels (5 per friend) with unique shapes and
progressive difficulty. Each friend block (Ethel, Kona, Zanthor, Fireball,
Victor) gets distinct names, backgrounds, and level layouts.

- Redesign level select: one row per friend showing portrait, name, power,
  and their 5 level tiles
- Add friend intro screens: video (or portrait fallback), bio, and power
  explainer before each friend's first level
- Intros skip on replay/try-again; input hold prevents accidental cannon
  launches after UI clicks
- Add intro videos for Ethel and Kona; document the video system
- Update level generator with `pentagram()` helper and 5 variants per friend
- Verify block integrity, intro markers (1,6,11,16,21), and level name uniqueness
2026-07-11 16:42:44 -06:00
Brian Fertig 7898d13d18 Peggle Modifications 2026-07-11 15:43:21 -06:00
Brian Fertig 160f6010b1 feat: add Balatro — poker roguelike game
Implement a complete Balatro clone with:
- Pure logic engine (BalatroLogic.js): seeded RNG, ante/blind state machine,
  shop, consumables, boss-blind hooks, save/load, endless mode
- Scoring pipeline (BalatroScoring.js): full poker evaluator (including secret
  hands, wilds, stones, smeared/fourFingers/shortcut passives) and chips×mult
  trace for deterministic scoring animation
- 114 Joker definitions with rich effect hooks (onScored, onHeld, independent,
  cardRetriggers, scaling state, copy via Blueprint/Brainstorm)
- 22 Tarots, 12 Planets, 15 Spectrals, 8 decks, 16 vouchers, 10 booster pack
  types, 20 boss blinds + 3 finishers
- Phaser scene with procedural card/Joker rendering, art-frame drop-in support,
  melty swirl background shader, and trace-based replay animation
- Headless verification suite (tools/verifyBalatro.js) with evaluator table
  tests, scoring goldens, 200-bot smoke test, determinism & mid-run serialize
  round-trip checks, and endless scaling tests
- Tutorial text and sprite-sheet layout documentation
2026-07-09 22:43:36 -06:00
Brian Fertig 63bca959c3 feat(swdbg): overhaul card data from physical set transcription
Regenerate all galaxy cards from the owner's physical card CSV
(assets/info/sw-force-cards.csv) with verified stats, abilities, and
bounty rewards. Cross-check is enforced by tools/verifySWDBG.js.

New mechanics:
- oppChoice: opponent picks between discard / giveForce / attackBoost
  (Duros Spy, B-Wing)
- dealDamage: exile-self effect targeting base OR enemy capital (Y-Wing)
- buyGalaxyDiscard: exile a unit to purchase from the discard pile
  (Jawa Scavenger)
- topdeckNextPurchase: next buy goes on deck top (Twi'lek Smuggler)
- takeRowTemp: borrow a row card, exile it at turn end (Grand Moff Tarkin)
- lookTopSwap: peek deck top, swap with a row card while Force is yours
  (Moff Jerjerrod)
- lookOppHand: reveal opponent's hand, optionally topdeck a card
  (Jyn Erso)
- purchaseToHand: onPurchase adds card to hand instead of discard
  (Fang Fighter)

New ability gates: requiresOppCapital, requiresTraitInPlay,
requiresOtherHero, requiresForce (on multi effects).

New constant ops: typeBoost (Admiral Piett), selfBoostPerBaseLost
(Baze Malbus). New timing: onPurchase.

Updated 55+ cards with corrected costs, attacks, HP, counts, traits,
and abilities. Added 11 new frames to the art sheet (55–65); 4 frames
orphaned but preserved.

Adds ~20 scripted rule spot-checks covering all new mechanics.
2026-07-08 22:07:48 -06:00
Brian Fertig afd1681245 feat(swdbg): rework TIE Fighter, Vader, Cassian, Luke; add capital gate & force SFX
- Add `requiresCapital` ability gate to card definitions
- Rework TIE Fighter: constant boost → action that draws a card if you control a capital ship
- Rework Darth Vader: constant +4 attack while Force is with you (removed damage ability)
- Rework Cassian Andor: onBounty trigger forces opponent discard on galaxy row kills
- Rework Luke Skywalker: onPlay destroy enemy capital ship if Force is with you
- Centralize ability requirement checks via `abilityGatePasses()` helper
- Apply gate checks to onBounty, onPlay, and onReveal triggers
- Add Force track shift SFX (light/dark variations) with randomized playback
- Update verification tests for new card behaviors
2026-07-07 21:15:58 -06:00
Brian Fertig cc2461c6b5 feat(dungeonboss): mid-walk spell casting in adventure windows
Add a "Spells" button during adventure room windows allowing the human
to cast hand spells targeting the hero currently mid-crawl (not just
entrance-queued heroes). The adventure modal stays open across the cast,
narrates spell effects as banners, and correctly resumes the walk
afterward without skipping rooms.

Key changes:
- New `adventurePause` walk type and `ADV_RESUME_MARKERS` to mark the
  boundary between a cast's own effects and resumed walk events
- `findHero` now locates heroes in `adv.walking.hero`
- `showPickModal`/`showReactModal` accept custom callbacks to stay
  inside the adventure modal session
- `driveAdventureWindowDecision` routes window/react decisions to the
  modal UI instead of closing it
- AI window/react turns are computed and revealed via a "has cast:"
  overlay before applying
- `applyAdventureWindowChoice` applies choices directly to the engine,
  splits events into narration vs resumed walk, and plays banners
- New event types (`roomBoosted`, `heroHurt`, `heroHealed`, `heroFeared`,
  `heroTeleportMarked`, `heroesBlocked`, `soulBurned`, `handReset`)
  render as banners in the narration pipeline
- Two new verification tests for mid-walk targeting and fearHero safety
2026-07-06 21:55:04 -06:00
Brian Fertig a1503d19fe feat: enhance SWDBG animations and Dungeon Boss mid-walk casting
- SWDBG: add animated buy sequence with funding arcs, center-screen reveal,
  and face-down stow to discard/deck
- SWDBG: introduce stable row slot tracking so bought/lost cards don't shift
  neighbors; add ghost cards for pending animations
- SWDBG: add end-of-turn discard animations preserving old-hand positions;
  emit endTurnDiscard events from logic
- SWDBG: add deep-dive Buy/Attack buttons for actionable cards; refactor
  dealCardAnimated with startAs/flipTo/keepAlive support
- SWDBG: add drawArcArrow/drawArcArrows for converging attack visuals on
  bounty kills and base attacks
- Dungeon Boss: add mid-walk advRoom casting window after room events,
  letting players react to damage/kills during hero crawl
- Dungeon Boss: track walking hero in publicView and entranceHeroesOf so
  spells and AI heuristics can target mid-crawl heroes
- Dungeon Boss: replace pre-bait token snapshot with overlay system —
  pending bait heroes stay in town with fly-in tokens; pending draw cards
  show card backs until animations land
- Dungeon Boss: keep heroes in battle zone after roomHit/pass instead of
  returning them immediately
- Update images, registry (defaultPlayfield), and verifier (advRoomCasts)
2026-07-05 18:20:06 -06:00
Brian Fertig ab6b2ce9fc feat: add Dungeon Boss and Star Wars Deckbuilder card games
Implement two complete card games with full rule engines, AI opponents
(5 skill levels), procedural rendering, and drop-in art support.

Dungeon Boss: Boss Monster-style dungeon building game for 2-4 players.
Players build dungeons of rooms and spells to lure and defeat heroes,
harvesting souls to win. Includes 8 bosses, 31 room cards, 16 spells,
and 41 heroes with class-based baiting mechanics.

Star Wars Deckbuilder: 2-player deckbuilding game. Players build decks
from faction and neutral cards, purchase from the galaxy row, bounty hunt
enemy units, and attack bases. First to destroy 3 enemy bases wins.
Includes 90-card galaxy deck, 10 bases with abilities, and the Force
mechanic.

Both games include:
- Pure logic engines (rules-verified by headless test suites)
- Synchronous heuristic AI with skill-based decision quality
- Phaser scenes with vector-rendered procedural art
- Drop-in sprite sheet support via JSON mappings
- Tutorial documentation and art specifications
- Registration in the game registry and scene loader
2026-07-03 07:32:41 -06:00
Brian Fertig 376f878a70 feat: add Jumble word puzzle game with 58 curated levels
Unscramble 4 base words, then collect circled letters to solve a riddle
bonus answer. Includes a seeded puzzle generator (tools/genJumble.js),
a verifier (tools/verifyJumble.js), and 58 procedurally generated levels
with progressive difficulty.

Also:
- Fix Pai Gow Poker seat rendering to only draw active seats
- Reduce Pai Gow max players from 6→5, max opponents from 5→4
- Add track 19 ("Down the Line" by Journey) to music
- Add Michael opponent voice lines (terry, victor)
- Update game-icons sprite sheet
2026-06-30 19:42:57 -06:00
Brian Fertig 52c78ae86a Major Port 2026-06-28 19:27:29 -06:00