Commit Graph

5 Commits

Author SHA1 Message Date
Brian Fertig 1a581af211 Add faction crossfire: rivals shoot each other in war-zones
- Bullets and seekers now carry their shooter's factionId so a
  faction's fire drops rival-faction craft but never its own wing
  (classic pack bolts/seekers are unaffected)
- NPC kills via crossfire are silent: no kill count, XP, defeat comm,
  or screen shake — the war is the world's, not the player's ledger
- Survivors of a neutral-to-player side peel off once their rivals are
  spent, clearing the sky for the director's cadence
- Bump faction cooldown to 40–60 s and update data/encounters tests
2026-09-30 16:57:52 -06:00
Brian Fertig 89fac9ef78 Rework faction encounters into two-faction crossfire with per-player dis
- Faction space now deploys the local faction AND one rival as hostile groups
  (previously only an opposing faction attacked, local was allies), with both
  sized off the level band.
- Each ship's hostility toward the player is stamped from reputation standing
  vs `encounters.faction.hostileBelow`; neutral factions are observe-only —
  untargetable by guns/skills/escort fire, their bolts/seekers/rams fizzle past
  the ship, and they peel off once rivals are spent.
- Add faction-space encounter timers (tighter roll interval + cooldown) in
  `encounters.faction`, applied via `ctx.faction` in the director.
- Route all player-targeting paths through a new `_playerPool()`/
  `playerTargetable()` gate; add `_peelOff` disengage and rival-live check.
- Update tests for the two-group compose, disposition, and faction timers.
2026-09-30 16:28:56 -06:00
Brian Fertig f9f5dca694 Rework faction systems into active war zones with faction-driven encount
- Faction-controlled systems now spawn only opposing-faction hostiles (never pirates/neutrals), and local-faction fighters join the player as allies during the fight.
- Rework patrol, bounty, and escort side-quests to the faction war model: patrols are always in-system vs one seeded rival; bounties target a rival's member in a hostile neighbor gated on jump-gate access; escorts rescue a trapped transport in hostile space and deliver it back through the gate into friendly territory.
- Implement per-faction reputation standing (setFaction/changeFaction) with save persistence; faction-owned places now resolve standingFor() via the controlling faction.
- Job boards on faction worlds post only faction-context missions with generic war-voice descriptions ({enemy} placeholder); neutral boards unchanged.
- Update all dev test suites (encounters, bounty-hunts, escort, escort-flow, reputation, sidequests) to cover the new faction rules and gate locks.
2026-09-29 21:22:42 -06:00
Brian Fertig 8a85ec9fff Tune level-6+ encounters and bounty tiers with weighted rosters and XP s
- Combat bands split at level 6 (5–7), 9–12, and 13+ (9–12 cap) with
  weighted pirate rosters; compose() now draws `pirateTypes` from the band
  roster and GameScene uses it when spawning one-shots.
- Patrol encounters gain tiered bands (levels 6+) with mixed rosters,
  fatter rolling waves (up to 20 deep / 6 concurrent), contact-count odds
  overrides, and per-tier `xpScale` dials; legacy array rosters normalize
  to the weighted table.
- Bounty hunts replace the stubbed marksman band with tuned tiers
  (marksman 6–10, deadeye 11–14, apex 15+): growing pickets and escorts,
  escort roster mixes, elite armor/damage scales 3×–4×, and `xpScale`
  trims so payout pace tracks the curve.
- Tests updated to assert the new band shapes, roster draws, XP scaling,
  and tier resolution; skills-bar screenshots refreshed.
2026-09-27 19:45:57 -06:00
Brian Fertig 2f80ddfdb1 Add periodic random ship encounters with neutral ally escorts
- New EncounterDirector (js/combat/Encounters.js): pure, data-driven clock that rolls pirate / neutral / mixed encounters in neutral non-home systems on a ~45–90s interval at 50–60% chance, one at a time with a 30–60s cooldown, never during a live wave run or on a downed player.
- Neutral ally ships (js/combat/NeutralShip.js) on spritesheet frames 20–27: escort the player for a per-ship 10–15s window, engage the nearest pirate in mixed fights, then break off and fly off-screen; player-safe by construction (never targeted or damaged by ally bolts/seekers).
- Pirate targeting generalized so hostiles can draw aggro onto escorts when the player is out of range; escort and pirate bolts/missiles collide with each other but not the player.
- Group size scales with combat level (1–2 low → 4–5 high, bands in data/combat.json); encounter hostiles are one-shots so the fight ends when the sky clears.
- New 'volley' weapon pattern (wide staggered-speed fan) and owner-tagged bolts/missiles for ally vs enemy routing in Weapons.js.
- Neutral roster config + encounters section added to data/combat.json; EnemyTypes gains neutralTypeConfig/Ids/SheetList.
- Tests: dev/encounters.test.mjs (cadence, gate, weights, size bands), dev/neutral.test.mjs (roster, escort AI, targeting, no friendly fire), plus combat/xp test updates; CDP probes and encounter-hud-check for in-browser HUD verification.
2026-09-22 07:19:20 -06:00