Task 1: Implement 5-tier talent tree structure

- Rewrite skill definitions with 5-tier Continuous Talent Tree
- Add perk choices at Level 5 and Level 10 for each tier
- Add Elite Perks at T3 L10 and T5 L10
- Remove scrollCrafting (violates NO INSTANT FINISHING pillar)
- Set max:1 for skills that don't need evolution paths
- All 512 tests passing
This commit is contained in:
Unknown
2026-04-23 13:22:44 +02:00
parent 25137d9e0f
commit 52413777cd
13 changed files with 17487 additions and 1108 deletions
+38 -12
View File
@@ -1093,13 +1093,12 @@ export const SKILLS_DEF: Record<string, SkillDef> = {
efficientEnchant:{ name: "Efficient Enchant", desc: "-5% enchantment capacity cost", cat: "enchant", max: 5, base: 350, studyTime: 6, req: { enchanting: 3 }, attunementReq: { enchanter: 2 } },
disenchanting: { name: "Disenchanting", desc: "Recover 20% mana from removed enchantments", cat: "enchant", max: 3, base: 400, studyTime: 6, req: { enchanting: 2 }, attunementReq: { enchanter: 1 } },
enchantSpeed: { name: "Enchant Speed", desc: "-10% enchantment time", cat: "enchant", max: 5, base: 300, studyTime: 4, req: { enchanting: 2 }, attunementReq: { enchanter: 1 } },
scrollCrafting: { name: "Scroll Crafting", desc: "Create scrolls to store enchantment designs", cat: "enchant", max: 3, base: 500, studyTime: 8, req: { enchanting: 5 }, attunementReq: { enchanter: 3 } },
essenceRefining: { name: "Essence Refining", desc: "+10% enchantment effect power", cat: "enchant", max: 5, base: 450, studyTime: 7, req: { enchanting: 4 }, attunementReq: { enchanter: 2 } },
essenceRefining: { name: "Essence Refining", desc: "+10% enchantment effect power", cat: "enchant", max: 1, base: 450, studyTime: 7, req: { enchanting: 4 }, attunementReq: { enchanter: 2 } },
// Crafting Skills (4-6 hours study) - Some require Fabricator
effCrafting: { name: "Eff. Crafting", desc: "-10% craft time", cat: "craft", max: 5, base: 300, studyTime: 4 },
fieldRepair: { name: "Field Repair", desc: "+15% repair efficiency", cat: "craft", max: 5, base: 350, studyTime: 4 },
elemCrafting: { name: "Elem. Crafting", desc: "+25% craft output", cat: "craft", max: 3, base: 500, req: { effCrafting: 3 }, studyTime: 8, attunementReq: { enchanter: 1 } },
effCrafting: { name: "Eff. Crafting", desc: "-10% craft time", cat: "craft", max: 1, base: 300, studyTime: 4 },
fieldRepair: { name: "Field Repair", desc: "+15% repair efficiency", cat: "craft", max: 1, base: 350, studyTime: 4 },
elemCrafting: { name: "Elem. Crafting", desc: "+25% craft output", cat: "craft", max: 1, base: 500, req: { effCrafting: 1 }, studyTime: 8, attunementReq: { enchanter: 1 } },
// Effect Research Skills (unlock enchantment effects for designing) - Requires Enchanter
// Tier 1 - Basic Spell Effects
@@ -1181,22 +1180,49 @@ export const SKILLS_DEF: Record<string, SkillDef> = {
// Ascension Skills (very long study, powerful effects) - Require any attunement level 5+
insightHarvest: { name: "Insight Harvest", desc: "+10% insight gain", cat: "ascension", max: 5, base: 1000, studyTime: 20, attunementReq: { enchanter: 1 } },
temporalMemory: { name: "Temporal Memory", desc: "Keep 1 spell learned across loops", cat: "ascension", max: 3, base: 2000, studyTime: 36, attunementReq: { enchanter: 3 } },
temporalMemory: { name: "Temporal Memory", desc: "Keep 1 spell learned across loops", cat: "ascension", max: 1, base: 2000, studyTime: 36, attunementReq: { enchanter: 3 } },
guardianBane: { name: "Guardian Bane", desc: "+20% dmg vs guardians", cat: "ascension", max: 3, base: 1500, studyTime: 30, attunementReq: { invoker: 1 } },
// ═══════════════════════════════════════════════════════════════════════════
// INVOKER SKILLS - Require Invoker attunement
// ═══════════════════════════════════════════════════════════════════════════
// Invocation - Invoker attunement skill
invocation: {
name: "Invocation",
desc: "Enhances spell invocation and guardian pacts",
cat: "invocation",
attunement: 'invoker',
max: 10,
base: 300,
studyTime: 6,
attunementReq: { invoker: 1 }
},
// Pact Mastery - Invoker attunement skill
pactMastery: {
name: "Pact Mastery",
desc: "Enhances pact signing and guardian bonuses",
cat: "pact",
attunement: 'invoker',
max: 10,
base: 350,
studyTime: 6,
attunementReq: { invoker: 1 }
},
// ═══════════════════════════════════════════════════════════════════════════
// GOLEMANCY SKILLS - Require Fabricator attunement
// ═══════════════════════════════════════════════════════════════════════════
// Core Golemancy
golemMastery: { name: "Golem Mastery", desc: "+10% golem damage", cat: "golemancy", max: 5, base: 300, studyTime: 6, attunementReq: { fabricator: 2 } },
golemEfficiency: { name: "Golem Efficiency", desc: "+5% golem attack speed", cat: "golemancy", max: 5, base: 350, studyTime: 6, attunementReq: { fabricator: 2 } },
golemLongevity: { name: "Golem Longevity", desc: "+1 floor duration", cat: "golemancy", max: 3, base: 500, studyTime: 8, attunementReq: { fabricator: 3 } },
golemSiphon: { name: "Golem Siphon", desc: "-10% golem maintenance", cat: "golemancy", max: 3, base: 400, studyTime: 8, attunementReq: { fabricator: 3 } },
golemMastery: { name: "Golem Mastery", desc: "+10% golem damage", cat: "golemancy", max: 1, base: 300, studyTime: 6, attunementReq: { fabricator: 2 } },
golemEfficiency: { name: "Golem Efficiency", desc: "+5% golem attack speed", cat: "golemancy", max: 1, base: 350, studyTime: 6, attunementReq: { fabricator: 2 } },
golemLongevity: { name: "Golem Longevity", desc: "+1 floor duration", cat: "golemancy", max: 1, base: 500, studyTime: 8, attunementReq: { fabricator: 3 } },
golemSiphon: { name: "Golem Siphon", desc: "-10% golem maintenance", cat: "golemancy", max: 1, base: 400, studyTime: 8, attunementReq: { fabricator: 3 } },
// Advanced Golemancy
advancedGolemancy: { name: "Advanced Golemancy", desc: "Unlock hybrid golem recipes", cat: "golemancy", max: 1, base: 800, studyTime: 16, req: { golemMastery: 3 }, attunementReq: { fabricator: 5 } },
golemResonance: { name: "Golem Resonance", desc: "+1 golem slot at Fabricator 10", cat: "golemancy", max: 1, base: 1200, studyTime: 24, req: { golemMastery: 5 }, attunementReq: { fabricator: 8 } },
advancedGolemancy: { name: "Advanced Golemancy", desc: "Unlock hybrid golem recipes", cat: "golemancy", max: 1, base: 800, studyTime: 16, req: { golemMastery: 1 }, attunementReq: { fabricator: 5 } },
golemResonance: { name: "Golem Resonance", desc: "+1 golem slot at Fabricator 10", cat: "golemancy", max: 1, base: 1200, studyTime: 24, req: { golemMastery: 1 }, attunementReq: { fabricator: 8 } },
};
// ─── Prestige Upgrades ────────────────────────────────────────────────────────
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -4,7 +4,7 @@
* Tests each skill to verify they work exactly as their descriptions say.
*/
import { describe, it, expect } from 'bun:test';
import { describe, it, expect } from 'vitest';
import {
computeMaxMana,
computeElementMax,
+6 -6
View File
@@ -5,7 +5,7 @@
* Updated for the new skill system with tiers and upgrade trees.
*/
import { describe, it, expect, beforeEach } from 'bun:test';
import { describe, it, expect, beforeEach } from 'vitest';
import {
fmt,
fmtDec,
@@ -980,14 +980,14 @@ describe('Individual Skill Tests', () => {
describe('golemMastery', () => {
it('should be defined with correct properties', () => {
expect(SKILLS_DEF.golemMastery).toBeDefined();
expect(SKILLS_DEF.golemMastery.max).toBe(5);
expect(SKILLS_DEF.golemMastery.max).toBe(1);
});
});
describe('golemEfficiency', () => {
it('should be defined with correct properties', () => {
expect(SKILLS_DEF.golemEfficiency).toBeDefined();
expect(SKILLS_DEF.golemEfficiency.max).toBe(5);
expect(SKILLS_DEF.golemEfficiency.max).toBe(1);
});
});
@@ -996,7 +996,7 @@ describe('Individual Skill Tests', () => {
describe('effCrafting', () => {
it('should reduce craft time by 10% per level', () => {
expect(SKILLS_DEF.effCrafting).toBeDefined();
expect(SKILLS_DEF.effCrafting.max).toBe(5);
expect(SKILLS_DEF.effCrafting.max).toBe(1);
expect(SKILLS_DEF.effCrafting.desc).toContain('10% craft time');
});
});
@@ -1004,14 +1004,14 @@ describe('Individual Skill Tests', () => {
describe('fieldRepair', () => {
it('should be defined with correct properties', () => {
expect(SKILLS_DEF.fieldRepair).toBeDefined();
expect(SKILLS_DEF.fieldRepair.max).toBe(5);
expect(SKILLS_DEF.fieldRepair.max).toBe(1);
});
});
describe('elemCrafting', () => {
it('should add +25% craft output per level', () => {
expect(SKILLS_DEF.elemCrafting).toBeDefined();
expect(SKILLS_DEF.elemCrafting.max).toBe(3);
expect(SKILLS_DEF.elemCrafting.max).toBe(1);
expect(SKILLS_DEF.elemCrafting.desc).toContain('25% craft output');
});
});
+1 -1
View File
@@ -4,7 +4,7 @@
* Tests each store in isolation and integration between stores
*/
import { describe, it, expect, beforeEach } from 'bun:test';
import { describe, it, expect, beforeEach } from 'vitest';
import {
useManaStore,
useSkillStore,
@@ -4,7 +4,7 @@
* Tests for individual store methods: skillStore, manaStore, combatStore, prestigeStore
*/
import { describe, it, expect, beforeEach } from 'bun:test';
import { describe, it, expect, beforeEach } from 'vitest';
import { useSkillStore } from '../skillStore';
import { useManaStore } from '../manaStore';
import { useCombatStore } from '../combatStore';
+1 -1
View File
@@ -5,7 +5,7 @@
* Each store is tested individually and for cross-store communication.
*/
import { describe, it, expect, beforeEach } from 'bun:test';
import { describe, it, expect, beforeEach } from 'vitest';
import {
fmt,
fmtDec,
+1 -1
View File
@@ -5,7 +5,7 @@
* Updated for the new skill system with tiers and upgrade trees.
*/
import { describe, it, expect, beforeEach } from 'bun:test';
import { describe, it, expect, beforeEach } from 'vitest';
import {
computeMaxMana,
computeElementMax,
+24 -4
View File
@@ -161,18 +161,38 @@ export interface SkillUpgradeEffect {
specialDesc?: string; // Description of special effect
}
// Skill evolution system
// Skill evolution system - 5-Tier Continuous Talent Tree
// Each skill with max level 10 follows this structure:
// - 5 Tiers (T1-T5)
// - Each tier has L5 and L10 milestone perk choices
// - 3 paths per tier (A, B, C columns) representing different playstyles
// - T3 L10 and T5 L10 have Elite Perks (game-changing mechanics)
export interface SkillEvolutionPath {
baseSkillId: string; // Starting skill ID
tiers: SkillTierDef[]; // 5 tiers of evolution
}
export interface SkillTierDef {
tier: number;
tier: number; // Tier number (1-5)
skillId: string; // Skill ID for this tier
name: string;
multiplier: number; // Base effect multiplier
upgrades: SkillUpgradeChoice[]; // 4 upgrades available at each milestone
multiplier: number; // Base effect multiplier for this tier
// Perk choices organized by milestone and path (A, B, C)
l5Perks: SkillPerkChoice[]; // 3 choices (one per path) at level 5
l10Perks: SkillPerkChoice[]; // 3 choices (one per path) at level 10
}
// Perk choice at a milestone - belongs to a specific path (A, B, or C)
export interface SkillPerkChoice {
id: string;
name: string;
desc: string;
path: 'A' | 'B' | 'C'; // Which path this perk belongs to
isElite?: boolean; // True for T3 L10 and T5 L10 perks
effect: SkillUpgradeEffect;
// For path compounding - if player stays on same path, bonuses compound
pathCompoundBonus?: number; // Exponential bonus for staying on same path
}
export interface SkillUpgradeChoice {