142 lines
10 KiB
Markdown
142 lines
10 KiB
Markdown
{
|
||
"version": 3,
|
||
"id": "mum05nd7-2d3nte",
|
||
"objective": "Add 16 elite enemy fighters — 8 Apex (sheets frames 30–37) and 8 Mindweave (frames 40–47) — to the enemyTypes roster with a full themed behavior/skill layer (Apex: predatory cloaked ambushes, flanking, heavy forward firepower and spread volleys; Mindweave: blink repositions, illusions/decoys, telekinesis, big patterned bullet barrages), each ship with a distinct attack style, all roughly 1.3× the pirate's offensive and defensive stats, plus a new test arena reachable via ?combat (e.g. ?combat=apex / ?combat=mindweave) with an in-game picker to duel any single fighter.",
|
||
"status": "complete",
|
||
"autoContinue": true,
|
||
"usage": {
|
||
"tokensUsed": 13531457,
|
||
"activeSeconds": 2309
|
||
},
|
||
"sisyphus": false,
|
||
"revision": 192,
|
||
"createdAt": "2026-09-29T01:33:19.627Z",
|
||
"updatedAt": "2026-09-29T02:20:10.414Z",
|
||
"scheduler": {
|
||
"version": 1,
|
||
"owner": "01a0eab4-0f1f-763f-983f-e656d8f44307",
|
||
"generation": "727d1149-cb68-44be-9b4d-6faac1395730",
|
||
"used": 1,
|
||
"phase": "running",
|
||
"repairUsed": false,
|
||
"decision": {
|
||
"kind": "ready",
|
||
"nextAction": "Continue pursuing the goal, then verify and complete it when satisfied.",
|
||
"purpose": "ready"
|
||
},
|
||
"dispatch": {
|
||
"id": "8f4ecc7a-e488-4cc6-9276-21a80840dcda",
|
||
"kind": "ready",
|
||
"claimedAt": 1790645599681
|
||
}
|
||
},
|
||
"taskList": {
|
||
"tasks": [
|
||
{
|
||
"id": "task-1",
|
||
"title": "Design & register the 16 faction ships in data/combat.json (enemyTypes)",
|
||
"status": "complete",
|
||
"verificationContract": "16 new enemyTypes entries (8 apex_* frames 30–37, 8 mindweave_* frames 40–47) with documented per-ship ability designs in $comment/_comment; stats ≈1.3× the raider base (hull+shields and weapon damage) verified by a quick node stat-sanity check; EnemyTypes.enemyTypeIds() lists all 16; no changes to galaxy/quest data",
|
||
"completedAt": "2026-09-29T01:47:47.343Z",
|
||
"evidence": "data/combat.json: 16 enemyTypes (apex_*/weave_* frames 30-37/40-47) + combat.factions; JSON valid; tests: frames/roster/1.3x stat checks pass"
|
||
},
|
||
{
|
||
"id": "task-2",
|
||
"title": "New weapon patterns in js/combat/Weapons.js",
|
||
"status": "complete",
|
||
"verificationContract": "Apex heavy/forward/spray patterns and Mindweave 1942-style patterned barrages (spirals, radial volleys, big-radius shells) implemented as data-driven weapon.pattern values; pure-function tests extend dev/combat.test.mjs and pass via node",
|
||
"completedAt": "2026-09-29T01:47:47.345Z",
|
||
"evidence": "Weapons.js: sweep/spiral/shell patterns; dev/combat.test.mjs pattern checks (heading-centered fan, stepped spiral w/ stagger, big-radius shell, triple shells) pass"
|
||
},
|
||
{
|
||
"id": "task-3",
|
||
"title": "Apex behavior layer: cloaked ambush, flanking, signature abilities",
|
||
"status": "complete",
|
||
"verificationContract": "Apex ships can spawn cloaked nearby/behind the player and de-cloak, flank from behind, and each of the 8 ships shows at least one distinct signature ability on top of shared predatory skills; observable in the ?combat=apex arena; shared logic unit-tested where pure",
|
||
"completedAt": "2026-09-29T01:47:47.345Z",
|
||
"evidence": "EnemyAbilities.js cloaked_ambush + flank_strafe wired in CombatSystem (fire gate !cloaked, collide skips cloaked); cloak/stand/reveal tests pass; 8 distinct apex kits"
|
||
},
|
||
{
|
||
"id": "task-4",
|
||
"title": "Mindweave behavior layer: blink, illusions, telekinesis, barrages",
|
||
"status": "complete",
|
||
"verificationContract": "Mindweave ships periodically blink (Wraith-style reposition), can spawn illusion/decoy or telekinetically push the player/deflect bolts, and fire large-radius patterned barrages; each of the 8 ships shows at least one distinct signature ability; observable in the ?combat=mindweave arena; shared logic unit-tested where pure",
|
||
"completedAt": "2026-09-29T01:47:47.346Z",
|
||
"evidence": "EnemyAbilities.js blink_reposition/illusion_decoy/telekinetic_wave + stepIllusions/stepTkwaves in CombatSystem; illusions in auto-fire pool + bullet pops; all ability tests pass"
|
||
},
|
||
{
|
||
"id": "task-5",
|
||
"title": "Test arena: ?combat=faction boots + in-game single-fighter picker",
|
||
"status": "complete",
|
||
"verificationContract": "?combat=apex and ?combat=mindweave boot the new arena; an in-game picker lets the player choose any single fighter to duel; the existing plain ?combat seven-type demo still boots unchanged (regression check)",
|
||
"completedAt": "2026-09-29T02:00:05.072Z",
|
||
"evidence": "CDP arena (dev/cdp-faction-arena.mjs): ?combat=apex / ?combat=mindweave boot the picker; picks 1-8 + pack(0) duel individually; plain ?combat demo still boots (wave live, 3 enemies, no picker) — all c"
|
||
},
|
||
{
|
||
"id": "task-6",
|
||
"title": "Verification pass: tests, balance sanity, manual arena checklist",
|
||
"status": "complete",
|
||
"verificationContract": "All dev/*.test.mjs node tests pass (0 failures); stat-sanity check confirms ~1.3× pirate offensive/defensive per ship; manual/CDP checklist confirms every one of the 16 ships fights individually with its skills visibly firing; requirements re-read and each item (16 ships, both factions, unique styles, shared faction skills, 1.3× balance, test arena, no galaxy placement) confirmed addressed",
|
||
"completedAt": "2026-09-29T02:00:05.076Z",
|
||
"evidence": "All dev/*.test.mjs suites pass (0 failures, combat.test.mjs all checks incl. 1.3x armor/damage/XP bands per ship); CDP checklist: both factions boot, fighters fire their distinct patterns (sweep 5 bol"
|
||
}
|
||
],
|
||
"blockCompletion": true,
|
||
"proposedAt": "2026-09-29T01:26:35.246Z"
|
||
},
|
||
"stopReason": "agent",
|
||
"archivedPath": ".pi/goals/archived/goal_2026092820201039_mum05nd7-2d3nte.md"
|
||
}
|
||
|
||
# Goal Prompt
|
||
|
||
Add 16 elite enemy fighters — 8 Apex (sheets frames 30–37) and 8 Mindweave (frames 40–47) — to the enemyTypes roster with a full themed behavior/skill layer (Apex: predatory cloaked ambushes, flanking, heavy forward firepower and spread volleys; Mindweave: blink repositions, illusions/decoys, telekinesis, big patterned bullet barrages), each ship with a distinct attack style, all roughly 1.3× the pirate's offensive and defensive stats, plus a new test arena reachable via ?combat (e.g. ?combat=apex / ?combat=mindweave) with an in-game picker to duel any single fighter.
|
||
|
||
## Progress
|
||
|
||
- Status: complete
|
||
- Auto-continue: on
|
||
- Sisyphus mode: no
|
||
- Time spent: 38m29s
|
||
- Tokens used: 14M (13,531,457) tokens
|
||
## Tasks
|
||
|
||
<!-- blockCompletion: true -->
|
||
- [x] task-1: Design & register the 16 faction ships in data/combat.json (enemyTypes) — evidence: data/combat.json: 16 enemyTypes (apex_*/weave_* frames 30-37/40-47) + combat.factions; JSON valid; tests: frames/roster/1.3x stat checks pass
|
||
- [x] task-2: New weapon patterns in js/combat/Weapons.js — evidence: Weapons.js: sweep/spiral/shell patterns; dev/combat.test.mjs pattern checks (heading-centered fan, stepped spiral w/ stagger, big-radius shell, triple shells) pass
|
||
- [x] task-3: Apex behavior layer: cloaked ambush, flanking, signature abilities — evidence: EnemyAbilities.js cloaked_ambush + flank_strafe wired in CombatSystem (fire gate !cloaked, collide skips cloaked); cloak/stand/reveal tests pass; 8 distinct apex kits
|
||
- [x] task-4: Mindweave behavior layer: blink, illusions, telekinesis, barrages — evidence: EnemyAbilities.js blink_reposition/illusion_decoy/telekinetic_wave + stepIllusions/stepTkwaves in CombatSystem; illusions in auto-fire pool + bullet pops; all ability tests pass
|
||
- [x] task-5: Test arena: ?combat=faction boots + in-game single-fighter picker — evidence: CDP arena (dev/cdp-faction-arena.mjs): ?combat=apex / ?combat=mindweave boot the picker; picks 1-8 + pack(0) duel individually; plain ?combat demo still boots (wave live, 3 enemies, no picker) — all c
|
||
- [x] task-6: Verification pass: tests, balance sanity, manual arena checklist — evidence: All dev/*.test.mjs suites pass (0 failures, combat.test.mjs all checks incl. 1.3x armor/damage/XP bands per ship); CDP checklist: both factions boot, fighters fire their distinct patterns (sweep 5 bol
|
||
|
||
|
||
## Post-approval fixes (picker didn't work)
|
||
|
||
The `?combat=apex` / `?combat=mindweave` arena booted but the in-game picker was
|
||
unusable. Three real bugs in `js/combat/DuelPicker.js`, all fixed + verified via CDP
|
||
in a headless browser (fresh tab → New Game → pick):
|
||
|
||
1. **Panel was world-anchored, not screen-anchored.** The children never got
|
||
`setScrollFactor(0)`, so the rows landed mid-canvas (the camera centres on the
|
||
ship, not the origin) and drifted as the camera followed. Every child (bg, title,
|
||
tagline, rows, zones, hint) now pins to the screen like the rest of the combat HUD.
|
||
2. **Pick zones were misplaced three rows down.** The zone formula re-added the panel
|
||
offset (`cx-w/2, cy-h/2`) on top of `_rowRects`, which is already absolute — so a
|
||
click on a visible row either missed or fired the wrong fighter. Zones now sit
|
||
exactly over their own row (`_rowRects` used verbatim).
|
||
3. **Bare `.setInteractive()` on a Zone is the v4-fragile path** (the same quirk
|
||
ActionBar/MenuButton document): it leaves no hit-testable area the input manager
|
||
claims on click. Re-armed each zone with an explicit `hitArea` + `hitAreaCallback`
|
||
(the proven ActionBar/MenuButton hand).
|
||
|
||
Plus a 4th (keyboard): this Phaser 4.2.1 build's KeyCodes map has NO digit entries,
|
||
so `kb.addKey('DIGIT_n')` + `key.on('down')` produced a Key with `keyCode undefined`
|
||
whose 'down' never fired. Switched to the manager's plain `keydown` event (the same
|
||
one the skill seats use) and parse `e.key`/`e.code`. Digits are safe here: the
|
||
picker only exists in the faction arena, where the skill-seat handler no-ops (no
|
||
class, screen busy).
|
||
|
||
Verified: both factions, click + keyboard, single fighter (rows 1–8) and the pack
|
||
(0) all spawn the correct ship; the plain `?combat` demo still boots (3 waves, no
|
||
picker); `node dev/combat.test.mjs` / `factions` / `frames` all pass.
|