[priority: medium-low] refactor: Redesign Invoker disciplines to improve pact bonuses and guardian boons #142

Closed
opened 2026-05-26 15:26:06 +02:00 by Anexim · 2 comments
Owner

Problem

The two current Invoker disciplines (spell-casting and void-manipulation) are generic combat stat boosts (base damage, damage multiplier). The Invoker attunement is thematically about forming pacts with guardians and gaining their elemental affinity — but its disciplines don't reinforce that at all.

New Design

Invoker disciplines should focus on:

  1. Improving pact bonuses — enhancing the effects gained from signed guardian pacts
  2. Strengthening guardian boons — boosting the unique perks (uniquePerk field on guardians) that guardians provide
  3. Pact utility — mechanics like reduced pact signing time, increased pact slots, better affinity gains, etc.

Current Guardian Boons (from guardian-data.ts)

Each guardian has a uniquePerk that grants a specific bonus. Examples:

  • Fire: "Fire spells cast 10% faster"
  • Water: "Water spells deal +15% damage"
  • Air: "Air spells have 15% crit chance"
  • Earth: "Earth spells deal +25% damage to guardians"
  • Light: "Light spells reveal enemy weaknesses (+20% damage)"
  • Dark: "Dark spells deal +25% damage to armored enemies"
  • Death: "Death spells execute enemies below 20% HP"
  • Transference: "Transference spells have 25% reduced cost"
  • Metal: "Metal spells pierce 20% armor"
  • Sand: "Sand spells slow enemies by 25%"
  • Lightning: "Lightning spells chain to 2 additional targets"
  • Crystal: "Crystal spells reflect 15% damage back to attackers"
  • Stellar: "Stellar spells deal +30% damage at night"
  • Void: "Void spells ignore 40% of all resistances"

Proposed Invoker Disciplines

1. "Pact Attunement" (replaces spell-casting)

  • ** manaType**: light
  • statBonus: pactAffinityBonus (reduces pact signing time, increases pact power)
  • Perks:
    • once @ 100: Unlock pact affinity scaling
    • infinite @ 200: Every 100 XP: increase pact affinity by 5%
    • Perks can reference specific guardian floors to boost their unique perk potency

2. "Guardian's Boon" (replaces void-manipulation)

  • ** manaType**: dark
  • statBonus: guardianBoonMultiplier (generic multiplier that enhances all guardian unique perks)
  • Perks:
    • once @ 100: Active guardian boons gain +10% effectiveness
    • capped @ 200: Each tier adds +5% to guardian boon effectiveness (max tier at 5000 XP for +50%)

Suggested additions (optional stretch)

  • 3 pact-specific disciplines that specialize in boosting elemental spell damage per element from pacts signed
  • A discipline that grants bonus pact slots beyond the prestige upgrade cap

Prerequisites

Invoker disciplines should be locked until the player has signed at least one guardian pact (has signedPacts.length > 0). This prevents access before the player engages with the pact system.

What Needs to Change

Data Layer

  1. src/lib/game/data/disciplines/invoker.ts — full rewrite of both disciplines
  2. Add new stat keys to the effect system: pactAffinityBonus, guardianBoonMultiplier

Type Layer

  1. src/lib/game/types/disciplines.ts — ensure new stat keys are supported in DisciplineDefinition.statBonus.stat

Effect Layer

  1. src/lib/game/effects/discipline-effects.ts — handle new stat keys
  2. src/lib/game/stores/gameStore.ts — apply pactAffinityBonus in pact signing time reduction, apply guardianBoonMultiplier to guardian perk calculations

Invoker Attunement Guard

  1. src/lib/game/stores/discipline-slice.ts — invoker disciplines should check for signedPacts.length > 0 before allowing activation

Prerequisite Display

  1. src/lib/game/utils/discipline-math.ts — prerequisite for invoker should display something like "Requires: signed guardian pact" instead of a raw ID

Files

  • src/lib/game/data/disciplines/invoker.ts (full rewrite)
  • src/lib/game/effects/discipline-effects.ts
  • src/lib/game/effects.ts — ensure new stat keys merge correctly
  • src/lib/game/stores/gameStore.ts — apply pact affinity and boon bonuses
  • src/lib/game/stores/discipline-slice.ts — invoker-specific activation guard
  • src/lib/game/utils/discipline-math.ts — prereq display for invoker

