Implements the full Invocation System as per spec §13 with all 22 acceptance criteria:
- Invocation charge meter with passive fill and active drain
- Auto-activation when charge reaches 100 with living enemies
- Guardian selection by elemental bonus × tierMultiplier scoring
- Spell selection from guardian's full element spellbook (not limited to learned)
- Step-down to affordable spells, auto-end when none affordable
- Charge drain during invocation with spell cost and discipline scaling
- Pact affinity cast speed bonus (diminishing returns, max 50%)
- guardian-invocation discipline with 4 perks (efficiency/speed/sustain/mastery)
- Cost multiplier (base 0.1, min 0.05) and drain multiplier (base 1.0, min 0.7)
- Signal recharged on spire exit and reset on descent
- Invocation Panel UI in SpireCombatPage with charge meter and status
- Compact invocation status indicator in SpireCombatControls
Files changed:
- data/disciplines/invoker.ts: Added guardian-invocation discipline definition
- effects/discipline-effects.ts: Added invocationChargeRateBonus, drainRateMultiplier, invocationCostReduction stat keys
- utils/invocation-utils.ts: NEW - All invocation utility functions (guardian selection, spell selection, charge rate, cost/drain multipliers)
- stores/combat-state.types.ts: Added invocationCharge and activeInvocation fields
- stores/combatStore.ts: Added invocation state defaults, resetInvocationState action, partialize, spire exit reset
- stores/combat-invocation.ts: NEW - Extracted invocation tick processing (charge fill/drain, casting, auto-activate/end)
- stores/combat-melee.ts: NEW - Extracted melee combat processing (keeps combat-actions.ts under 400 lines)
- stores/combat-actions.ts: Integrated invocation and melee modules
- __tests__/invocation-system.test.ts: NEW - 39 comprehensive tests
- SpireCombatPage.tsx: Added InvocationPanel between SpireHeader and RoomDisplay
- SpireCombatControls.tsx: Added compact invocation status indicator
All 1235 tests pass (including 39 new invocation tests).
- Add PerkBonus type and optional bonus field to DisciplinePerk
- Populate bonus data on 39 perks across base, elemental, elemental-regen,
elemental-regen-advanced, and invoker discipline files
- Rewrite computeDisciplineEffects() to apply once/infinite/capped perk bonuses
through known stat keys (maxManaBonus, baseDamageBonus, regen_*, elementCap_*)
- Add per-element cap bonus routing in effects.ts computeAllEffects()
- Remove dead enchantPower bonus (no consumer in effects pipeline)
- Add player-friendly label field to statBonus in DisciplineDefinition
- Show prerequisite requirements on locked discipline cards
- Disable activate button for locked disciplines
- Restructure elemental attunement into dedicated 'Mana Types' tab
- Add checkDisciplinePrerequisites utility function
- Update store to enforce prerequisite checking on activation
- Split discipline-prerequisites tests into separate file
- Fixed DisciplinesAttunementType enum usage in discipline data files
- Fixed EquipmentSlot import in equipment/types.ts
- Fixed enchantment-effects.ts export/import chain
- Fixed safe-persist.ts StateStorage type compatibility
- Fixed store persist partial return types for all stores
- Fixed gameStore.ts ElementState type and error handling
- Fixed useGameDerived.ts missing properties on GameCoordinatorStore
- Added SkillUpgradeChoice type to types.ts
- Fixed ActionButtons.tsx optional currentStudyTarget prop
- Fixed GameToast.tsx Toast type compatibility
- Fixed EnchantmentDesigner sub-component type mismatches
- Fixed SpireCombatPage equippedInstances/equipmentInstances types
- Fixed page.tsx computeClickMana argument
- Added baseCastTime to SpellDef type
- Fixed golem/types.ts and loot-drops.ts import paths
- Fixed craftingStore.ts missing lastError in initial state and actions
- Fixed store-actions-combat-prestige.test.ts Memory type usage
- Fixed floor-utils.upgraded.test.ts array type annotation
- Fixed computed-stats.test.ts state type assertions
- Fixed activity-log.test.ts state type annotation
- Fixed discipline-math.test.ts enum value usage
- Fixed game-loop.test.ts vitest mock import
- Various other test file type fixes