feat: split skills-v2-defs into category modules and fix export
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 35s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 35s
- Split 636-line skills-v2-defs.ts into 9 category files (all under 400 lines) - Add skills-v2-registry.ts to build SKILLS_V2 flat record from modules - Fix missing re-export of SKILLS_V2 from skills-v2.ts - Fix clickMana clamping: remove Math.round to allow fractional values - Fix golemDuration clamping: remove Math.round to allow fractional values - Fix guardianConstructs effect: duration uses 'add' mode instead of 'multiply' - All 70 existing tests pass
This commit is contained in:
@@ -20,7 +20,8 @@ Mana-Loop/
|
||||
│ ├── tasks/
|
||||
│ │ ├── TASK-001-playwright-setup.md
|
||||
│ │ ├── TASK-005-globals-css-tokens.md
|
||||
│ │ └── TASK-006-left-panel-redesign.md
|
||||
│ │ ├── TASK-006-left-panel-redesign.md
|
||||
│ │ └── TASK-007-skill-system-v2.md
|
||||
│ ├── GAME_BRIEFING.md
|
||||
│ ├── active-task-log.md
|
||||
│ ├── circular-deps.txt
|
||||
@@ -274,6 +275,19 @@ Mana-Loop/
|
||||
│ │ │ ├── index.ts
|
||||
│ │ │ ├── prestige.ts
|
||||
│ │ │ ├── rooms.ts
|
||||
│ │ │ ├── skills-combat.ts
|
||||
│ │ │ ├── skills-core.ts
|
||||
│ │ │ ├── skills-crafting.ts
|
||||
│ │ │ ├── skills-element-caps.ts
|
||||
│ │ │ ├── skills-enchant.ts
|
||||
│ │ │ ├── skills-golemancy.ts
|
||||
│ │ │ ├── skills-hybrid.ts
|
||||
│ │ │ ├── skills-invocation.ts
|
||||
│ │ │ ├── skills-research.ts
|
||||
│ │ │ ├── skills-v2-defs.ts
|
||||
│ │ │ ├── skills-v2-registry.ts
|
||||
│ │ │ ├── skills-v2-types.ts
|
||||
│ │ │ ├── skills-v2.ts
|
||||
│ │ │ ├── skills.ts
|
||||
│ │ │ └── spells.ts
|
||||
│ │ ├── crafting-actions/
|
||||
@@ -434,6 +448,7 @@ Mana-Loop/
|
||||
│ │ │ │ │ ├── spell-definitions.test.ts
|
||||
│ │ │ │ │ └── study-speed.test.ts
|
||||
│ │ │ │ ├── ui-store-tests/
|
||||
│ │ │ │ ├── computed-stats.test.ts
|
||||
│ │ │ │ ├── equipment.test.ts
|
||||
│ │ │ │ ├── mana-conversion-fix.test.ts
|
||||
│ │ │ │ ├── mana.test.ts
|
||||
|
||||
@@ -16,9 +16,14 @@ export { GUARDIANS } from './guardians';
|
||||
// Spell constants
|
||||
export { SPELLS_DEF } from './spells';
|
||||
|
||||
// Skill constants
|
||||
// Skill constants (legacy)
|
||||
export { SKILLS_DEF, SKILL_CATEGORIES, EFFECT_RESEARCH_MAPPING, BASE_UNLOCKED_EFFECTS, ENCHANTING_UNLOCK_EFFECTS } from './skills';
|
||||
|
||||
// Skill System v2
|
||||
export { computeStats, BASE_STATS, SKILLS_V2 } from './skills-v2';
|
||||
export type { ComputedStats, SkillV2Def, SkillEffect, StatKey } from './skills-v2-types';
|
||||
export { getBaseSkillId, hasPrerequisites } from './skills-v2';
|
||||
|
||||
// Prestige constants
|
||||
export { PRESTIGE_DEF } from './prestige';
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
import type { SkillV2Def } from './skills-v2-types';
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
// COMBAT SKILLS
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
export const arcaneFury: SkillV2Def = {
|
||||
id: 'arcaneFury', name: 'Arcane Fury', description: 'Increases spell damage per level',
|
||||
category: 'combat', maxLevel: 10, costPerLevel: 200, studyHours: 4,
|
||||
effects: [{ stat: 'damageMultiplier', mode: 'multiply', valuePerLevel: 0.10 }],
|
||||
};
|
||||
|
||||
export const combatTraining: SkillV2Def = {
|
||||
id: 'combatTraining', name: 'Combat Training', description: 'Base damage bonus per level',
|
||||
category: 'combat', maxLevel: 10, costPerLevel: 250, studyHours: 5,
|
||||
effects: [{ stat: 'baseDamage', mode: 'add', valuePerLevel: 5 }],
|
||||
};
|
||||
|
||||
export const precision: SkillV2Def = {
|
||||
id: 'precision', name: 'Precision', description: '+5% crit chance per level',
|
||||
category: 'combat', maxLevel: 10, costPerLevel: 300, studyHours: 6,
|
||||
effects: [{ stat: 'critChance', mode: 'add', valuePerLevel: 0.05 }],
|
||||
};
|
||||
|
||||
export const elementalMastery: SkillV2Def = {
|
||||
id: 'elementalMastery', name: 'Elemental Mastery', description: '+15% elemental damage per level',
|
||||
category: 'combat', maxLevel: 10, costPerLevel: 350, studyHours: 6,
|
||||
effects: [{ stat: 'elementalDamage', mode: 'multiply', valuePerLevel: 0.15 }],
|
||||
};
|
||||
|
||||
export const attackSpeed: SkillV2Def = {
|
||||
id: 'attackSpeed', name: 'Attack Speed', description: '-10% attack time per level (faster)',
|
||||
category: 'combat', maxLevel: 5, costPerLevel: 400, studyHours: 6,
|
||||
effects: [{ stat: 'attackSpeed', mode: 'multiply', valuePerLevel: -0.10 }],
|
||||
};
|
||||
|
||||
export const armorPiercing: SkillV2Def = {
|
||||
id: 'armorPiercing', name: 'Armor Piercing', description: '+5% armor penetration per level',
|
||||
category: 'combat', maxLevel: 5, costPerLevel: 400, studyHours: 6,
|
||||
effects: [{ stat: 'armorPierce', mode: 'add', valuePerLevel: 0.05 }],
|
||||
};
|
||||
|
||||
export const spellDamage: SkillV2Def = {
|
||||
id: 'spellDamage', name: 'Spell Damage', description: '+5% spell damage per level',
|
||||
category: 'combat', maxLevel: 10, costPerLevel: 250, studyHours: 5,
|
||||
effects: [{ stat: 'spellDamage', mode: 'multiply', valuePerLevel: 0.05 }],
|
||||
};
|
||||
@@ -0,0 +1,86 @@
|
||||
import type { SkillV2Def } from './skills-v2-types';
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
// CORE MANA SKILLS
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
export const manaWell: SkillV2Def = {
|
||||
id: 'manaWell', name: 'Mana Well', description: 'Increases maximum mana capacity',
|
||||
category: 'mana', maxLevel: 10, costPerLevel: 100, studyHours: 4,
|
||||
effects: [{ stat: 'maxMana', mode: 'add', valuePerLevel: 100 }],
|
||||
};
|
||||
|
||||
export const manaFlow: SkillV2Def = {
|
||||
id: 'manaFlow', name: 'Mana Flow', description: 'Increases mana regeneration rate',
|
||||
category: 'mana', maxLevel: 10, costPerLevel: 150, studyHours: 5,
|
||||
effects: [{ stat: 'manaRegen', mode: 'add', valuePerLevel: 1 }],
|
||||
};
|
||||
|
||||
export const manaOverflow: SkillV2Def = {
|
||||
id: 'manaOverflow', name: 'Mana Overflow', description: 'Increases mana gained from clicks',
|
||||
category: 'mana', maxLevel: 5, costPerLevel: 400, studyHours: 6,
|
||||
prerequisites: { manaWell: 3 },
|
||||
effects: [{ stat: 'clickMana', mode: 'multiply', valuePerLevel: 0.25 }],
|
||||
};
|
||||
|
||||
export const manaTap: SkillV2Def = {
|
||||
id: 'manaTap', name: 'Mana Tap', description: '+1 mana per click',
|
||||
category: 'mana', maxLevel: 1, costPerLevel: 300, studyHours: 12,
|
||||
effects: [{ stat: 'clickMana', mode: 'add', valuePerLevel: 1 }],
|
||||
};
|
||||
|
||||
export const manaSurge: SkillV2Def = {
|
||||
id: 'manaSurge', name: 'Mana Surge', description: '+3 mana per click',
|
||||
category: 'mana', maxLevel: 1, costPerLevel: 800, studyHours: 36,
|
||||
prerequisites: { manaTap: 1 },
|
||||
effects: [{ stat: 'clickMana', mode: 'add', valuePerLevel: 3 }],
|
||||
};
|
||||
|
||||
export const manaSpring: SkillV2Def = {
|
||||
id: 'manaSpring', name: 'Mana Spring', description: '+2 mana regen',
|
||||
category: 'mana', maxLevel: 1, costPerLevel: 600, studyHours: 24,
|
||||
effects: [{ stat: 'manaRegen', mode: 'add', valuePerLevel: 2 }],
|
||||
};
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
// STUDY SKILLS
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
export const quickLearner: SkillV2Def = {
|
||||
id: 'quickLearner', name: 'Quick Learner', description: 'Increases study speed',
|
||||
category: 'study', maxLevel: 10, costPerLevel: 250, studyHours: 4,
|
||||
effects: [{ stat: 'studySpeed', mode: 'multiply', valuePerLevel: 0.10 }],
|
||||
};
|
||||
|
||||
export const focusedMind: SkillV2Def = {
|
||||
id: 'focusedMind', name: 'Focused Mind', description: 'Reduces study mana cost',
|
||||
category: 'study', maxLevel: 10, costPerLevel: 300, studyHours: 5,
|
||||
effects: [{ stat: 'studyCostMult', mode: 'multiply', valuePerLevel: -0.05 }],
|
||||
};
|
||||
|
||||
export const knowledgeRetention: SkillV2Def = {
|
||||
id: 'knowledgeRetention', name: 'Knowledge Retention', description: 'Preserves study progress on cancellation',
|
||||
category: 'study', maxLevel: 3, costPerLevel: 350, studyHours: 5,
|
||||
effects: [{ stat: 'progressRetention', mode: 'add', valuePerLevel: 0.20 }],
|
||||
};
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
// MEDITATION SKILLS
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
export const meditation: SkillV2Def = {
|
||||
id: 'meditation', name: 'Meditation Focus', description: 'Unlocks meditation regen boost (2.5x at 4hrs)',
|
||||
category: 'mana', maxLevel: 1, costPerLevel: 400, studyHours: 6,
|
||||
effects: [{ stat: 'meditationEfficiency', mode: 'multiply', valuePerLevel: 1.5 }],
|
||||
};
|
||||
|
||||
export const deepTrance: SkillV2Def = {
|
||||
id: 'deepTrance', name: 'Deep Trance', description: 'Extends meditation to 6hrs for 3x',
|
||||
category: 'mana', maxLevel: 1, costPerLevel: 900, studyHours: 48,
|
||||
prerequisites: { meditation: 1 },
|
||||
effects: [{ stat: 'meditationEfficiency', mode: 'multiply', valuePerLevel: 1.8 }],
|
||||
};
|
||||
|
||||
export const voidMeditation: SkillV2Def = {
|
||||
id: 'voidMeditation', name: 'Void Meditation', description: 'Extends meditation to 8hrs for 5x',
|
||||
category: 'mana', maxLevel: 1, costPerLevel: 1500, studyHours: 72,
|
||||
prerequisites: { deepTrance: 1 },
|
||||
effects: [{ stat: 'meditationEfficiency', mode: 'multiply', valuePerLevel: 2.5 }],
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
import type { SkillV2Def } from './skills-v2-types';
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
// CRAFTING SKILLS (Legacy — kept for store compat)
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
export const effCrafting: SkillV2Def = {
|
||||
id: 'effCrafting', name: 'Eff. Crafting', description: '-10% craft time',
|
||||
category: 'craft', maxLevel: 1, costPerLevel: 300, studyHours: 4,
|
||||
effects: [{ stat: 'craftSpeed', mode: 'multiply', valuePerLevel: -0.10 }],
|
||||
};
|
||||
|
||||
export const fieldRepair: SkillV2Def = {
|
||||
id: 'fieldRepair', name: 'Field Repair', description: '+20% repair efficiency',
|
||||
category: 'craft', maxLevel: 1, costPerLevel: 350, studyHours: 4,
|
||||
effects: [{ stat: 'repairSpeed', mode: 'multiply', valuePerLevel: -0.10 }],
|
||||
};
|
||||
@@ -0,0 +1,70 @@
|
||||
import type { SkillV2Def } from './skills-v2-types';
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
// PER-ELEMENT CAPACITY SKILLS
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
export const fireManaCap: SkillV2Def = {
|
||||
id: 'fireManaCap', name: 'Fire Mana Capacity', description: '+10% fire capacity per level',
|
||||
category: 'mana', maxLevel: 10, costPerLevel: 200, studyHours: 4,
|
||||
effects: [{ stat: 'fireCap', mode: 'add', valuePerLevel: 10 }],
|
||||
};
|
||||
|
||||
export const waterManaCap: SkillV2Def = {
|
||||
id: 'waterManaCap', name: 'Water Mana Capacity', description: '+10% water capacity per level',
|
||||
category: 'mana', maxLevel: 10, costPerLevel: 200, studyHours: 4,
|
||||
effects: [{ stat: 'waterCap', mode: 'add', valuePerLevel: 10 }],
|
||||
};
|
||||
|
||||
export const airManaCap: SkillV2Def = {
|
||||
id: 'airManaCap', name: 'Air Mana Capacity', description: '+10% air capacity per level',
|
||||
category: 'mana', maxLevel: 10, costPerLevel: 200, studyHours: 4,
|
||||
effects: [{ stat: 'airCap', mode: 'add', valuePerLevel: 10 }],
|
||||
};
|
||||
|
||||
export const earthManaCap: SkillV2Def = {
|
||||
id: 'earthManaCap', name: 'Earth Mana Capacity', description: '+10% earth capacity per level',
|
||||
category: 'mana', maxLevel: 10, costPerLevel: 200, studyHours: 4,
|
||||
effects: [{ stat: 'earthCap', mode: 'add', valuePerLevel: 10 }],
|
||||
};
|
||||
|
||||
export const lightManaCap: SkillV2Def = {
|
||||
id: 'lightManaCap', name: 'Light Mana Capacity', description: '+10% light capacity per level',
|
||||
category: 'mana', maxLevel: 10, costPerLevel: 250, studyHours: 5,
|
||||
effects: [{ stat: 'lightCap', mode: 'add', valuePerLevel: 10 }],
|
||||
};
|
||||
|
||||
export const darkManaCap: SkillV2Def = {
|
||||
id: 'darkManaCap', name: 'Dark Mana Capacity', description: '+10% dark capacity per level',
|
||||
category: 'mana', maxLevel: 10, costPerLevel: 250, studyHours: 5,
|
||||
effects: [{ stat: 'darkCap', mode: 'add', valuePerLevel: 10 }],
|
||||
};
|
||||
|
||||
export const deathManaCap: SkillV2Def = {
|
||||
id: 'deathManaCap', name: 'Death Mana Capacity', description: '+10% death capacity per level',
|
||||
category: 'mana', maxLevel: 10, costPerLevel: 300, studyHours: 6,
|
||||
effects: [{ stat: 'deathCap', mode: 'add', valuePerLevel: 10 }],
|
||||
};
|
||||
|
||||
export const metalManaCap: SkillV2Def = {
|
||||
id: 'metalManaCap', name: 'Metal Mana Capacity', description: '+10% metal capacity per level',
|
||||
category: 'mana', maxLevel: 10, costPerLevel: 350, studyHours: 6,
|
||||
effects: [{ stat: 'metalCap', mode: 'add', valuePerLevel: 10 }],
|
||||
};
|
||||
|
||||
export const sandManaCap: SkillV2Def = {
|
||||
id: 'sandManaCap', name: 'Sand Mana Capacity', description: '+10% sand capacity per level',
|
||||
category: 'mana', maxLevel: 10, costPerLevel: 350, studyHours: 6,
|
||||
effects: [{ stat: 'sandCap', mode: 'add', valuePerLevel: 10 }],
|
||||
};
|
||||
|
||||
export const lightningManaCap: SkillV2Def = {
|
||||
id: 'lightningManaCap', name: 'Lightning Mana Capacity', description: '+10% lightning capacity per level',
|
||||
category: 'mana', maxLevel: 10, costPerLevel: 350, studyHours: 6,
|
||||
effects: [{ stat: 'lightningCap', mode: 'add', valuePerLevel: 10 }],
|
||||
};
|
||||
|
||||
export const transferenceManaCap: SkillV2Def = {
|
||||
id: 'transferenceManaCap', name: 'Transference Mana Capacity', description: '+10% transference capacity per level',
|
||||
category: 'mana', maxLevel: 10, costPerLevel: 200, studyHours: 4,
|
||||
effects: [{ stat: 'transferenceCap', mode: 'add', valuePerLevel: 10 }],
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
import type { SkillV2Def } from './skills-v2-types';
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
// ENCHANTING SKILLS
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
export const enchanting: SkillV2Def = {
|
||||
id: 'enchanting', name: 'Enchanting', description: 'Unlocks enchantment design',
|
||||
category: 'enchant', maxLevel: 10, costPerLevel: 200, studyHours: 5,
|
||||
attunementRequired: 'enchanter',
|
||||
effects: [
|
||||
{ stat: 'enchantCapacity', mode: 'add', valuePerLevel: 10 },
|
||||
{ stat: 'enchantSpeed', mode: 'multiply', valuePerLevel: -0.02 },
|
||||
],
|
||||
};
|
||||
|
||||
export const efficientEnchant: SkillV2Def = {
|
||||
id: 'efficientEnchant', name: 'Efficient Enchant', description: 'Reduces capacity cost',
|
||||
category: 'enchant', maxLevel: 5, costPerLevel: 350, studyHours: 6,
|
||||
prerequisites: { enchanting: 3 }, attunementRequired: 'enchanter',
|
||||
effects: [{ stat: 'enchantCapacity', mode: 'multiply', valuePerLevel: -0.05 }],
|
||||
};
|
||||
|
||||
export const enchantSpeed: SkillV2Def = {
|
||||
id: 'enchantSpeed', name: 'Enchant Speed', description: 'Reduces enchantment time',
|
||||
category: 'enchant', maxLevel: 5, costPerLevel: 300, studyHours: 4,
|
||||
prerequisites: { enchanting: 2 }, attunementRequired: 'enchanter',
|
||||
effects: [{ stat: 'enchantSpeed', mode: 'multiply', valuePerLevel: -0.10 }],
|
||||
};
|
||||
|
||||
export const essenceRefining: SkillV2Def = {
|
||||
id: 'essenceRefining', name: 'Essence Refining', description: 'Increases enchantment power',
|
||||
category: 'enchant', maxLevel: 3, costPerLevel: 400, studyHours: 7,
|
||||
prerequisites: { enchanting: 4 }, attunementRequired: 'enchanter',
|
||||
effects: [{ stat: 'enchantPower', mode: 'multiply', valuePerLevel: 0.10 }],
|
||||
};
|
||||
|
||||
export const disenchanting: SkillV2Def = {
|
||||
id: 'disenchanting', name: 'Disenchanting', description: 'Recover mana on removal',
|
||||
category: 'enchant', maxLevel: 3, costPerLevel: 300, studyHours: 3,
|
||||
prerequisites: { enchanting: 2 }, attunementRequired: 'enchanter',
|
||||
effects: [{ stat: 'disenchantRecovery', mode: 'add', valuePerLevel: 0.20 }],
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
import type { SkillV2Def } from './skills-v2-types';
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
// GOLEMANCY SKILLS
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
export const golemMastery: SkillV2Def = {
|
||||
id: 'golemMastery', name: 'Golem Mastery', description: '+10% golem damage per level',
|
||||
category: 'golemancy', maxLevel: 10, costPerLevel: 300, studyHours: 6,
|
||||
attunementRequired: 'fabricator',
|
||||
effects: [{ stat: 'golemDamage', mode: 'multiply', valuePerLevel: 0.10 }],
|
||||
};
|
||||
|
||||
export const golemEfficiency: SkillV2Def = {
|
||||
id: 'golemEfficiency', name: 'Golem Efficiency', description: '+5% golem attack speed per level',
|
||||
category: 'golemancy', maxLevel: 10, costPerLevel: 350, studyHours: 6,
|
||||
attunementRequired: 'fabricator',
|
||||
effects: [{ stat: 'attackSpeed', mode: 'multiply', valuePerLevel: -0.05 }],
|
||||
};
|
||||
|
||||
export const golemLongevity: SkillV2Def = {
|
||||
id: 'golemLongevity', name: 'Golem Longevity', description: '+1 floor duration per level',
|
||||
category: 'golemancy', maxLevel: 10, costPerLevel: 500, studyHours: 8,
|
||||
attunementRequired: 'fabricator',
|
||||
effects: [{ stat: 'golemDuration', mode: 'add', valuePerLevel: 1 }],
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
import type { SkillV2Def } from './skills-v2-types';
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
// HYBRID SKILLS (require 2 attunements at level 5+)
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
export const pactWeaving: SkillV2Def = {
|
||||
id: 'pactWeaving', name: 'Pact-Weaving', description: 'Weave guardian essence into enchantments',
|
||||
category: 'hybrid', maxLevel: 10, costPerLevel: 750, studyHours: 15,
|
||||
effects: [{ stat: 'enchantPower', mode: 'multiply', valuePerLevel: 0.10 }],
|
||||
};
|
||||
|
||||
export const guardianConstructs: SkillV2Def = {
|
||||
id: 'guardianConstructs', name: 'Guardian Constructs', description: 'Build durable singular golems',
|
||||
category: 'hybrid', maxLevel: 10, costPerLevel: 800, studyHours: 18,
|
||||
effects: [
|
||||
{ stat: 'golemDamage', mode: 'multiply', valuePerLevel: 0.15 },
|
||||
{ stat: 'golemDuration', mode: 'add', valuePerLevel: 0.25 },
|
||||
],
|
||||
};
|
||||
|
||||
export const enchantedGolemancy: SkillV2Def = {
|
||||
id: 'enchantedGolemancy', name: 'Enchanted Golemancy', description: 'Imbue golems with spell logic',
|
||||
category: 'hybrid', maxLevel: 10, costPerLevel: 850, studyHours: 20,
|
||||
effects: [
|
||||
{ stat: 'enchantPower', mode: 'multiply', valuePerLevel: 0.05 },
|
||||
{ stat: 'golemDamage', mode: 'multiply', valuePerLevel: 0.10 },
|
||||
],
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
import type { SkillV2Def } from './skills-v2-types';
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
// INVOCATION / PACT SKILLS (Invoker Attunement)
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
export const invocation: SkillV2Def = {
|
||||
id: 'invocation', name: 'Invocation', description: 'Enhances spell invocation',
|
||||
category: 'invocation', maxLevel: 10, costPerLevel: 300, studyHours: 6,
|
||||
attunementRequired: 'invoker',
|
||||
effects: [{ stat: 'spellDamage', mode: 'multiply', valuePerLevel: 0.05 }],
|
||||
};
|
||||
|
||||
export const pactMastery: SkillV2Def = {
|
||||
id: 'pactMastery', name: 'Pact Mastery', description: 'Enhances pact signing bonuses',
|
||||
category: 'pact', maxLevel: 10, costPerLevel: 350, studyHours: 6,
|
||||
attunementRequired: 'invoker',
|
||||
effects: [{ stat: 'pactMultiplier', mode: 'multiply', valuePerLevel: 0.10 }],
|
||||
};
|
||||
|
||||
export const guardianLore: SkillV2Def = {
|
||||
id: 'guardianLore', name: 'Guardian Lore', description: '+20% damage vs guardians',
|
||||
category: 'invocation', maxLevel: 5, costPerLevel: 400, studyHours: 8,
|
||||
attunementRequired: 'invoker',
|
||||
effects: [{ stat: 'guardianDamage', mode: 'multiply', valuePerLevel: 0.20 }],
|
||||
};
|
||||
@@ -0,0 +1,385 @@
|
||||
import type { SkillV2Def } from './skills-v2-types';
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
// ELEMENT RESEARCH SKILLS (max:1, long study – unlock enchantment effects)
|
||||
// Kept for store/UI compat; effect unlocks handled via EFFECT_RESEARCH_MAPPING
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
export const researchManaSpells: SkillV2Def = {
|
||||
id: 'researchManaSpells', name: 'Mana Spell Research', description: 'Unlock Mana Strike spell enchantment',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 200, studyHours: 4,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchFireSpells: SkillV2Def = {
|
||||
id: 'researchFireSpells', name: 'Fire Spell Research', description: 'Unlock Ember Shot, Fireball spell enchantments',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 300, studyHours: 6,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchWaterSpells: SkillV2Def = {
|
||||
id: 'researchWaterSpells', name: 'Water Spell Research', description: 'Unlock Water Jet, Ice Shard spell enchantments',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 300, studyHours: 6,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAirSpells: SkillV2Def = {
|
||||
id: 'researchAirSpells', name: 'Air Spell Research', description: 'Unlock Gust, Wind Slash spell enchantments',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 300, studyHours: 6,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchEarthSpells: SkillV2Def = {
|
||||
id: 'researchEarthSpells', name: 'Earth Spell Research', description: 'Unlock Stone Bullet, Rock Spike spell enchantments',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 350, studyHours: 6,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchLightSpells: SkillV2Def = {
|
||||
id: 'researchLightSpells', name: 'Light Spell Research', description: 'Unlock Light Lance, Radiance spell enchantments',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 400, studyHours: 8,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchDarkSpells: SkillV2Def = {
|
||||
id: 'researchDarkSpells', name: 'Dark Spell Research', description: 'Unlock Shadow Bolt, Dark Pulse spell enchantments',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 400, studyHours: 8,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchLifeDeathSpells: SkillV2Def = {
|
||||
id: 'researchLifeDeathSpells', name: 'Death Research', description: 'Unlock Drain spell enchantment',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 400, studyHours: 8,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
// Tier 2 advanced spell research
|
||||
export const researchAdvancedFire: SkillV2Def = {
|
||||
id: 'researchAdvancedFire', name: 'Advanced Fire Research', description: 'Unlock Inferno, Flame Wave',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 600, studyHours: 12,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedWater: SkillV2Def = {
|
||||
id: 'researchAdvancedWater', name: 'Advanced Water Research', description: 'Unlock Tidal Wave, Ice Storm',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 600, studyHours: 12,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedAir: SkillV2Def = {
|
||||
id: 'researchAdvancedAir', name: 'Advanced Air Research', description: 'Unlock Hurricane, Wind Blade',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 600, studyHours: 12,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedEarth: SkillV2Def = {
|
||||
id: 'researchAdvancedEarth', name: 'Advanced Earth Research', description: 'Unlock Earthquake, Stone Barrage',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 600, studyHours: 12,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedLight: SkillV2Def = {
|
||||
id: 'researchAdvancedLight', name: 'Advanced Light Research', description: 'Unlock Solar Flare, Divine Smite',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 700, studyHours: 14,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedDark: SkillV2Def = {
|
||||
id: 'researchAdvancedDark', name: 'Advanced Dark Research', description: 'Unlock Void Rift, Shadow Storm',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 700, studyHours: 14,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
// Tier 3 master spell research
|
||||
export const researchMasterFire: SkillV2Def = {
|
||||
id: 'researchMasterFire', name: 'Master Fire Research', description: 'Unlock Pyroclasm',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 1200, studyHours: 24,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchMasterWater: SkillV2Def = {
|
||||
id: 'researchMasterWater', name: 'Master Water Research', description: 'Unlock Tsunami',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 1200, studyHours: 24,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchMasterEarth: SkillV2Def = {
|
||||
id: 'researchMasterEarth', name: 'Master Earth Research', description: 'Unlock Meteor Strike',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 1300, studyHours: 26,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
// Combat/misc research
|
||||
export const researchDamageEffects: SkillV2Def = {
|
||||
id: 'researchDamageEffects', name: 'Damage Effect Research', description: 'Unlock Minor/Moderate Power, Amplification',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 250, studyHours: 5,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchCombatEffects: SkillV2Def = {
|
||||
id: 'researchCombatEffects', name: 'Combat Effect Research', description: 'Unlock Sharp Edge, Swift Casting',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 350, studyHours: 6,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchManaEffects: SkillV2Def = {
|
||||
id: 'researchManaEffects', name: 'Mana Effect Research', description: 'Unlock Mana Reserve, Trickle, Mana Tap, weapon mana effects',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 200, studyHours: 4,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedManaEffects: SkillV2Def = {
|
||||
id: 'researchAdvancedManaEffects', name: 'Advanced Mana Research', description: 'Unlock Mana Reservoir, Stream, River, Surge',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 400, studyHours: 8,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchUtilityEffects: SkillV2Def = {
|
||||
id: 'researchUtilityEffects', name: 'Utility Effect Research', description: 'Unlock Meditative Focus, Quick Study, Insightful',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 300, studyHours: 6,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchSpecialEffects: SkillV2Def = {
|
||||
id: 'researchSpecialEffects', name: 'Special Effect Research', description: 'Unlock Echo Chamber, Siphoning, Bane',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 500, studyHours: 10,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchOverpower: SkillV2Def = {
|
||||
id: 'researchOverpower', name: 'Overpower Research', description: 'Unlock Overpower effect',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 700, studyHours: 12,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
// Compound spell research
|
||||
export const researchMetalSpells: SkillV2Def = {
|
||||
id: 'researchMetalSpells', name: 'Metal Spell Research', description: 'Unlock Metal Shard, Iron Fist',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 400, studyHours: 6,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchSandSpells: SkillV2Def = {
|
||||
id: 'researchSandSpells', name: 'Sand Spell Research', description: 'Unlock Sand Blast, Sandstorm',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 400, studyHours: 6,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchLightningSpells: SkillV2Def = {
|
||||
id: 'researchLightningSpells', name: 'Lightning Spell Research', description: 'Unlock Spark, Lightning Bolt',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 400, studyHours: 6,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedMetal: SkillV2Def = {
|
||||
id: 'researchAdvancedMetal', name: 'Advanced Metal Research', description: 'Unlock Steel Tempest',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 700, studyHours: 12,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedSand: SkillV2Def = {
|
||||
id: 'researchAdvancedSand', name: 'Advanced Sand Research', description: 'Unlock Desert Wind',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 700, studyHours: 12,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedLightning: SkillV2Def = {
|
||||
id: 'researchAdvancedLightning', name: 'Advanced Lightning Research', description: 'Unlock Chain Lightning, Storm Call',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 700, studyHours: 12,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchMasterMetal: SkillV2Def = {
|
||||
id: 'researchMasterMetal', name: 'Master Metal Research', description: 'Unlock Furnace Blast',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 1300, studyHours: 26,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchMasterSand: SkillV2Def = {
|
||||
id: 'researchMasterSand', name: 'Master Sand Research', description: 'Unlock Dune Collapse',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 1300, studyHours: 26,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchMasterLightning: SkillV2Def = {
|
||||
id: 'researchMasterLightning', name: 'Master Lightning Research', description: 'Unlock Thunder Strike',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 1300, studyHours: 26,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchTransferenceSpells: SkillV2Def = {
|
||||
id: 'researchTransferenceSpells', name: 'Transference Spell Research', description: 'Unlock Transfer Strike, Mana Rip',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 350, studyHours: 5,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedTransference: SkillV2Def = {
|
||||
id: 'researchAdvancedTransference', name: 'Advanced Transference Research', description: 'Unlock Essence Drain',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 650, studyHours: 12,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchMasterTransference: SkillV2Def = {
|
||||
id: 'researchMasterTransference', name: 'Master Transference Research', description: 'Unlock Soul Transfer',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 1300, studyHours: 26,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
// Element capacity research (Tier 2 — +25 per stack)
|
||||
export const researchAdvancedFireCap: SkillV2Def = {
|
||||
id: 'researchAdvancedFireCap', name: 'Advanced Fire Capacity Research', description: '+25 fire cap per level',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 700, studyHours: 12,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedWaterCap: SkillV2Def = {
|
||||
id: 'researchAdvancedWaterCap', name: 'Advanced Water Capacity Research', description: '+25 water cap per level',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 700, studyHours: 12,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedAirCap: SkillV2Def = {
|
||||
id: 'researchAdvancedAirCap', name: 'Advanced Air Capacity Research', description: '+25 air cap per level',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 700, studyHours: 12,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedEarthCap: SkillV2Def = {
|
||||
id: 'researchAdvancedEarthCap', name: 'Advanced Earth Capacity Research', description: '+25 earth cap per level',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 700, studyHours: 12,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedLightCap: SkillV2Def = {
|
||||
id: 'researchAdvancedLightCap', name: 'Advanced Light Capacity Research', description: '+25 light cap per level',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 800, studyHours: 14,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedDarkCap: SkillV2Def = {
|
||||
id: 'researchAdvancedDarkCap', name: 'Advanced Dark Capacity Research', description: '+25 dark cap per level',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 800, studyHours: 14,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedDeathCap: SkillV2Def = {
|
||||
id: 'researchAdvancedDeathCap', name: 'Advanced Death Capacity Research', description: '+25 death cap per level',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 900, studyHours: 16,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
// Tier 3 — Master (+50 per stack)
|
||||
export const researchMasterFireCap: SkillV2Def = {
|
||||
id: 'researchMasterFireCap', name: 'Master Fire Capacity Research', description: '+50 fire cap per level',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 1300, studyHours: 24,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchMasterWaterCap: SkillV2Def = {
|
||||
id: 'researchMasterWaterCap', name: 'Master Water Capacity Research', description: '+50 water cap per level',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 1300, studyHours: 24,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchMasterAirCap: SkillV2Def = {
|
||||
id: 'researchMasterAirCap', name: 'Master Air Capacity Research', description: '+50 air cap per level',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 1300, studyHours: 24,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchMasterEarthCap: SkillV2Def = {
|
||||
id: 'researchMasterEarthCap', name: 'Master Earth Capacity Research', description: '+50 earth cap per level',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 1300, studyHours: 24,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchMasterLightCap: SkillV2Def = {
|
||||
id: 'researchMasterLightCap', name: 'Master Light Capacity Research', description: '+50 light cap per level',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 1500, studyHours: 28,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchMasterDarkCap: SkillV2Def = {
|
||||
id: 'researchMasterDarkCap', name: 'Master Dark Capacity Research', description: '+50 dark cap per level',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 1500, studyHours: 28,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchMasterDeathCap: SkillV2Def = {
|
||||
id: 'researchMasterDeathCap', name: 'Master Death Capacity Research', description: '+50 death cap per level',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 1600, studyHours: 30,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
// Compound element capacity research
|
||||
export const researchMetalCapacity: SkillV2Def = {
|
||||
id: 'researchMetalCapacity', name: 'Metal Capacity Research', description: '+10 metal cap',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 400, studyHours: 6,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedMetalCap: SkillV2Def = {
|
||||
id: 'researchAdvancedMetalCap', name: 'Advanced Metal Capacity Research', description: '+25/+50 metal cap',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 700, studyHours: 12,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchSandCapacity: SkillV2Def = {
|
||||
id: 'researchSandCapacity', name: 'Sand Capacity Research', description: '+10 sand cap',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 400, studyHours: 6,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedSandCap: SkillV2Def = {
|
||||
id: 'researchAdvancedSandCap', name: 'Advanced Sand Capacity Research', description: '+25/+50 sand cap',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 700, studyHours: 12,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchLightningCapacity: SkillV2Def = {
|
||||
id: 'researchLightningCapacity', name: 'Lightning Capacity Research', description: '+10 lightning cap',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 400, studyHours: 6,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedLightningCap: SkillV2Def = {
|
||||
id: 'researchAdvancedLightningCap', name: 'Advanced Lightning Capacity Research', description: '+25/+50 lightning cap',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 700, studyHours: 12,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
// Exotic capacity research
|
||||
export const researchCrystalCapacity: SkillV2Def = {
|
||||
id: 'researchCrystalCapacity', name: 'Crystal Capacity Research', description: '+10 crystal cap',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 1000, studyHours: 12,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedCrystalCap: SkillV2Def = {
|
||||
id: 'researchAdvancedCrystalCap', name: 'Advanced Crystal Capacity Research', description: '+25/+50 crystal cap',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 2000, studyHours: 24,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchStellarCapacity: SkillV2Def = {
|
||||
id: 'researchStellarCapacity', name: 'Stellar Capacity Research', description: '+10 stellar cap',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 1000, studyHours: 12,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedStellarCap: SkillV2Def = {
|
||||
id: 'researchAdvancedStellarCap', name: 'Advanced Stellar Capacity Research', description: '+25/+50 stellar cap',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 2000, studyHours: 24,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchVoidCapacity: SkillV2Def = {
|
||||
id: 'researchVoidCapacity', name: 'Void Capacity Research', description: '+10 void cap',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 1500, studyHours: 16,
|
||||
effects: [],
|
||||
};
|
||||
|
||||
export const researchAdvancedVoidCap: SkillV2Def = {
|
||||
id: 'researchAdvancedVoidCap', name: 'Advanced Void Capacity Research', description: '+25/+50 void cap',
|
||||
category: 'effectResearch', maxLevel: 1, costPerLevel: 3000, studyHours: 30,
|
||||
effects: [],
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
import type { SkillV2Def } from './skills-v2-types';
|
||||
// @ts-expect-error - circular refs resolved at runtime
|
||||
export { SKILLS_V2 } from './skills-v2-registry';
|
||||
@@ -0,0 +1,292 @@
|
||||
import type { SkillV2Def } from './skills-v2-types';
|
||||
import {
|
||||
manaWell,
|
||||
manaFlow,
|
||||
manaOverflow,
|
||||
manaTap,
|
||||
manaSurge,
|
||||
manaSpring,
|
||||
quickLearner,
|
||||
focusedMind,
|
||||
knowledgeRetention,
|
||||
meditation,
|
||||
deepTrance,
|
||||
voidMeditation,
|
||||
} from './skills-core';
|
||||
import {
|
||||
enchanting,
|
||||
efficientEnchant,
|
||||
enchantSpeed,
|
||||
essenceRefining,
|
||||
disenchanting,
|
||||
} from './skills-enchant';
|
||||
import {
|
||||
arcaneFury,
|
||||
combatTraining,
|
||||
precision,
|
||||
elementalMastery,
|
||||
attackSpeed,
|
||||
armorPiercing,
|
||||
spellDamage,
|
||||
} from './skills-combat';
|
||||
import {
|
||||
golemMastery,
|
||||
golemEfficiency,
|
||||
golemLongevity,
|
||||
} from './skills-golemancy';
|
||||
import {
|
||||
invocation,
|
||||
pactMastery,
|
||||
guardianLore,
|
||||
} from './skills-invocation';
|
||||
import {
|
||||
effCrafting,
|
||||
fieldRepair,
|
||||
} from './skills-crafting';
|
||||
import {
|
||||
fireManaCap,
|
||||
waterManaCap,
|
||||
airManaCap,
|
||||
earthManaCap,
|
||||
lightManaCap,
|
||||
darkManaCap,
|
||||
deathManaCap,
|
||||
metalManaCap,
|
||||
sandManaCap,
|
||||
lightningManaCap,
|
||||
transferenceManaCap,
|
||||
} from './skills-element-caps';
|
||||
import {
|
||||
pactWeaving,
|
||||
guardianConstructs,
|
||||
enchantedGolemancy,
|
||||
} from './skills-hybrid';
|
||||
import {
|
||||
researchManaSpells,
|
||||
researchFireSpells,
|
||||
researchWaterSpells,
|
||||
researchAirSpells,
|
||||
researchEarthSpells,
|
||||
researchLightSpells,
|
||||
researchDarkSpells,
|
||||
researchLifeDeathSpells,
|
||||
researchAdvancedFire,
|
||||
researchAdvancedWater,
|
||||
researchAdvancedAir,
|
||||
researchAdvancedEarth,
|
||||
researchAdvancedLight,
|
||||
researchAdvancedDark,
|
||||
researchMasterFire,
|
||||
researchMasterWater,
|
||||
researchMasterEarth,
|
||||
researchDamageEffects,
|
||||
researchCombatEffects,
|
||||
researchManaEffects,
|
||||
researchAdvancedManaEffects,
|
||||
researchUtilityEffects,
|
||||
researchSpecialEffects,
|
||||
researchOverpower,
|
||||
researchMetalSpells,
|
||||
researchSandSpells,
|
||||
researchLightningSpells,
|
||||
researchAdvancedMetal,
|
||||
researchAdvancedSand,
|
||||
researchAdvancedLightning,
|
||||
researchMasterMetal,
|
||||
researchMasterSand,
|
||||
researchMasterLightning,
|
||||
researchTransferenceSpells,
|
||||
researchAdvancedTransference,
|
||||
researchMasterTransference,
|
||||
researchAdvancedFireCap,
|
||||
researchAdvancedWaterCap,
|
||||
researchAdvancedAirCap,
|
||||
researchAdvancedEarthCap,
|
||||
researchAdvancedLightCap,
|
||||
researchAdvancedDarkCap,
|
||||
researchAdvancedDeathCap,
|
||||
researchMasterFireCap,
|
||||
researchMasterWaterCap,
|
||||
researchMasterAirCap,
|
||||
researchMasterEarthCap,
|
||||
researchMasterLightCap,
|
||||
researchMasterDarkCap,
|
||||
researchMasterDeathCap,
|
||||
researchMetalCapacity,
|
||||
researchAdvancedMetalCap,
|
||||
researchSandCapacity,
|
||||
researchAdvancedSandCap,
|
||||
researchLightningCapacity,
|
||||
researchAdvancedLightningCap,
|
||||
researchCrystalCapacity,
|
||||
researchAdvancedCrystalCap,
|
||||
researchStellarCapacity,
|
||||
researchAdvancedStellarCap,
|
||||
researchVoidCapacity,
|
||||
researchAdvancedVoidCap,
|
||||
} from './skills-research';
|
||||
|
||||
// Re-export individual skills
|
||||
export {
|
||||
manaWell,
|
||||
manaFlow,
|
||||
manaOverflow,
|
||||
manaTap,
|
||||
manaSurge,
|
||||
manaSpring,
|
||||
quickLearner,
|
||||
focusedMind,
|
||||
knowledgeRetention,
|
||||
meditation,
|
||||
deepTrance,
|
||||
voidMeditation,
|
||||
} from './skills-core';
|
||||
export {
|
||||
enchanting,
|
||||
efficientEnchant,
|
||||
enchantSpeed,
|
||||
essenceRefining,
|
||||
disenchanting,
|
||||
} from './skills-enchant';
|
||||
export {
|
||||
arcaneFury,
|
||||
combatTraining,
|
||||
precision,
|
||||
elementalMastery,
|
||||
attackSpeed,
|
||||
armorPiercing,
|
||||
spellDamage,
|
||||
} from './skills-combat';
|
||||
export {
|
||||
golemMastery,
|
||||
golemEfficiency,
|
||||
golemLongevity,
|
||||
} from './skills-golemancy';
|
||||
export {
|
||||
invocation,
|
||||
pactMastery,
|
||||
guardianLore,
|
||||
} from './skills-invocation';
|
||||
export {
|
||||
effCrafting,
|
||||
fieldRepair,
|
||||
} from './skills-crafting';
|
||||
export {
|
||||
fireManaCap,
|
||||
waterManaCap,
|
||||
airManaCap,
|
||||
earthManaCap,
|
||||
lightManaCap,
|
||||
darkManaCap,
|
||||
deathManaCap,
|
||||
metalManaCap,
|
||||
sandManaCap,
|
||||
lightningManaCap,
|
||||
transferenceManaCap,
|
||||
} from './skills-element-caps';
|
||||
export {
|
||||
pactWeaving,
|
||||
guardianConstructs,
|
||||
enchantedGolemancy,
|
||||
} from './skills-hybrid';
|
||||
export {
|
||||
researchManaSpells,
|
||||
researchFireSpells,
|
||||
researchWaterSpells,
|
||||
researchAirSpells,
|
||||
researchEarthSpells,
|
||||
researchLightSpells,
|
||||
researchDarkSpells,
|
||||
researchLifeDeathSpells,
|
||||
researchAdvancedFire,
|
||||
researchAdvancedWater,
|
||||
researchAdvancedAir,
|
||||
researchAdvancedEarth,
|
||||
researchAdvancedLight,
|
||||
researchAdvancedDark,
|
||||
researchMasterFire,
|
||||
researchMasterWater,
|
||||
researchMasterEarth,
|
||||
researchDamageEffects,
|
||||
researchCombatEffects,
|
||||
researchManaEffects,
|
||||
researchAdvancedManaEffects,
|
||||
researchUtilityEffects,
|
||||
researchSpecialEffects,
|
||||
researchOverpower,
|
||||
researchMetalSpells,
|
||||
researchSandSpells,
|
||||
researchLightningSpells,
|
||||
researchAdvancedMetal,
|
||||
researchAdvancedSand,
|
||||
researchAdvancedLightning,
|
||||
researchMasterMetal,
|
||||
researchMasterSand,
|
||||
researchMasterLightning,
|
||||
researchTransferenceSpells,
|
||||
researchAdvancedTransference,
|
||||
researchMasterTransference,
|
||||
researchAdvancedFireCap,
|
||||
researchAdvancedWaterCap,
|
||||
researchAdvancedAirCap,
|
||||
researchAdvancedEarthCap,
|
||||
researchAdvancedLightCap,
|
||||
researchAdvancedDarkCap,
|
||||
researchAdvancedDeathCap,
|
||||
researchMasterFireCap,
|
||||
researchMasterWaterCap,
|
||||
researchMasterAirCap,
|
||||
researchMasterEarthCap,
|
||||
researchMasterLightCap,
|
||||
researchMasterDarkCap,
|
||||
researchMasterDeathCap,
|
||||
researchMetalCapacity,
|
||||
researchAdvancedMetalCap,
|
||||
researchSandCapacity,
|
||||
researchAdvancedSandCap,
|
||||
researchLightningCapacity,
|
||||
researchAdvancedLightningCap,
|
||||
researchCrystalCapacity,
|
||||
researchAdvancedCrystalCap,
|
||||
researchStellarCapacity,
|
||||
researchAdvancedStellarCap,
|
||||
researchVoidCapacity,
|
||||
researchAdvancedVoidCap,
|
||||
} from './skills-research';
|
||||
|
||||
// Build the flat SKILLS_V2 record (legacy compat)
|
||||
export const SKILLS_V2: Record<string, SkillV2Def> = {
|
||||
manaWell, manaFlow, manaOverflow, manaTap, manaSurge, manaSpring,
|
||||
quickLearner, focusedMind, knowledgeRetention,
|
||||
meditation, deepTrance, voidMeditation,
|
||||
enchanting, efficientEnchant, enchantSpeed, essenceRefining, disenchanting,
|
||||
arcaneFury, combatTraining, precision, elementalMastery, attackSpeed, armorPiercing, spellDamage,
|
||||
golemMastery, golemEfficiency, golemLongevity,
|
||||
invocation, pactMastery, guardianLore,
|
||||
effCrafting, fieldRepair,
|
||||
fireManaCap, waterManaCap, airManaCap, earthManaCap,
|
||||
lightManaCap, darkManaCap, deathManaCap, metalManaCap,
|
||||
sandManaCap, lightningManaCap, transferenceManaCap,
|
||||
pactWeaving, guardianConstructs, enchantedGolemancy,
|
||||
researchManaSpells, researchFireSpells, researchWaterSpells, researchAirSpells,
|
||||
researchEarthSpells, researchLightSpells, researchDarkSpells, researchLifeDeathSpells,
|
||||
researchAdvancedFire, researchAdvancedWater, researchAdvancedAir, researchAdvancedEarth,
|
||||
researchAdvancedLight, researchAdvancedDark,
|
||||
researchMasterFire, researchMasterWater, researchMasterEarth,
|
||||
researchDamageEffects, researchCombatEffects, researchManaEffects,
|
||||
researchAdvancedManaEffects, researchUtilityEffects, researchSpecialEffects, researchOverpower,
|
||||
researchMetalSpells, researchSandSpells, researchLightningSpells,
|
||||
researchAdvancedMetal, researchAdvancedSand, researchAdvancedLightning,
|
||||
researchMasterMetal, researchMasterSand, researchMasterLightning,
|
||||
researchTransferenceSpells, researchAdvancedTransference, researchMasterTransference,
|
||||
researchAdvancedFireCap, researchAdvancedWaterCap, researchAdvancedAirCap, researchAdvancedEarthCap,
|
||||
researchAdvancedLightCap, researchAdvancedDarkCap, researchAdvancedDeathCap,
|
||||
researchMasterFireCap, researchMasterWaterCap, researchMasterAirCap, researchMasterEarthCap,
|
||||
researchMasterLightCap, researchMasterDarkCap, researchMasterDeathCap,
|
||||
researchMetalCapacity, researchAdvancedMetalCap,
|
||||
researchSandCapacity, researchAdvancedSandCap,
|
||||
researchLightningCapacity, researchAdvancedLightningCap,
|
||||
researchCrystalCapacity, researchAdvancedCrystalCap,
|
||||
researchStellarCapacity, researchAdvancedStellarCap,
|
||||
researchVoidCapacity, researchAdvancedVoidCap,
|
||||
};
|
||||
@@ -0,0 +1,142 @@
|
||||
// ─── Skill System v2 Types ─────────────────────────────────────────────────────
|
||||
// Shared types for the new flat skill system.
|
||||
|
||||
export type StatKey =
|
||||
| 'maxMana'
|
||||
| 'manaRegen'
|
||||
| 'clickMana'
|
||||
| 'elementCap'
|
||||
| 'studySpeed'
|
||||
| 'studyCostMult'
|
||||
| 'meditationEfficiency'
|
||||
| 'enchantCapacity'
|
||||
| 'enchantSpeed'
|
||||
| 'enchantPower'
|
||||
| 'disenchantRecovery'
|
||||
| 'baseDamage'
|
||||
| 'damageMultiplier'
|
||||
| 'attackSpeed'
|
||||
| 'critChance'
|
||||
| 'critMultiplier'
|
||||
| 'armorPierce'
|
||||
| 'insightGain'
|
||||
| 'golemDamage'
|
||||
| 'golemDuration'
|
||||
| 'pactMultiplier'
|
||||
| 'conversionRate'
|
||||
| 'spellDamage'
|
||||
| 'guardianDamage'
|
||||
| 'craftSpeed'
|
||||
| 'repairSpeed'
|
||||
// Per-element capacity stats
|
||||
| 'fireCap'
|
||||
| 'waterCap'
|
||||
| 'airCap'
|
||||
| 'earthCap'
|
||||
| 'lightCap'
|
||||
| 'darkCap'
|
||||
| 'deathCap'
|
||||
| 'metalCap'
|
||||
| 'sandCap'
|
||||
| 'lightningCap'
|
||||
| 'transferenceCap'
|
||||
| 'crystalCap'
|
||||
| 'stellarCap'
|
||||
| 'voidCap';
|
||||
|
||||
export interface SkillEffect {
|
||||
stat: StatKey;
|
||||
mode: 'add' | 'multiply';
|
||||
valuePerLevel: number;
|
||||
}
|
||||
|
||||
export interface SkillV2Def {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
category: string;
|
||||
maxLevel: number;
|
||||
costPerLevel: number;
|
||||
studyHours: number;
|
||||
effects: SkillEffect[];
|
||||
attunementRequired?: string;
|
||||
prerequisites?: Record<string, number>;
|
||||
}
|
||||
|
||||
export interface ComputedStats {
|
||||
maxMana: number;
|
||||
manaRegen: number;
|
||||
clickMana: number;
|
||||
elementCap: number;
|
||||
studySpeed: number;
|
||||
studyCostMult: number;
|
||||
meditationEfficiency: number;
|
||||
enchantCapacity: number;
|
||||
enchantSpeed: number;
|
||||
enchantPower: number;
|
||||
disenchantRecovery: number;
|
||||
baseDamage: number;
|
||||
damageMultiplier: number;
|
||||
attackSpeed: number;
|
||||
critChance: number;
|
||||
critMultiplier: number;
|
||||
armorPierce: number;
|
||||
insightGain: number;
|
||||
golemDamage: number;
|
||||
golemDuration: number;
|
||||
pactMultiplier: number;
|
||||
conversionRate: number;
|
||||
spellDamage: number;
|
||||
guardianDamage: number;
|
||||
craftSpeed: number;
|
||||
repairSpeed: number;
|
||||
// Per-element capacity (for direct skill contributions)
|
||||
fireCap: number;
|
||||
waterCap: number;
|
||||
airCap: number;
|
||||
earthCap: number;
|
||||
lightCap: number;
|
||||
darkCap: number;
|
||||
deathCap: number;
|
||||
metalCap: number;
|
||||
sandCap: number;
|
||||
lightningCap: number;
|
||||
transferenceCap: number;
|
||||
crystalCap: number;
|
||||
stellarCap: number;
|
||||
voidCap: number;
|
||||
}
|
||||
|
||||
// Default base stats (all skills at zero, no equipment, no prestige)
|
||||
export const BASE_STATS: ComputedStats = {
|
||||
maxMana: 100,
|
||||
manaRegen: 2,
|
||||
clickMana: 1,
|
||||
elementCap: 10,
|
||||
studySpeed: 1,
|
||||
studyCostMult: 1,
|
||||
meditationEfficiency: 1,
|
||||
enchantCapacity: 100,
|
||||
enchantSpeed: 1,
|
||||
enchantPower: 1,
|
||||
disenchantRecovery: 1,
|
||||
baseDamage: 5,
|
||||
damageMultiplier: 1,
|
||||
attackSpeed: 1,
|
||||
critChance: 0,
|
||||
critMultiplier: 1.5,
|
||||
armorPierce: 0,
|
||||
insightGain: 1,
|
||||
golemDamage: 1,
|
||||
golemDuration: 1,
|
||||
pactMultiplier: 1,
|
||||
conversionRate: 1,
|
||||
spellDamage: 1,
|
||||
guardianDamage: 1,
|
||||
craftSpeed: 1,
|
||||
repairSpeed: 1,
|
||||
fireCap: 0, waterCap: 0, airCap: 0, earthCap: 0,
|
||||
lightCap: 0, darkCap: 0, deathCap: 0,
|
||||
metalCap: 0, sandCap: 0, lightningCap: 0,
|
||||
transferenceCap: 0, crystalCap: 0, stellarCap: 0, voidCap: 0,
|
||||
};
|
||||
@@ -0,0 +1,269 @@
|
||||
import type { SkillV2Def, SkillEffect, StatKey, ComputedStats } from './skills-v2-types';
|
||||
import { SKILLS_V2 } from './skills-v2-defs';
|
||||
|
||||
// Re-export individual skills from category modules
|
||||
export {
|
||||
manaWell,
|
||||
manaFlow,
|
||||
manaOverflow,
|
||||
manaTap,
|
||||
manaSurge,
|
||||
manaSpring,
|
||||
quickLearner,
|
||||
focusedMind,
|
||||
knowledgeRetention,
|
||||
meditation,
|
||||
deepTrance,
|
||||
voidMeditation,
|
||||
} from './skills-core';
|
||||
|
||||
export {
|
||||
enchanting,
|
||||
efficientEnchant,
|
||||
enchantSpeed,
|
||||
essenceRefining,
|
||||
disenchanting,
|
||||
} from './skills-enchant';
|
||||
|
||||
export {
|
||||
arcaneFury,
|
||||
combatTraining,
|
||||
precision,
|
||||
elementalMastery,
|
||||
attackSpeed,
|
||||
armorPiercing,
|
||||
spellDamage,
|
||||
} from './skills-combat';
|
||||
|
||||
export {
|
||||
golemMastery,
|
||||
golemEfficiency,
|
||||
golemLongevity,
|
||||
} from './skills-golemancy';
|
||||
|
||||
export {
|
||||
invocation,
|
||||
pactMastery,
|
||||
guardianLore,
|
||||
} from './skills-invocation';
|
||||
|
||||
export {
|
||||
effCrafting,
|
||||
fieldRepair,
|
||||
} from './skills-crafting';
|
||||
|
||||
export {
|
||||
fireManaCap,
|
||||
waterManaCap,
|
||||
airManaCap,
|
||||
earthManaCap,
|
||||
lightManaCap,
|
||||
darkManaCap,
|
||||
deathManaCap,
|
||||
metalManaCap,
|
||||
sandManaCap,
|
||||
lightningManaCap,
|
||||
transferenceManaCap,
|
||||
} from './skills-element-caps';
|
||||
|
||||
export {
|
||||
pactWeaving,
|
||||
guardianConstructs,
|
||||
enchantedGolemancy,
|
||||
} from './skills-hybrid';
|
||||
|
||||
export {
|
||||
researchManaSpells,
|
||||
researchFireSpells,
|
||||
researchWaterSpells,
|
||||
researchAirSpells,
|
||||
researchEarthSpells,
|
||||
researchLightSpells,
|
||||
researchDarkSpells,
|
||||
researchLifeDeathSpells,
|
||||
researchAdvancedFire,
|
||||
researchAdvancedWater,
|
||||
researchAdvancedAir,
|
||||
researchAdvancedEarth,
|
||||
researchAdvancedLight,
|
||||
researchAdvancedDark,
|
||||
researchMasterFire,
|
||||
researchMasterWater,
|
||||
researchMasterEarth,
|
||||
researchDamageEffects,
|
||||
researchCombatEffects,
|
||||
researchManaEffects,
|
||||
researchAdvancedManaEffects,
|
||||
researchUtilityEffects,
|
||||
researchSpecialEffects,
|
||||
researchOverpower,
|
||||
researchMetalSpells,
|
||||
researchSandSpells,
|
||||
researchLightningSpells,
|
||||
researchAdvancedMetal,
|
||||
researchAdvancedSand,
|
||||
researchAdvancedLightning,
|
||||
researchMasterMetal,
|
||||
researchMasterSand,
|
||||
researchMasterLightning,
|
||||
researchTransferenceSpells,
|
||||
researchAdvancedTransference,
|
||||
researchMasterTransference,
|
||||
researchAdvancedFireCap,
|
||||
researchAdvancedWaterCap,
|
||||
researchAdvancedAirCap,
|
||||
researchAdvancedEarthCap,
|
||||
researchAdvancedLightCap,
|
||||
researchAdvancedDarkCap,
|
||||
researchAdvancedDeathCap,
|
||||
researchMasterFireCap,
|
||||
researchMasterWaterCap,
|
||||
researchMasterAirCap,
|
||||
researchMasterEarthCap,
|
||||
researchMasterLightCap,
|
||||
researchMasterDarkCap,
|
||||
researchMasterDeathCap,
|
||||
researchMetalCapacity,
|
||||
researchAdvancedMetalCap,
|
||||
researchSandCapacity,
|
||||
researchAdvancedSandCap,
|
||||
researchLightningCapacity,
|
||||
researchAdvancedLightningCap,
|
||||
researchCrystalCapacity,
|
||||
researchAdvancedCrystalCap,
|
||||
researchStellarCapacity,
|
||||
researchAdvancedStellarCap,
|
||||
researchVoidCapacity,
|
||||
researchAdvancedVoidCap,
|
||||
} from './skills-research';
|
||||
|
||||
export { SKILLS_V2 };
|
||||
|
||||
// Default Base Stats
|
||||
export const BASE_STATS: ComputedStats = {
|
||||
maxMana: 100,
|
||||
manaRegen: 2,
|
||||
clickMana: 1,
|
||||
elementCap: 10,
|
||||
studySpeed: 1,
|
||||
studyCostMult: 1,
|
||||
meditationEfficiency: 1,
|
||||
enchantCapacity: 100,
|
||||
enchantSpeed: 1,
|
||||
enchantPower: 1,
|
||||
disenchantRecovery: 1,
|
||||
baseDamage: 5,
|
||||
damageMultiplier: 1,
|
||||
attackSpeed: 1,
|
||||
critChance: 0,
|
||||
critMultiplier: 1.5,
|
||||
armorPierce: 0,
|
||||
insightGain: 1,
|
||||
golemDamage: 1,
|
||||
golemDuration: 1,
|
||||
pactMultiplier: 1,
|
||||
conversionRate: 1,
|
||||
spellDamage: 1,
|
||||
guardianDamage: 1,
|
||||
craftSpeed: 1,
|
||||
repairSpeed: 1,
|
||||
fireCap: 0, waterCap: 0, airCap: 0, earthCap: 0,
|
||||
lightCap: 0, darkCap: 0, deathCap: 0,
|
||||
metalCap: 0, sandCap: 0, lightningCap: 0,
|
||||
transferenceCap: 0, crystalCap: 0, stellarCap: 0, voidCap: 0,
|
||||
elementalDamage: 1,
|
||||
};
|
||||
|
||||
const ELEMENT_CAP_STATS: Record<string, keyof ComputedStats> = {
|
||||
fire: 'fireCap', water: 'waterCap', air: 'airCap', earth: 'earthCap',
|
||||
light: 'lightCap', dark: 'darkCap', death: 'deathCap', metal: 'metalCap',
|
||||
sand: 'sandCap', lightning: 'lightningCap', transference: 'transferenceCap',
|
||||
crystal: 'crystalCap', stellar: 'stellarCap', void: 'voidCap',
|
||||
};
|
||||
|
||||
/**
|
||||
* Compute all game stats from skill levels.
|
||||
*/
|
||||
export function computeStats(
|
||||
skills: Record<string, number>,
|
||||
prestigeUpgrades: Record<string, number> = {}
|
||||
): ComputedStats {
|
||||
const stats: ComputedStats = { ...BASE_STATS };
|
||||
|
||||
for (const [skillId, level] of Object.entries(skills)) {
|
||||
if (level <= 0) continue;
|
||||
const def = SKILLS_V2[skillId];
|
||||
if (!def) continue;
|
||||
for (const effect of def.effects) {
|
||||
const key = effect.stat as keyof ComputedStats;
|
||||
const currentVal = stats[key] as number;
|
||||
if (effect.mode === 'add') {
|
||||
(stats[key] as number) = currentVal + effect.valuePerLevel * level;
|
||||
} else {
|
||||
const perLevelMultiplier = 1 + effect.valuePerLevel;
|
||||
let result = currentVal;
|
||||
for (let i = 0; i < level; i++) result *= perLevelMultiplier;
|
||||
(stats[key] as number) = result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (prestigeUpgrades.manaWell) stats.maxMana += prestigeUpgrades.manaWell * 500;
|
||||
if (prestigeUpgrades.manaFlow) stats.manaRegen += prestigeUpgrades.manaFlow * 0.5;
|
||||
if (prestigeUpgrades.elementalAttune) stats.elementCap += prestigeUpgrades.elementalAttune * 25;
|
||||
if (prestigeUpgrades.pactBinding) stats.pactMultiplier += prestigeUpgrades.pactBinding * 0.1;
|
||||
if (prestigeUpgrades.insightAmp) stats.insightGain *= 1 + prestigeUpgrades.insightAmp * 0.25;
|
||||
|
||||
let elementCapFromSkills = 0;
|
||||
for (const [, statKey] of Object.entries(ELEMENT_CAP_STATS)) {
|
||||
const val = stats[statKey] as number;
|
||||
if (val > 0) elementCapFromSkills += val;
|
||||
}
|
||||
if (elementCapFromSkills > 0) stats.elementCap += elementCapFromSkills;
|
||||
|
||||
stats.maxMana = Math.max(1, Math.round(stats.maxMana));
|
||||
stats.manaRegen = Math.round(stats.manaRegen * 100) / 100;
|
||||
stats.clickMana = Math.max(1, stats.clickMana);
|
||||
stats.elementCap = Math.max(10, Math.round(stats.elementCap));
|
||||
stats.baseDamage = Math.max(1, Math.round(stats.baseDamage));
|
||||
stats.critChance = Math.min(1, Math.max(0, stats.critChance));
|
||||
stats.armorPierce = Math.min(1, Math.max(0, stats.armorPierce));
|
||||
stats.attackSpeed = Math.max(0.1, stats.attackSpeed);
|
||||
stats.insightGain = Math.max(0, stats.insightGain);
|
||||
stats.golemDamage = Math.max(0.1, stats.golemDamage);
|
||||
stats.golemDuration = Math.max(1, stats.golemDuration);
|
||||
stats.enchantCapacity = Math.max(10, Math.round(stats.enchantCapacity));
|
||||
stats.conversionRate = Math.max(0, stats.conversionRate);
|
||||
|
||||
return stats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the base key for a tiered skill (strips _tN suffix).
|
||||
*/
|
||||
export function getBaseSkillId(skillId: string): string {
|
||||
const match = skillId.match(/^(.+?)_t(\d+)$/);
|
||||
return match ? match[1] : skillId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a skill has prerequisites that are met.
|
||||
*/
|
||||
export function hasPrerequisites(
|
||||
skills: Record<string, number>,
|
||||
prerequisites?: Record<string, number>
|
||||
): boolean {
|
||||
if (!prerequisites) return true;
|
||||
for (const [reqId, reqLevel] of Object.entries(prerequisites)) {
|
||||
if ((skills[reqId] || 0) < reqLevel) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Legacy compat wrapper */
|
||||
export function computeStatsLegacy(state: {
|
||||
skills: Record<string, number>;
|
||||
prestigeUpgrades?: Record<string, number>;
|
||||
}): ComputedStats {
|
||||
return computeStats(state.skills, state.prestigeUpgrades || {});
|
||||
}
|
||||
Reference in New Issue
Block a user