fix: make discipline perk numerical bonuses functional via structured BonusSpec
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m23s

- 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)
This commit is contained in:
2026-05-26 18:00:29 +02:00
parent ae30c4770c
commit da4f9eccb3
10 changed files with 88 additions and 15 deletions
@@ -31,6 +31,7 @@ function makeBaseRegen(id: string, name: string, manaType: string, cost: number)
threshold: 100,
value: 0,
description: `+${BASE_REGEN} ${name} Regen/tick`,
bonus: { stat: `regen_${shortId}`, amount: BASE_REGEN },
},
{
id: `${id}-inf`,
@@ -38,6 +39,7 @@ function makeBaseRegen(id: string, name: string, manaType: string, cost: number)
threshold: 300,
value: 100,
description: `Every 100 XP: +0.25 ${name} Regen/tick`,
bonus: { stat: `regen_${shortId}`, amount: 0.25 },
},
],
};
@@ -73,6 +75,7 @@ export const elementalRegenDisciplines: DisciplineDefinition[] = [
threshold: 100,
value: 0,
description: '+0.4 Transference Regen/tick',
bonus: { stat: 'regen_transference', amount: 0.4 },
},
{
id: 'regen-transference-inf',
@@ -80,6 +83,7 @@ export const elementalRegenDisciplines: DisciplineDefinition[] = [
threshold: 300,
value: 100,
description: 'Every 100 XP: +0.2 Transference Regen/tick',
bonus: { stat: 'regen_transference', amount: 0.2 },
},
],
},