- Add dedicated place, remove, win, and puzzle-start intro audio assets
- Register the new cues in the asset manifest and SFX key map
- Replace generic UI sounds with Tents-specific cues for placement, removal, and win
- Play the intro jingle on startGame, ducking the soundtrack until it completes
- Update smoke tests to assert the new jingles and cues fire
- Implement full Tents & Trees scene (TentsGame.js) with day-to-night
sky transition, campfire/ember/firefly effects, hover hints, violation
feedback, and a win panel
- Add pure board model (TentsLogic.js) with backtracking solver,
unique-solution puzzle generation across four difficulties, toggle/
diagnose/solved helpers — all unit-testable in Node
- Register the game in gamesRegistry, main scene list, and slug dispatch
- Update game-icons.png with a new icon frame for Tents & Trees
- Add tools/verifyTents.js (solver + play-state unit tests and generation
soak) and tools/smokeTents.js (Phaser-stub smoke test driving the full
select → play → solve → win → restart flow)
- Resolve hand card index from the container at event time instead of
capturing it when handlers are bound, preventing the "wrong card on
second drag" bug after a reorder.
- Enable drag-to-arrange in both draw and discard phases; clicking a card
during draw now shows guidance rather than discarding.
- Add discard-pile click target so a selected card can be discarded by
clicking the pile, and extract shared `_setupPileClick` helper to reduce
duplication.
- Add `tools/regressionPipePuzzleUnhover.cjs`, a Playwright regression
test verifying that Phaser's `killTweensOf(target, 'prop')` no longer
clobbers in-flight rotation tweens on pointerout/pointerover.
- Remove extra-edge generation and cross pieces; board is now a single random spanning tree (one unique route between every pair of cells, no loops)
- Update leak rendering to place droplets on exact open edges using DELTA/EDGE and render water/flash layers above tiles in the container
- Adjust mini preview tiles and difficulty config (drop `extra` param)
- Rework tutorial to explain tree structure, scattered dead ends, and branch-by-branch solving strategy
- Update verification tool: assert tree edge count, no 4-way cells, leaf distribution across rows, faucet row variety, and board randomness; replace cross-based fixture with a valid tree
Replace the single Hamiltonian-path model with a spanning-tree + extra-edges
approach that produces boards full of T-pieces, crosses and dead ends. The
win condition is now simply "zero leaks" — every socket matched to a
neighbour that opens back — instead of requiring one continuous path from
faucet to drain.
Key changes:
- Logic: generate puzzles via randomized Kruskal spanning tree plus tunable
extra edges per difficulty; add bitCount, countLeaks, and derived
angleFor/canonical rotation table
- Art: new tile textures for stub (dead end), T-piece, and cross;
tileKeyFor and angleFor now handle all five piece types
- Game: faucet and drain are fixed anchors (not rotatable); removed the
CONNECTED counter in favour of a simpler LEAKS stat; updated difficulty
tiers (6×6 through 10×10) with extra-edge counts; improved water
rendering contrast
- Tests: rewrite verify script for the new generation model (spanning tree,
connectivity, piece mix, no-leak solution); update smoke test to skip
anchor tiles
- Tutorial: updated rules, board reading guide, and tips for the branching
network variant
## Wolfenstein: Expand E1M2 level and persist per-mission weapon loadouts
### Level Data (assets/gamedata/wolfenstein/level-e1m2.json)
- Increase map dimensions from 33×24 to 39×29 cells, adding new corridors, rooms, and wall structures
- Add tile type `5` (likely a new floor or decorative element) throughout the expanded areas
- Reposition existing doors, guards, items, objects, and wall art to match the new layout
- Add new entities: additional guards with patrol routes, machine gun pickups, ammo, health kits, yellow key, and secret door in the expanded sections
- Update player start position and exit location for the larger map
### Game Logic (src/games/wolfenstein/WolfensteinGame.js)
- Introduce `LOADOUTS_KEY` localStorage persistence to record which weapons the player owned when each mission was unlocked
- Replace `_freshCampaignCarry()` with `_carryForUnlockedStart()`, which loads the recorded weapon loadout for a given mission (falling back to fists-only for mission 0 or unrecorded missions) and tops up ammo to full
- Add `_fullAmmoFor()` helper that computes max ammo reserves for all ammo-consuming weapons in a loadout
- Update `_recordMissionCleared()` to capture the player's current weapon list at clear-time and store it as the unlock loadout for the next mission (only advancing monotonically)
- Change "Next Mission" flow to rely on the recorded loadout rather than extracting live state, ensuring consistent full-ammo/full-health starts
- Update `_retry()` to restore the original attempt's weapons but top up ammo to full per the "die → come back with full ammo" spec
- Added new "level-new" level data (33x24 grid) with doors, enemies, items, and objects
- Removed one ammo-clip from e1m1 and added two health-large pickups
- Introduced shared HUD row anchor constants for consistent positioning
- Updated HUD to display level name alongside episode/mission info
- Added gray rounded-rect background behind weapon icon in HUD for better contrast against steel-blue bar
- Repositioned weapon icon to dynamically sit left of ammo text based on rendered width
- Updated WolfensteinArt to generate the new HUD icon background texture
Replace the flat dark rectangle status bar with a baked riveted-metal "blue steel plate" background styled after Wolfenstein 3D's original HUD:
- Add `paintHudBar` to WolfensteinArt.js generating a 1920x140 texture with vertical steel gradient, bevel edges, recessed readout panels, divider strips with rivets, and a centered portrait socket sized around the new `HUD_PORTRAIT_SIZE` constant
- Add `paintProfile` fallback face and wire up `profile.png` (128x128, 3 health frames) in wolfenstein-artwork.json
- Rebuild `_buildHud` in WolfensteinGame.js: left panel shows episode/mission label + HEALTH value, center shows health-reactive portrait (frame swaps at 66/33 HP thresholds), right panel shows INVENTORY key icons + AMMO count with equipped weapon icon
- Derive weapon/key icon frames from `rules.items` data instead of hardcoded values so HUD stays in sync with wolfenstein-rules.json
- Add `_hudEpisodeMissionText()` helper for static per-level label text (campaign episode/mission or test level name)
- Apply subdued CRT overlay (`applyArcadeCRTOverlay`) tuned for a tactical-display feel, destroyed on teardown
- Switch HUD fonts to shared `m6x11` pixel font with white/ice-blue lettering; remove old KEY_COLORS constant and rectangular key indicators
- Add fists weapon viewmodel with idle/hit animation states (220ms hit pose)
- Implement mouse-wheel weapon cycling that skips unowned weapons
- Add 33% chance for killed guards to drop ammo-clip pickups at death location
- Introduce campaign carry-over system preserving weapons/ammo/health between missions
- Fix stale 'attack' state clearing when enemies lose sight of player
- Extend save/load serialization to persist nextPickupId counter
- Update level-e1m1 with pistol pickup at spawn point
- Add comprehensive test coverage for all new features in verifyWolfenstein.js
- Add shotgun, machine gun, gatling gun, and plasma rifle weapons with
distinct fire modes (semi-auto, auto, burst) and damage profiles
- Refactor ammo from per-weapon pools to shared pools keyed by ammo type
(9mm, shells, plasma), allowing multiple weapons to share the same pool
- Add pickup system with 11 item types: 5 weapons, 4 ammo variants, and
2 health packs, all with spritesheet frames for rendering
- Update level editor with dynamic pickup dropdown populated from rules.json
- Generalize weapon viewmodel rendering to support multiple weapon images
with per-weapon bob/sway animation
- Add cosmetic pickup animations: vertical bobbing and orbiting sparkle
effects drawn in screen space around each pickup billboard
- Bump save version to v3 to invalidate old saves with incompatible ammo
structure
- Update keyboard bindings for weapon switching (keys 1-6)
- Add comprehensive test coverage for new weapons, burst fire mechanics,
ammo pooling, and pickup behavior
- Rename weapon_gattling.png to weapon_gatling.png to fix spelling
Introduces a new "Object" entity type that blocks movement but not sight/bullets, distinct from walls and pickups:
- **Data**: New `objects` array in level JSON (`{x, y, frame}`), with `data/wolfenstein-objects.json` as the frame registry (Tall Bush, Gold Eagle)
- **Artwork**: New `objects.png` spritesheet registered in `wolfenstein-artwork.json`; placeholder texture via `paintObject()` in WolfensteinArt.js
- **Logic**: Objects stored in `state.objects`, with a derived `map.objectBlocked` Set checked only by movement collision (`isWallCell`) — raycaster/sight/bullets never read it, so objects are see-through and shoot-through by construction
- **View**: Rendered as billboard sprites in `_drawSprites` with ground-anchored positioning (bottom edge on floor) and asymptotic depth sorting that stays below the weapon viewmodel
- **Editor**: New "Object" tool category with dynamic dropdown; click open floor to place/remove (toggle), click wall is a no-op; teal square indicator on board
- **Validation**: `validateLevel` checks objects sit on open floor; save/load round-trips with graceful degradation for pre-existing saves
- **Tests**: Verifies object blocks player movement but bullets pass through
**Analysis of the Diff:**
1. **Binary Files:** `walls.png` and `walls.psd` are updated. This suggests an asset update, likely related to the "wolfenstein" theme mentioned in the paths.
2. **JavaScript File:** `tools/verifyWolfenstein.js` is modified.
* A new test case is added under `section('4. Enemy AI');`.
* The test verifies that an enemy (guard) alerts when hit by a projectile, specifically in a scenario where:
* Visual detection (LOS+FOV) is blocked/blind (guard facing away).
* "Heard gunfire" alert path is blocked (different room/door logic).
* The test sets up a specific level layout, forces a door open, fires a pistol, and checks if the enemy's state changes from 'idle' to something else (alerted) and health drops.
* It explicitly mentions fixing an issue with `stepDoors` auto-close countdown underflow by setting `timer`.
**Synthesis:**
The primary functional change is adding a test case to ensure that direct hits alert enemies even when other alert mechanisms (vision, sound through doors) fail. The asset changes are likely incidental or part of the same feature branch (Wolfenstein theme).
**Drafting the Commit Message:**
* **Subject:** Add test for enemy alert on direct hit bypassing vision/sound checks
* **Body:**
* Update Wolfenstein wall assets (PNG/PSD).
* Add verification test in `verifyWolfenstein.js` ensuring enemies alert when shot, even if they cannot see the player or hear gunfire through doors.
* Fix door timer initialization in the test to prevent auto-close interference during projectile flight.
**Refining for Conciseness:**
Subject: Add enemy hit-alert test and update Wolfenstein assets
Body:
- Update `walls.png` and `walls.psd`.
- Add a test case in `verifyWolfenstein.js` verifying that direct hits alert enemies unconditionally, independent of vision cone or room-based sound alerts.
- Ensure door state is correctly initialized in the test to prevent auto-close interference with projectile simulation.
Let's make it standard conventional commit style if possible, or just clear and descriptive.
**Final Polish:**
Subject: Add test for unconditional enemy alert on direct hit
Body:
Update Wolfenstein wall assets (`walls.png`, `walls.psd`).
Add a new test case in `verifyWolfenstein.js` to verify that enemies alert when directly hit by a projectile, even when visual detection (LOS/FOV) and sound-based alerts (through doors) are inactive. This ensures the direct-hit alert path works independently.
Also fixes door timer initialization in the test setup to prevent auto-close logic from interfering with the projectile simulation.
This looks good. I will provide just the message as requested.
- Add new `wallArt` level data array with per-cell decal frames
- Integrate wall art rendering into WolfensteinView using same texture sampling as walls
- Add Wall Art tool to WolfensteinEditor with dynamic dropdown from JSON registry
- Create wolfenstein-wallart.json frame registry for easy decal management
- Add validation ensuring wall art sits on actual wall cells
- Support wall art in save/load system with backward compatibility
- Alert idle enemies when shot, even outside vision cone
Replace all-or-nothing per-sprite depth checks with per-column occlusion
testing. This allows walls to correctly hide only the parts of sprites
(like dead guards) that are behind them, rather than hiding the entire
sprite if any part is occluded.
Implementation details:
- Walk outward from the sprite's center column to determine the visible
span based on the wall depth buffer.
- Use Phaser's `setCrop` to clip the sprite to the visible columns, which
is more performant than redrawing per-column like walls.
- Add `OCCLUSION_EPS` tolerance to prevent flickering when sprites are
positioned exactly against walls due to float precision issues.
This refactors weapon/enemy combat systems to support per-weapon cooldowns,
fire modes (auto/semi), and data-driven damage rolls via ammo types. Guards
now use the pistol's stats for ranged attacks and can be stunned by non-lethal
hits. The level editor now includes a directional facing picker for newly placed
enemies and displays enemy orientation as arrows instead of dots.
Key changes:
- Logic: Replaced single weaponCooldownMs with per-weapon cooldowns map; added
prevFireHeld for semi-auto trigger-edge detection; guards now reference real
weapon definitions via rangedWeapon; projectiles carry ammoType and resolve
damage at hit time using rollDamage(); non-lethal ranged hits apply stunMs to
enemies, freezing their AI until it expires.
- Rules: Added ammoTypes array with damageMin/damageMax; weapons now specify
fireMode and ammoType (projectiles) or damage (melee); enemy definitions
include stunMs and reference weapon IDs instead of hardcoded projectile stats.
- Editor: Added FACING_DIRS constants and drawFacingPicker() overlay that lets
users click N/S/E/W neighbor cells to set a just-placed enemy's facing;
enemies now render as directional arrows showing their spawn orientation;
pendingFacingEnemy state tracks the in-progress pick across tool switches,
undo/redo, and level resets.
- View: Added GUARD_FRAME.stunned (frame 9) which takes visual priority over
all other states when e.stunMs > 0, ensuring the flinch pose displays even if
the enemy's internal state still reads 'attack' or 'chase'.
- Data: Expanded level-e1m1 to 19x21 grid with repositioned doors/enemies/exit;
bumped SAVE_VERSION to 2 since player.cooldowns and prevFireHeld are new
required fields absent from v1 saves.
- Tests: Added coverage for semi-auto trigger-edge behavior, stun application
and duration, melee non-stun behavior, damage roll range bounds, and guard
projectile ammo type/cooldown spacing; updated existing tests to use new
cooldowns/ammoType fields and toggle fireHeld for repeated shots.
Add computeRooms + alertEnemiesInPlayerRoom: a gunshot now alerts every
idle guard sharing the player's room regardless of range/LOS/cone. A
door cell is always treated as a room boundary for this purpose, even
when fully open — two rooms joined only by a doorway stay distinct
("gunfire carries through the room, not through doorways").
Fix _guardFacing side-walk/side-idle flip: was `rel > 0`, read
backwards in-game, now `rel < 0`.
Cover with three verifyWolfenstein cases: same-room alert fires,
behind-closed-door does not, through-open-door does not (door forced
slide=1 / wall zeroed to exercise the slide-independent path).
- Implement 90° field-of-view check for idle/patrolling guards (only alerts when player is within cone, in range, and has clear line of sight)
- Change patrol behavior: 0-1 waypoints ping-pong, 2+ waypoints form a one-way loop (home → nodes → home → ...)
- Reduce patrol speed to 50% of chase speed for natural movement
- Update editor to display loop closing line when 2+ patrol nodes exist
- Add new weapon sprite images (gattling, machinegun, plasma, rocket, shotgun)
- Extend map parser to support patrol route definitions via `opts.patrols`
- Add patrol routes to e1m1 (guard at 2.5,18.5) and e1m2 (guard at 9.5,8.5)
- Add comprehensive tests for vision cone (inside/outside edge cases) and patrol loop/ping-pong behavior
- Replaced the single-circle bullet texture with a three-circle design
(brass/copper body, bright tracer core, and off-center highlight) for
better readability against various backgrounds
- Reduced bullet texture size from 16×16 to 12×12 to match the more detailed
design
- Decreased bullet render scale from 0.18 to 0.1 in the view to make bullets
appear as small rounds rather than floating dots
- Updated documentation in sprites.md to reflect the new bullet design, size,
and scale changes
Introduce a first-person weapon viewmodel for the pistol that peeks up
from behind the HUD, completing the classic FPS look. The viewmodel
features a subtle, smoothed bob and sway animation that responds to
player movement (forward/strafe), ramping in and out to avoid
snapping.
- Add `paintWeaponPistol` to `WolfensteinArt` as a small procedural
placeholder (360x260) for when real art is absent.
- Update `WolfensteinView` to handle both real and procedural weapon art
with appropriate origins and base positions.
- Implement `_drawWeapon` with bob/sway logic and smooth strength
transitions.
- Register the new sprite key in `wolfenstein-artwork.json`.
- Document the new `wolfenstein-weapon-pistol` asset in `sprites.md`,
including its size, depth, and behavior.
- Add directional billboarding for guards: front/side/back idle & walk
frames selected by relative angle to camera, with flipX for left side
- Add shooting pose (always shown when guard is in attack state)
- Add 2-frame walk cycle (300ms) for moving guards (chase/alert/patrol)
- Add death sequence: fall (350ms) → ground (2s) → fade (800ms),
view-only state in WolfensteinView, pooled sprite destroyed on completion
- Wire guard sheet texture from artwork JSON (enemies.png, 9×7 grid,
frames 0-8 used)
- Add E key as alternate interact key for opening doors
- Update door hint text to show [SPACE/E]
- Update sprites.md with full animation/facing/death documentation
The raycaster's door geometry now takes the live `doors[]` state instead of a boolean flag, so partially-open door cells let render rays pass through the already-slid portion to show what's genuinely beyond, rather than painting a flat "socket" fill. `intersectDoorMidplane` returns a slide-shifted `textureX` so the door texture visibly translates into the wall as it opens.
`WolfensteinView` samples the new `wolfenstein-doors` sheet the same way it does walls (source-texel column, vertical crop, multiply shading), falling back to the flat tan placeholder. Added the doors.png/.psd assets and a `sheets.doors` entry in the art manifest. Updated sprites.md to document the new sheet, the see-through behavior, and that this stays render-only (gameplay raycasts are unaffected).
Editor (WolfensteinEditor.js):
- Decouple the board from grid size: fixed 900px viewport with independent
pan (right-drag / WASD / arrows) and zoom (wheel / +/- / F to fit)
instead of squeezing the whole grid in; add a whole-level map overview
minimap with click-to-jump.
- Grids up to 1000 cells/side (was 48); painting past the edge auto-grows
the grid (preserving content, re-sealing borders) instead of being refused.
- Rebuild the toolbar as a categorized DOM radio + dropdown panel (Wall /
Door / Pickup / Enemy / Patrol / Zone / Erase) instead of a flat list.
- Add a Patrol tool: select a guard, then click tiles to add/remove
waypoints; routes are drawn (dim for all, highlighted for the selection).
- Throttle the reachability validate during paint-drag; flush it before
Test Play / Export; queue game assets in preload() like ZumaEditor.
Doors (WolfensteinLogic.js, WolfensteinRaycaster.js, WolfensteinView.js):
- Player now opens doors by pressing Space (HUD "[SPACE] Open" prompt when
one is in range); enemies still shove them open. Doors animate open/closed
via a slide value (400ms) instead of popping, and stay solid for
gameplay until fully open.
- Render doors as recessed mid-cell geometry (real depth, producing the "H"
doorway shape) via a door-aware render-only raycast — collision/LOS are
unchanged; the door visibly slides sideways into a dark socket as it opens.
Enemy AI (WolfensteinLogic.js):
- Idle enemies with an authored patrol route ping-pong along
[home, ...nodes] until they spot the player; validate patrol nodes.
Rendering (WolfensteinView.js, assets, data):
- Add textured wall rendering: per-column 1px source-texel sampling from
the new walls.png spritesheet, darkened with a 'multiply' grey to match
the existing side/fog shading, with per-wall-type flat-color fallback.
- Wire in assets/images/wolfenstein/walls.png and point the art manifest at it.
Misc:
- level-e1m1.json: reworked to a taller (20-row) map exercising the new
wall/door types; playerRadius 0.25 -> 0.35.
- sprites.md: document exact wall-sheet size, the sliding/recessed door
behavior, guard sheet usage, and standalone image sizes/proportions.
Movement & collision:
- stepSeparation (TALogic) replaces the hard "snap unit to nearest clear
tile centre" correction with a circle-vs-blocked-tile push proportional
to overlap, damped by separationStiffness — no more teleport-yank,
corner-bouncing, or stalling in exact-width corridors (caught as an
AI-vs-AI win-rate regression in testing).
- servicePathQueue now routes at a unit's exact required clearance instead
of padding +1, so traffic spreads across all passable tiles rather than
funneling into a few wide chokepoint corridors.
- TAArt's structure painter falls back to a generic spinning glyph for
topperFrame buildings.
Upgrades (new rule: upgradesFrom):
- A building may be placed directly on top of a friendly building it
names at the same tile/footprint, consuming it for a 50% refund of the
replaced building's OWN cost (not a price discount) — implemented via
TALogic.findUpgradeTarget and an army-aware canPlaceAt.
- New definitions: nuclearplant (upgrades energygen, frame 22) and
advancedmassgen (upgrades massgen, frame 24).
- compileRules (TARules) validates upgradesFrom references and topperFrame;
sprites.md documents the semantics.
- New map m06 "Annihilation" (medium, snowfields, Klaxon skill 5, seed
90123 — pre-vetted from the original sweep for early-economy balance).
Tests (tools/verifyTotalAnnihilation.js):
- Section 4d: pathfinding routes around obstacles and a unit threads a
corridor exactly its own width.
- Section 5b: obstacle push is a bounded per-tick nudge (not a
teleport), settles clear without oscillation, a unit ordered past an
obstacle arrives, and no stuck-give-up flagging.
- Upgrade suite: exact 50% refund credited in place, fresh-ground builds
still work, enemy-owned and mismatched-type targets rejected, reverse
nuclearplant/energygen pairing, and canPlaceAt without an army never
grants upgrade placements.
- New `upgradesFrom` rule: a building def (Nuclear Power Plant on the
Energy Generator, Advanced Metal Generator on the Mass Generator) may
be placed exactly on a friendly, finished building of the named type,
consuming it for a 50% refund of its build cost instead of needing
clear ground (TALogic findUpgradeTarget / consumeUpgrade / buildCommand)
- New `topperFrame`: a second sprite stacked on the finished structure
that spins continuously (the Advanced Metal Generator's centrifuge,
frame 26), hidden while under construction; TAArt sizes the sheet for
it and paints a generic spinner-glyph fallback
- New rules: Nuclear Power Plant (frames 22-23) and Advanced Metal
Generator (frames 24-26) in totalannihilation-rules.json
- TARules: validate topperFrame and upgradesFrom (real building with a
cost); TAWorldView renders/spins the topper; verifyTotalAnnihilation
checks topper frames fit and were painted
- Test section covering upgrade placement (ownership, type match, exact
footprint, refund amount, army-less fallback) and sprites.md updated
for frames 22-26
- Introduce Megatank: medium commander with Twin 150mm Cannon and Side Rocket Pods
- Implement multi-barrel weapon system (barrels + barrelSpacing) in TALogic and TARules
- Lower DEFENCE_MIN_SKILL from 4 to 3; make first Laser Tower proactive, not reactive
- Rebalance unit triangle: Tank now counters Rocket Tank; rockets weak vs vehicle armour
- Re-seed campaign missions m05 (67890) and m06 (80808) with updated maps and briefings
- Skirmish default theme uses rules default (tropics) instead of hardcoded grasslands
- Add intro video before main menu
- Update sprite docs and verification tests for new balance
- Introduce Megatank: medium commander with Twin 150mm Cannon and Side Rocket Pods
- Implement multi-barrel weapon system (barrels + barrelSpacing) in TALogic and TARules
- Lower DEFENCE_MIN_SKILL from 4 to 3; make first Laser Tower proactive, not reactive
- Rebalance unit triangle: Tank now counters Rocket Tank; rockets weak vs vehicle armour
- Re-seed campaign missions m05 (67890) and m06 (80808) with updated maps and briefings
- Skirmish default theme uses rules default (tropics) instead of hardcoded grasslands
- Add intro video before main menu
- Update sprite docs and verification tests for new balance
- Add morale bonus from buildings (e.g., Holo Simulator): flat +N% to total
colony production, uniformly boosting construction, defense, industry,
ecology, and research
- Add espionage restraint (offDrift): setting Intelligence to 'off' toward
an empire with neutral-or-better opinion drifts their attitude upward by
1/turn, giving a way to improve relations without gifting (gated on not
being at war and their opinion of you being >= 0)
- Display morale bonus in colony view when applicable
- Reduce planetShotDamageMult from 10 to 6
- Add verification tests for both new mechanics
- Starbases no longer count toward attacker power in holdsOrbit(), invade(),
resolveCombats(), pendingBattlesFor(), and prepareBattleAt(). A starbase
never leaves its home system, so it must never alone enable orbital
superiority or pick fights with neighbouring hostile colonies (Brian, 2026-08-15).
- VegaAI manageFleets 2a/2b now uses targetColonyAt() instead of colonyAt()
to resolve the colony it is actually at war with. At multi-colony stars
this fixes the bug where an idle fleet sitting on a hostile undefended
colony would silently check a different (not-at-war) colony sharing the
star and never bombard/invade (Brian, 2026-08-15).
- Add test suite 5f (starbases cannot attack alone) and 5g (AI bombard/invade
at contested multi-colony stars).
Bumps the planetShotDamageMult config value in mastervega-rules.json
to significantly increase damage dealt during planetary bombardment
or planet defense scenarios.
- defenseHp is now a pure per-battle ammo gauge (one full-strength
shot per planetDefensePerShot points, remainder as fractional shot)
instead of in-battle damage tracking; no longer written back after
battle outcome
- Planet now has a real range limit (planetRange, 1200) — previously
the only entity with no range check at all
- Per-shot damage scales with the defending empire's best known weapon
tech (weaponAvgDmg) instead of a flat HP-proportion curve
- defenseHp is only wiped to 0 when the planet is actually DESTROYED,
fixing the bug where a defeated planet could be re-attacked multiple
times in one turn with full strength each time
- Added combat config: planetDefensePerShot (5), planetShotDamageMult (1)
- Added combatV2 config: planetRange (1200)
- Comprehensive tests for range gating, shot formula, ammo exhaustion,
multi-battle-same-turn fix, and tech-scaled damage
Add siegeFreezesDefense mechanic (default true) that stops a colony's
passive defenseHp trickle and blocks defensive building completion at the
front of the build queue while a hostile warship fleet is present.
This fixes the recurring "Under Attack" notification loop reported by Brian
where defenseHp would regenerate each turn, re-arming the pendingBattlesFor
gate and triggering fresh popup notices for an already-beaten colony.
Also adds an AI dispatch throttle in manageFleets: idle fleets no longer
open redundant attack orders against colonies the empire already holds orbit
over with defenseHp beaten to 0. Excluded fleets fall through to rally logic
and naturally join the existing siege or find a fresh front.
New helpers: isDefensiveBuildingId, isHostileWarshipFleet, hasHostileWarshipFleet
— shared across processColony, pendingBattlesFor, and VegaAI to ensure a
single definition of "under active siege".
Includes tests (sections 5d, 5e) covering regen freeze, build queue freeze,
siegeFreezesDefense=false toggle, and AI throttle.
- **Visual Feedback**: Introduce VegaBombardScreen.js — a two-stage popup for
bombard/invasion results featuring JIT-loaded videos (per planet type or
invading species) and animated stat bars showing population, factory, and
building losses.
- **Expanded Consequences**: Factory and building destruction now scale with
the population kill ratio. On colony wipeout, weapon Mark gates planetary
ruin/ruination (toxic/radiated/dead/asteroids) via a weighted probability table.
- **AI & Tactics**: Ursaal now queue troop transports alongside warships for
invasion fleets. Added `bombardHoldFireChance` trait (0–1) to let species
defer bombing when invasion troops are staged, preserving intact colonies
without creating fortress-world stalemates.
- **Battle Logic Fixes**: Correct `prepareBattleAt` and `pendingBattlesFor` to
properly handle stars with multiple colonies, ignore transport-only fleets,
and suppress pending battles when planetary defenses are depleted.
- **UI/Reporting**: Wire player-initiated and AI-initiated attacks into the
new popup queue. Add `bombard` and `invasionFailed` to notable turn report
events with detailed outcome descriptions.
- **Testing & Tooling**: Add comprehensive verification tests for planet
destruction distribution, building damage rates, hold-fire chances, and
battle edge cases. Expose `window.game` for devtools debugging.
- Replace flat planetDefenseBase (20) with proportional planetDefenseScale
(0.06), so colony defense damage scales purely with current defenseHp.
A near-depleted colony now barely scratches attackers, while a fully
tech'd one still tops out ~110 damage — fixing "attacked with the
strength of a much-better-defended planet" (Brian, 2026-08-14).
- Add AI war memory: track consecutive losses per enemy and escalate
attackMultiplier up to 3x so repeated losing attacks stop dribbling
small fleets. A win resets the streak. Prevents permanent phoney wars
where both sides build to equal strength and nothing moves.
- Show "Under Attack" notice (one-button, no formation picker) when AI
attacks the player, since formation choice is meaningless for defense.
- Add planetary beam fire SFX for combat view.
- Add event `seq` cursor for war memory to survive event list trimming.
- Full test coverage for planet damage formula and AI escalation behavior.
- Add "Galactic Expansion" colony focus and "Expansion" allocation focus
for early-game land grab phase (one colony ship per discovered open world,
then 2 frigate escorts per colony ship)
- Introduce fleetUrgency() — sliding-scale fleet recommendation based on the
coldest contacted relationship, throttled pre-contact to avoid premature
militarization
- Hide Council menu button until the Council has actually convened (lastResult)
- Add tooltip to disabled population send button explaining why it's off
- Rename "Production" allocation preset to "Industrial Buildout"
- Expand Colony Improvement recommendation to fire when factories are well
below cap, not just near cap
- Add comprehensive tests for all new logic paths
- relationsRows now filters out empires the human hasn't contacted, matching
the existing contact-gating behavior of rankingRows (Brian, 2026-08-14)
- Expand GNN alert suppression from espionage-only to include tech breakthroughs
via new ALERT_STORY_KINDS set, skipping ranking/relations pages for these
one-off notifications
- Update verifyMasterOfVega tests to assert uncontacted empires are excluded
from relationsRows while confirming names can still appear in contacted
rows' war/trade/ally lists
- Replace □/■ glyphs with channel-specific icons inside the lock toggle boxes
- Introduce `allocation.png` (5 frames) and register it in the artwork config
- Add hover tooltips explaining each channel's production role and MOO1-style
overflow behavior
- Expose slider `zone` for tooltip attachment and adjust icon/layout positioning
- Update sprite documentation and include minor audio asset update
- Add leader detail pop-over (VegaLeaderDetail.js) with portrait, bio, and
current posting bonuses displayed in fleet and colony views
- Add leader portrait click-to-zoom in the Leaders screen
- Add leader skill summary formatting (leaderSkillSummary) for readable
bonus descriptions across UI components
- Integrate leader skills into espionage power/defense and invasion attack
calculations in VegaLogic.js
- Cap bombard() at once per (attacker, colony) per turn via lastBombardTurn
tracking; fixes UI double-click and AI double-bombard bugs
- Contact-gate GNN breakthrough stories and ranking charts on first contact,
matching existing rankingRows behavior
- Round population displays throughout the UI (toFixed(1) → Math.round)
for cleaner presentation
- Bump colony ship and transport base costs in rules data
- Add leaders.png artwork reference to mastervega-artwork.json
- Add tests for bombard cap and GNN contact-gating in verifyMasterOfVega.js
When a fresh espionage notification is pending, skip ranking metrics and
relations pages so the alert reads as a focused notification rather than
being interleaved with unrelated charts. Reopening GNN without pending
events (using history) always shows the full experience, providing an
escape hatch for players who want the charts.
- Add "peace request" diplomacy: player can ask an AI to end a war with a
third empire, and AIs can ask the player the same. Refusing costs attitude.
Implemented in VegaDiplomacy.js (wouldAcceptPeaceRequest/requestPeace/offerPeaceRequest),
VegaAudience.js (Demand Peace button + war picker), and full chat lines for
all species in VegaChat.js.
- Extract openFormationPicker to VegaScreens.js and wire it into
MasterOfVegaGame.js so the player chooses a formation before every battle.
AI opponents still pick silently.
- Fix Combat V2 planet positioning (fixed at worldWidth * 0.75 instead of
formation-relative), pass typeId for real planet art, and apply the
Planetary Shield building's shieldBonus (was hardcoded to 0).
- Add icon images to research screen tech field headers.
- Add comprehensive tests for peace requests and prepareBattleAt fixes.