Repository navigation
feat(quest): track one-time quests, split quest goals per period - #2724
Conversation
assets/data/quest_goal.cson becomes assets/data/quest_goal/*.cson, merged at runtime and by fcd/build.js, so the fcd payload is still a single questgoal.json with unchanged data. The build now checks each quest's type against its file name and rejects an id defined twice. External tools reading quest goals should use assets/data/fcd/questgoal.json. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adds 286 one-time quests in assets/data/quest_goal/one-time-*.cson. Most are converted from kcwiki-quest-data and corrected row by row against wikiwiki; quests it lacks are written from wikiwiki, or from KC3Kai's quest memo where wikiwiki could not be read, and say so. Conditions poi cannot express are tracked loosely with a comment naming what is not checked. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
Address the two moderate validation findings and the documented test and inventory nits.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This pull request splits quest-goal data by period and adds tracking for 286 one-time quests while preserving the merged FCD payload.
Changes:
- Replaces the monolithic CSON source with period-specific files.
- Updates runtime loading, FCD generation, validation, and tests.
- Adds one-time quest definitions and updates documentation.
File summaries
| File | Summary / findings |
|---|---|
views/redux/middlewares/quest-goals-fcd.ts |
Updated goal-path documentation; no final finding. |
views/redux/info/quests/types.ts |
Updated source-path documentation; no final finding. |
views/redux/info/quests/goals.ts |
Loads per-file goals. Moderate (1 vote): reject top-level arrays. Nit (2 votes): add coverage for skipping one broken file while retaining others. |
views/redux/info/__tests__/quests.spec.ts |
Updated quest-goal test documentation; no final finding. |
views/redux/info/__tests__/quest-goals-fcd.spec.ts |
Updated FCD tests; no final finding. |
views/redux/fcd.ts |
Updated fallback documentation; no final finding. |
views/redux/actions/quest.ts |
Updated quest-goal documentation; no final finding. |
skills/quest-goal-data/SKILL.md |
Updated data-layout documentation. Nit (3 votes): include one-time-sortie-3.cson and one-time-sortie-4.cson. |
skills/combat-mechanics/SKILL.md |
Updated quest-data references; no final finding. |
fcd/build.js |
Merges and validates goal files. Moderate (1 vote): reject top-level arrays. |
fcd/__tests__/payloads.spec.ts |
Verifies merged payload consistency; no final finding. |
assets/data/quest_goal/yearly-12.cson |
Yearly quest definitions; no final finding. |
assets/data/quest_goal/yearly-11.cson |
Yearly quest definitions; no final finding. |
assets/data/quest_goal/yearly-10.cson |
Yearly quest definitions; no final finding. |
assets/data/quest_goal/yearly-09.cson |
Yearly quest definitions; no final finding. |
assets/data/quest_goal/yearly-08.cson |
Yearly quest definitions; no final finding. |
assets/data/quest_goal/yearly-07.cson |
Yearly quest definitions; no final finding. |
assets/data/quest_goal/yearly-06.cson |
Yearly quest definitions; no final finding. |
assets/data/quest_goal/yearly-05.cson |
Yearly quest definitions; no final finding. |
assets/data/quest_goal/yearly-04.cson |
Yearly quest definitions; no final finding. |
assets/data/quest_goal/yearly-03.cson |
Yearly quest definitions; no final finding. |
assets/data/quest_goal/yearly-02.cson |
Yearly quest definitions; no final finding. |
assets/data/quest_goal/yearly-01.cson |
Yearly quest definitions; no final finding. |
assets/data/quest_goal/weekly.cson |
Weekly quest definitions; no final finding. |
assets/data/quest_goal/README.md |
Documents the split data layout; no final finding. |
assets/data/quest_goal/quarterly.cson |
Quarterly quest definitions; no final finding. |
assets/data/quest_goal/one-time.cson |
One-time quest definitions; no final finding. |
assets/data/quest_goal/one-time-sortie-2.cson |
One-time sortie definitions; no final finding. |
assets/data/quest_goal/one-time-sortie-1.cson |
One-time sortie definitions; no final finding. |
assets/data/quest_goal/one-time-other.cson |
One-time miscellaneous definitions; no final finding. |
assets/data/quest_goal/one-time-expedition.cson |
One-time expedition definitions; no final finding. |
assets/data/quest_goal/one-time-exercise.cson |
One-time exercise definitions; no final finding. |
assets/data/quest_goal/monthly.cson |
Monthly quest definitions; no final finding. |
assets/data/quest_goal/limited-time.cson |
Limited-time quest definitions; no final finding. |
assets/data/quest_goal/daily.cson |
Daily quest definitions; no final finding. |
assets/data/fcd/meta.json |
Updated FCD metadata; no final finding. |
AGENTS.md |
Updated project guidance; no final finding. |
Review details
Suppressed comments (2)
fcd/build.js:121
- This validation also accepts a top-level array because
typeof data === 'object'is true for arrays. A malformed CSON file containing an array of goal-like objects can then be merged with ids0,1, etc. and pass the generic subgoal checks, producing invalid quest entries inquestgoal.json; reject arrays before iterating the table.
views/redux/info/quests/goals.ts:49 typeof parsed === 'object'also accepts arrays. A syntactically valid but malformed goal file with a top-level list would be assigned intomergedunder numeric keys instead of being skipped, so invalid entries can reach the quest table despite the per-file isolation described above. Reject arrays as non-table parses.
- Files reviewed: 40/41 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| if (parsed instanceof Error || !parsed || typeof parsed !== 'object') { | ||
| console.warn('Broken quest goal file!', file, parsed instanceof Error ? parsed.message : '') | ||
| continue | ||
| } | ||
| Object.assign(merged, parsed) |
There was a problem hiding this comment.
Added in 50526ed: views/redux/info/__tests__/quest-goal-files.spec.ts reads the real assets/data/quest_goal/ directory with CSON mocked per file — daily.cson returns a parse error (CSON returns rather than throws), weekly.cson a list, every other file a one-quest table — and asserts both broken files are skipped while the rest load. Checked that it bites: with the array guard removed it fails on the list leaking in under id 0.
A goal file whose top level is a list parsed fine and merged its entries in under ids 0, 1, …, both at runtime and in fcd/build.js. Covers the per-file skip with a test, and lists every one-time file in the skill. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Review failed before a result could be published. Please retry with |
|
Copilot's two suppressed findings (top-level arrays accepted as goal tables in |
What
Tracks one-time (単発) quests, and splits the quest goal source into one file per period so it stays readable.
1. Split
quest_goal.cson(refactor, data unchanged)assets/data/quest_goal.csonbecomesassets/data/quest_goal/*.cson—daily,weekly,monthly,quarterly,yearly-01…yearly-12,one-time*,limited-time— with a README.views/redux/info/quests/goals.ts) andfcd/build.jsmerge the directory. The fcd payload is still a singleassets/data/fcd/questgoal.json; the refactor commit leaves its data identical.fcd/build.jsnow asserts each quest'stypeagainst its file name (replacing the section-header check) and rejects a quest id defined in two files. An unrecognised file name fails the build.fcd/__tests__/payloads.spec.tsmerges the directory the same way, so a goal edit withoutnode fcd/build.jsstill failsnpm test.2. One-time quests (286 added)
one-time-sortie-1.csonone-time-sortie-2.csonone-time-sortie-3.csonone-time-sortie-4.csonone-time-exercise.csonone-time-expedition.csonone-time-other.csonAll carry no
type, so no period reset can drop their progress; same-day exercise quests useresetInterval: 1.Sources, in order of trust.
他の艦read as a fleet-size cap for type-based fleets (B29/B30/B63), andtype: 1on quest 330, which the game reports as quarterly.memo— for the tie-breaks where kcwiki and wikiwiki disagreed (B40/B68/B102/B135 name ships that must be in the fleet, not flagship; B140/B141 maps; B142 rank), and as the only readable source for B180–B216. Those entries carry a comment saying so.Not tracked (199), by design: 94 fleet-composition quests (A), 103 equipment preparation/conversion quests (F), a sortie from the 2nd fleet (B3 —
sallycarries no fleet), and a 7-4 gauge kill (B176).Tracked loosely, with a comment on the quest where poi cannot express the condition: OR between escort groups (B138, B191, B201, B205), speed (B89), level (B102, B117, C21), "no other ship types" (B29, B30, B63), a named remodel that excludes a later one (B106), the target ship of a modernization (G5, G10, G11), and resource or item preparation.
Verification
mapareain master data, everymapcella real edge of its map, every mission and ship id valid.fcd/map.jsonand asserted against poi's existing conventions (7-2-M = [15], 7-3-P = [18, 23, 24, 25], 7-5-T = [24, 25]).npx jest→ 489 passed (43 suites);npm run typecheckand eslint clean.🤖 Generated with Claude Code