Dependency

  • Blocked by guardian pact issue fix (issue #2) — invoker disciplines need signed pacts to actually work
  • Blocked by perk numerical bonus fix (issue #1) — new perk bonuses need the perk system to actually function
## Problem The two current Invoker disciplines (`spell-casting` and `void-manipulation`) are generic combat stat boosts (base damage, damage multiplier). The Invoker attunement is thematically about **forming pacts with guardians and gaining their elemental affinity** — but its disciplines don't reinforce that at all. ## New Design Invoker disciplines should focus on: 1. **Improving pact bonuses** — enhancing the effects gained from signed guardian pacts 2. **Strengthening guardian boons** — boosting the unique perks (`uniquePerk` field on guardians) that guardians provide 3. **Pact utility** — mechanics like reduced pact signing time, increased pact slots, better affinity gains, etc. ## Current Guardian Boons (from `guardian-data.ts`) Each guardian has a `uniquePerk` that grants a specific bonus. Examples: - Fire: "Fire spells cast 10% faster" - Water: "Water spells deal +15% damage" - Air: "Air spells have 15% crit chance" - Earth: "Earth spells deal +25% damage to guardians" - Light: "Light spells reveal enemy weaknesses (+20% damage)" - Dark: "Dark spells deal +25% damage to armored enemies" - Death: "Death spells execute enemies below 20% HP" - Transference: "Transference spells have 25% reduced cost" - Metal: "Metal spells pierce 20% armor" - Sand: "Sand spells slow enemies by 25%" - Lightning: "Lightning spells chain to 2 additional targets" - Crystal: "Crystal spells reflect 15% damage back to attackers" - Stellar: "Stellar spells deal +30% damage at night" - Void: "Void spells ignore 40% of all resistances" ## Proposed Invoker Disciplines ### 1. "Pact Attunement" (replaces spell-casting) - ** manaType**: light - **statBonus**: `pactAffinityBonus` (reduces pact signing time, increases pact power) - **Perks**: - `once` @ 100: Unlock pact affinity scaling - `infinite` @ 200: Every 100 XP: increase pact affinity by 5% - Perks can reference specific guardian floors to boost their unique perk potency ### 2. "Guardian's Boon" (replaces void-manipulation) - ** manaType**: dark - **statBonus**: `guardianBoonMultiplier` (generic multiplier that enhances all guardian unique perks) - **Perks**: - `once` @ 100: Active guardian boons gain +10% effectiveness - `capped` @ 200: Each tier adds +5% to guardian boon effectiveness (max tier at 5000 XP for +50%) ### Suggested additions (optional stretch) - 3 pact-specific disciplines that specialize in boosting elemental spell damage per element from pacts signed - A discipline that grants bonus pact slots beyond the prestige upgrade cap ## Prerequisites Invoker disciplines should be locked until the player has signed at least one guardian pact (has `signedPacts.length > 0`). This prevents access before the player engages with the pact system. ## What Needs to Change ### Data Layer 1. `src/lib/game/data/disciplines/invoker.ts` — full rewrite of both disciplines 2. Add new stat keys to the effect system: `pactAffinityBonus`, `guardianBoonMultiplier` ### Type Layer 3. `src/lib/game/types/disciplines.ts` — ensure new stat keys are supported in `DisciplineDefinition.statBonus.stat` ### Effect Layer 4. `src/lib/game/effects/discipline-effects.ts` — handle new stat keys 5. `src/lib/game/stores/gameStore.ts` — apply `pactAffinityBonus` in pact signing time reduction, apply `guardianBoonMultiplier` to guardian perk calculations ### Invoker Attunement Guard 6. `src/lib/game/stores/discipline-slice.ts` — invoker disciplines should check for `signedPacts.length > 0` before allowing activation ### Prerequisite Display 7. `src/lib/game/utils/discipline-math.ts` — prerequisite for invoker should display something like `"Requires: signed guardian pact"` instead of a raw ID ## Files - `src/lib/game/data/disciplines/invoker.ts` (full rewrite) - `src/lib/game/effects/discipline-effects.ts` - `src/lib/game/effects.ts` — ensure new stat keys merge correctly - `src/lib/game/stores/gameStore.ts` — apply pact affinity and boon bonuses - `src/lib/game/stores/discipline-slice.ts` — invoker-specific activation guard - `src/lib/game/utils/discipline-math.ts` — prereq display for invoker ## Dependency - Blocked by guardian pact issue fix (issue #2) — invoker disciplines need signed pacts to actually work - Blocked by perk numerical bonus fix (issue #1) — new perk bonuses need the perk system to actually function
Anexim added the ai:todo label 2026-05-26 15:26:06 +02:00
n8n-gitea was assigned by Anexim 2026-05-26 15:26:06 +02:00
Anexim changed title from refactor: Redesign Invoker disciplines to improve pact bonuses and guardian boons to [priority: medium-low] refactor: Redesign Invoker disciplines to improve pact bonuses and guardian boons 2026-05-26 15:30:47 +02:00
Author
Owner

Starting work on Invoker discipline redesign. Reading all affected files first.

Starting work on Invoker discipline redesign. Reading all affected files first.
Author
Owner

Successfully completed the Invoker discipline redesign. Here's a summary of all changes:

Data Layer (src/lib/game/data/disciplines/invoker.ts):

  • Removed spell-casting and void-manipulation disciplines
  • Added pact-attunement (light): XP-scaled pact affinity bonus, reduces pact signing time, boosts pact power. Includes once perk at 100 XP (unlock scaling), infinite perk at 200 XP (+5% affinity per 100 XP), and capped perk at 500 XP (+3% boon strength per 200 XP, max 5 tiers)
  • Added guardians-boon (dark): Guardian boon multiplier that scales all guardian unique perks. Includes once perk at 100 XP (+10% effectiveness) and capped perk at 200 XP (+5% per 350 XP, max 5 tiers)
  • Both disciplines require signed_pact prerequisite

Type/Effect Layer:

  • discipline-effects.ts: Added pactAffinityBonus and guardianBoonMultiplier to KNOWN_BONUS_STATS
  • effects.ts: Added pactAffinityBonus and guardianBoonMultiplier to UnifiedEffects interface and computeAllEffects() merge logic

Store Layer:

  • gameStore.ts: Pact signing now incorporates discipline pactAffinityBonus alongside prestige upgrade bonus (capped at 90%)
  • discipline-slice.ts: Invoker disciplines gated behind signedPacts.length > 0; added signedPacts to activate gameState type

Utility Layer:

  • discipline-math.ts: checkDisciplinePrerequisites handles signed_pact requirement → displays "Signed guardian pact"
  • combat-utils.ts: getBoonBonuses accepts optional guardianBoonMultiplier parameter (default 1.0) that scales all boon values

UI Layer:

  • DisciplinesTab.tsx: Passes signedPacts from prestige store to activate call

All 885 tests pass. Commit: 1aea72c

Successfully completed the Invoker discipline redesign. Here's a summary of all changes: **Data Layer** (`src/lib/game/data/disciplines/invoker.ts`): - Removed `spell-casting` and `void-manipulation` disciplines - Added `pact-attunement` (light): XP-scaled pact affinity bonus, reduces pact signing time, boosts pact power. Includes `once` perk at 100 XP (unlock scaling), `infinite` perk at 200 XP (+5% affinity per 100 XP), and `capped` perk at 500 XP (+3% boon strength per 200 XP, max 5 tiers) - Added `guardians-boon` (dark): Guardian boon multiplier that scales all guardian unique perks. Includes `once` perk at 100 XP (+10% effectiveness) and `capped` perk at 200 XP (+5% per 350 XP, max 5 tiers) - Both disciplines require `signed_pact` prerequisite **Type/Effect Layer**: - `discipline-effects.ts`: Added `pactAffinityBonus` and `guardianBoonMultiplier` to KNOWN_BONUS_STATS - `effects.ts`: Added `pactAffinityBonus` and `guardianBoonMultiplier` to `UnifiedEffects` interface and `computeAllEffects()` merge logic **Store Layer**: - `gameStore.ts`: Pact signing now incorporates discipline `pactAffinityBonus` alongside prestige upgrade bonus (capped at 90%) - `discipline-slice.ts`: Invoker disciplines gated behind `signedPacts.length > 0`; added `signedPacts` to `activate` gameState type **Utility Layer**: - `discipline-math.ts`: `checkDisciplinePrerequisites` handles `signed_pact` requirement → displays "Signed guardian pact" - `combat-utils.ts`: `getBoonBonuses` accepts optional `guardianBoonMultiplier` parameter (default 1.0) that scales all boon values **UI Layer**: - `DisciplinesTab.tsx`: Passes `signedPacts` from prestige store to `activate` call All 885 tests pass. Commit: 1aea72c
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Anexim/Mana-Loop#142