feat(01-03): add class-feature-options types with Wizard School worked example

- Define ClassFeatureOptionEntry interface as the contract Plan 03b appends to
- Include School of Battle Magic as the worked Wizard School entry (optionsRef: 'wizard-school')
- Add anchor comments naming all remaining class optionsRef strings so Plan 03b knows where to append
- No 'any' types; type-clean against tsconfig.json
This commit is contained in:
2026-04-27 14:45:03 +02:00
parent 29fe01df82
commit d86cf4f434

View File

@@ -0,0 +1,63 @@
/**
* Hand-curated ClassFeatureOption seed data for D-19 wizard sub-steps.
*
* Each entry's `optionsRef` matches a `ClassProgression.choiceOptionsRef` so the wizard
* can resolve choice → option list at runtime.
*
* `grants` and `proficiencyChanges` are option-level mechanical effects applied at commit
* (per RESEARCH.md §Open Question Q2 RESOLVED — symmetric with ClassProgression so the
* recompute pipeline is uniform).
*
* SOURCE: Archives of Nethys — PF2e Player Core + APG class entries.
* SCOPE: 16 D-16 classes' L1 (and other) choice points.
* SPLIT: Plan 03 ships Wizard School (worked example, ≥1 entry). Plan 03b ships the
* remaining classes — joint goal across both plans is ≥50 entries.
*/
import type { Proficiency } from '../../src/modules/leveling/lib/types';
export interface ClassFeatureOptionEntry {
optionsRef: string; // matches ClassProgression.choiceOptionsRef
optionKey: string; // unique within optionsRef
name: string; // English (German via TranslationsService at runtime)
nameGerman?: string; // optional pre-translated German name
description: string; // English
grants: string[]; // class-feature names this option awards (e.g. ["Cloistered Cleric", "Domain Spell"])
proficiencyChanges?: Partial<
Record<'fortitude' | 'reflex' | 'will' | 'perception' | 'classDc' | 'ac', Proficiency>
>;
}
export const CLASS_FEATURE_OPTIONS: ClassFeatureOptionEntry[] = [
// ============================================================
// === WIZARD SCHOOL — worked example (Plan 03 ships ≥1 entry)
// === optionsRef: 'wizard-school'
// ============================================================
{
optionsRef: 'wizard-school',
optionKey: 'battle-magic',
name: 'School of Battle Magic',
description:
'You focus on offensive evocations and battlefield control, learning to bring overwhelming magical force to bear against your foes.',
grants: ['Battle Magic Curriculum', 'School Spell: Force Bolt'],
},
// (Plan 03b appends remaining Wizard schools: civic-wizardry, mentalism, protean-form, unified-magical-theory, universalist)
// ============================================================
// === Plan 03b appends entries below — section anchors:
// ============================================================
// === CLERIC DOCTRINE (optionsRef: 'cleric-doctrine') — Plan 03b
// === CHAMPION CAUSE (optionsRef: 'champion-cause') — Plan 03b
// === DRUID ORDER (optionsRef: 'druid-order') — Plan 03b
// === SORCERER BLOOD. (optionsRef: 'sorcerer-bloodline') — Plan 03b
// === BARD MUSE (optionsRef: 'bard-muse') — Plan 03b
// === BARBARIAN INST. (optionsRef: 'barbarian-instinct') — Plan 03b
// === WITCH PATRON (optionsRef: 'witch-patron') — Plan 03b
// === ORACLE MYSTERY (optionsRef: 'oracle-mystery') — Plan 03b
// === INVESTIGATOR (optionsRef: 'investigator-methodology') — Plan 03b
// === RANGER EDGE (optionsRef: 'ranger-edge') — Plan 03b
// === ROGUE RACKET (optionsRef: 'rogue-racket') — Plan 03b
// === SWASHBUCKLER (optionsRef: 'swashbuckler-style') — Plan 03b
// === ALCHEMIST RES. (optionsRef: 'alchemist-research-field') — Plan 03b
// (Fighter / Monk: no L1 choice — Fighter L5 weapon-mastery and Monk L1 stance via class feats)
];