// ─── Game Constants ─────────────────────────────────────────────────────────── import type { ElementDef, GuardianDef, SpellDef, SkillDef, PrestigeDef, SpellCost } from './types'; // Time constants export const TICK_MS = 200; export const HOURS_PER_TICK = 0.04; // 200ms / 5000ms per in-game hour export const MAX_DAY = 30; export const INCURSION_START_DAY = 20; // Mana constants export const MANA_PER_ELEMENT = 100; // Helper function for creating raw mana cost export function rawCost(amount: number): SpellCost { return { type: 'raw', amount }; } // Helper function for creating elemental mana cost export function elemCost(element: string, amount: number): SpellCost { return { type: 'element', element, amount }; } // ─── Element Definitions ───────────────────────────────────────────────────── export const ELEMENTS: Record = { // Base Elements fire: { name: "Fire", sym: "🔥", color: "#FF6B35", glow: "#FF6B3540", cat: "base" }, water: { name: "Water", sym: "💧", color: "#4ECDC4", glow: "#4ECDC440", cat: "base" }, air: { name: "Air", sym: "🌬️", color: "#00D4FF", glow: "#00D4FF40", cat: "base" }, earth: { name: "Earth", sym: "⛰️", color: "#F4A261", glow: "#F4A26140", cat: "base" }, light: { name: "Light", sym: "☀️", color: "#FFD700", glow: "#FFD70040", cat: "base" }, dark: { name: "Dark", sym: "🌑", color: "#9B59B6", glow: "#9B59B640", cat: "base" }, life: { name: "Life", sym: "🌿", color: "#2ECC71", glow: "#2ECC7140", cat: "base" }, death: { name: "Death", sym: "💀", color: "#778CA3", glow: "#778CA340", cat: "base" }, // Utility Elements mental: { name: "Mental", sym: "🧠", color: "#E91E8C", glow: "#E91E8C40", cat: "utility" }, transference: { name: "Transference", sym: "🔗", color: "#1ABC9C", glow: "#1ABC9C40", cat: "utility" }, force: { name: "Force", sym: "💨", color: "#E74C3C", glow: "#E74C3C40", cat: "utility" }, // Composite Elements blood: { name: "Blood", sym: "🩸", color: "#C0392B", glow: "#C0392B40", cat: "composite", recipe: ["life", "water"] }, metal: { name: "Metal", sym: "⚙️", color: "#BDC3C7", glow: "#BDC3C740", cat: "composite", recipe: ["fire", "earth"] }, wood: { name: "Wood", sym: "🪵", color: "#8B5E3C", glow: "#8B5E3C40", cat: "composite", recipe: ["life", "earth"] }, sand: { name: "Sand", sym: "⏳", color: "#D4AC0D", glow: "#D4AC0D40", cat: "composite", recipe: ["earth", "water"] }, // Exotic Elements crystal: { name: "Crystal", sym: "💎", color: "#85C1E9", glow: "#85C1E940", cat: "exotic", recipe: ["sand", "sand", "mental"] }, stellar: { name: "Stellar", sym: "⭐", color: "#F0E68C", glow: "#F0E68C40", cat: "exotic", recipe: ["fire", "fire", "light"] }, void: { name: "Void", sym: "🕳️", color: "#4A235A", glow: "#4A235A40", cat: "exotic", recipe: ["dark", "dark", "death"] }, }; export const FLOOR_ELEM_CYCLE = ["fire", "water", "air", "earth", "light", "dark", "life", "death"]; // ─── Guardians ──────────────────────────────────────────────────────────────── export const GUARDIANS: Record = { 10: { name: "Ignis Prime", element: "fire", hp: 5000, pact: 1.5, color: "#FF6B35", boons: [ { type: 'elementalDamage', value: 5, desc: '+5% Fire damage' }, { type: 'maxMana', value: 50, desc: '+50 max mana' }, ], pactCost: 500, pactTime: 2, uniquePerk: "Fire spells cast 10% faster" }, 20: { name: "Aqua Regia", element: "water", hp: 15000, pact: 1.75, color: "#4ECDC4", boons: [ { type: 'elementalDamage', value: 5, desc: '+5% Water damage' }, { type: 'manaRegen', value: 0.5, desc: '+0.5 mana regen' }, ], pactCost: 1000, pactTime: 4, uniquePerk: "Water spells have 10% lifesteal" }, 30: { name: "Ventus Rex", element: "air", hp: 30000, pact: 2.0, color: "#00D4FF", boons: [ { type: 'elementalDamage', value: 5, desc: '+5% Air damage' }, { type: 'castingSpeed', value: 5, desc: '+5% cast speed' }, ], pactCost: 2000, pactTime: 6, uniquePerk: "Air spells have 15% crit chance" }, 40: { name: "Terra Firma", element: "earth", hp: 50000, pact: 2.25, color: "#F4A261", boons: [ { type: 'elementalDamage', value: 5, desc: '+5% Earth damage' }, { type: 'maxMana', value: 100, desc: '+100 max mana' }, ], pactCost: 4000, pactTime: 8, uniquePerk: "Earth spells deal +25% damage to guardians" }, 50: { name: "Lux Aeterna", element: "light", hp: 80000, pact: 2.5, color: "#FFD700", boons: [ { type: 'elementalDamage', value: 10, desc: '+10% Light damage' }, { type: 'insightGain', value: 10, desc: '+10% insight gain' }, ], pactCost: 8000, pactTime: 10, uniquePerk: "Light spells reveal enemy weaknesses (+20% damage)" }, 60: { name: "Umbra Mortis", element: "dark", hp: 120000, pact: 2.75, color: "#9B59B6", boons: [ { type: 'elementalDamage', value: 10, desc: '+10% Dark damage' }, { type: 'critDamage', value: 15, desc: '+15% crit damage' }, ], pactCost: 15000, pactTime: 12, uniquePerk: "Dark spells have 20% lifesteal" }, 70: { name: "Vita Sempiterna", element: "life", hp: 180000, pact: 3.0, color: "#2ECC71", boons: [ { type: 'elementalDamage', value: 10, desc: '+10% Life damage' }, { type: 'manaRegen', value: 1, desc: '+1 mana regen' }, ], pactCost: 25000, pactTime: 14, uniquePerk: "Life spells heal for 30% of damage dealt" }, 80: { name: "Mors Ultima", element: "death", hp: 250000, pact: 3.25, color: "#778CA3", boons: [ { type: 'elementalDamage', value: 10, desc: '+10% Death damage' }, { type: 'rawDamage', value: 10, desc: '+10% raw damage' }, ], pactCost: 40000, pactTime: 16, uniquePerk: "Death spells execute enemies below 20% HP" }, 90: { name: "Primordialis", element: "void", hp: 400000, pact: 4.0, color: "#4A235A", boons: [ { type: 'elementalDamage', value: 15, desc: '+15% Void damage' }, { type: 'maxMana', value: 200, desc: '+200 max mana' }, { type: 'manaRegen', value: 1, desc: '+1 mana regen' }, ], pactCost: 75000, pactTime: 20, uniquePerk: "Void spells ignore 30% of enemy resistance" }, 100: { name: "The Awakened One", element: "stellar", hp: 1000000, pact: 5.0, color: "#F0E68C", boons: [ { type: 'elementalDamage', value: 20, desc: '+20% Stellar damage' }, { type: 'maxMana', value: 500, desc: '+500 max mana' }, { type: 'manaRegen', value: 2, desc: '+2 mana regen' }, { type: 'insightGain', value: 25, desc: '+25% insight gain' }, ], pactCost: 150000, pactTime: 24, uniquePerk: "All spells deal +50% damage and cast 25% faster" }, }; // ─── Spells ─────────────────────────────────────────────────────────────────── export const SPELLS_DEF: Record = { // Tier 0 - Basic Raw Mana Spells (fast, costs raw mana) manaBolt: { name: "Mana Bolt", elem: "raw", dmg: 5, cost: rawCost(3), tier: 0, castSpeed: 3, unlock: 0, studyTime: 0, desc: "A weak bolt of pure mana. Costs raw mana instead of elemental." }, manaStrike: { name: "Mana Strike", elem: "raw", dmg: 8, cost: rawCost(5), tier: 0, castSpeed: 2.5, unlock: 50, studyTime: 1, desc: "A concentrated strike of raw mana. Slightly stronger than Mana Bolt." }, // Tier 1 - Basic Elemental Spells (2-4 hours study) fireball: { name: "Fireball", elem: "fire", dmg: 15, cost: elemCost("fire", 2), tier: 1, castSpeed: 2, unlock: 100, studyTime: 2, desc: "Hurl a ball of fire at your enemy." }, emberShot: { name: "Ember Shot", elem: "fire", dmg: 10, cost: elemCost("fire", 1), tier: 1, castSpeed: 3, unlock: 75, studyTime: 1, desc: "A quick shot of embers. Efficient fire damage." }, waterJet: { name: "Water Jet", elem: "water", dmg: 12, cost: elemCost("water", 2), tier: 1, castSpeed: 2, unlock: 100, studyTime: 2, desc: "A high-pressure jet of water." }, iceShard: { name: "Ice Shard", elem: "water", dmg: 14, cost: elemCost("water", 2), tier: 1, castSpeed: 2, unlock: 120, studyTime: 2, desc: "Launch a sharp shard of ice." }, gust: { name: "Gust", elem: "air", dmg: 10, cost: elemCost("air", 2), tier: 1, castSpeed: 3, unlock: 100, studyTime: 2, desc: "A powerful gust of wind." }, windSlash: { name: "Wind Slash", elem: "air", dmg: 12, cost: elemCost("air", 2), tier: 1, castSpeed: 2.5, unlock: 110, studyTime: 2, desc: "A cutting blade of wind." }, stoneBullet: { name: "Stone Bullet", elem: "earth", dmg: 16, cost: elemCost("earth", 2), tier: 1, castSpeed: 2, unlock: 150, studyTime: 3, desc: "Launch a bullet of solid stone." }, rockSpike: { name: "Rock Spike", elem: "earth", dmg: 18, cost: elemCost("earth", 3), tier: 1, castSpeed: 1.5, unlock: 180, studyTime: 3, desc: "Summon a spike of rock from below." }, lightLance: { name: "Light Lance", elem: "light", dmg: 18, cost: elemCost("light", 2), tier: 1, castSpeed: 2, unlock: 200, studyTime: 4, desc: "A piercing lance of pure light." }, radiance: { name: "Radiance", elem: "light", dmg: 14, cost: elemCost("light", 2), tier: 1, castSpeed: 2.5, unlock: 180, studyTime: 3, desc: "Burst of radiant energy." }, shadowBolt: { name: "Shadow Bolt", elem: "dark", dmg: 16, cost: elemCost("dark", 2), tier: 1, castSpeed: 2, unlock: 200, studyTime: 4, desc: "A bolt of shadowy energy." }, darkPulse: { name: "Dark Pulse", elem: "dark", dmg: 12, cost: elemCost("dark", 1), tier: 1, castSpeed: 3, unlock: 150, studyTime: 2, desc: "A quick pulse of darkness." }, drain: { name: "Drain", elem: "death", dmg: 10, cost: elemCost("death", 2), tier: 1, castSpeed: 2, unlock: 150, studyTime: 3, desc: "Drain life force from your enemy.", effects: [{ type: 'lifesteal', value: 0.2 }] }, rotTouch: { name: "Rot Touch", elem: "death", dmg: 14, cost: elemCost("death", 2), tier: 1, castSpeed: 2, unlock: 170, studyTime: 3, desc: "Touch of decay and rot." }, lifeTap: { name: "Life Tap", elem: "life", dmg: 8, cost: elemCost("life", 1), tier: 1, castSpeed: 3, unlock: 100, studyTime: 2, desc: "Tap into life energy for a weak attack.", effects: [{ type: 'lifesteal', value: 0.3 }] }, thornWhip: { name: "Thorn Whip", elem: "life", dmg: 12, cost: elemCost("life", 2), tier: 1, castSpeed: 2.5, unlock: 130, studyTime: 2, desc: "A whip of living thorns." }, // Tier 2 - Advanced Spells (8-12 hours study) inferno: { name: "Inferno", elem: "fire", dmg: 60, cost: elemCost("fire", 8), tier: 2, castSpeed: 1, unlock: 1000, studyTime: 8, desc: "Engulf your enemy in flames." }, flameWave: { name: "Flame Wave", elem: "fire", dmg: 45, cost: elemCost("fire", 6), tier: 2, castSpeed: 1.5, unlock: 800, studyTime: 6, desc: "A wave of fire sweeps across the battlefield." }, tidalWave: { name: "Tidal Wave", elem: "water", dmg: 55, cost: elemCost("water", 8), tier: 2, castSpeed: 1, unlock: 1000, studyTime: 8, desc: "A massive wave crashes down." }, iceStorm: { name: "Ice Storm", elem: "water", dmg: 50, cost: elemCost("water", 7), tier: 2, castSpeed: 1.2, unlock: 900, studyTime: 7, desc: "A storm of ice shards." }, earthquake: { name: "Earthquake", elem: "earth", dmg: 70, cost: elemCost("earth", 10), tier: 2, castSpeed: 0.8, unlock: 1200, studyTime: 10, desc: "Shake the very foundation." }, stoneBarrage: { name: "Stone Barrage", elem: "earth", dmg: 55, cost: elemCost("earth", 7), tier: 2, castSpeed: 1.2, unlock: 1000, studyTime: 8, desc: "Multiple stone projectiles." }, hurricane: { name: "Hurricane", elem: "air", dmg: 50, cost: elemCost("air", 8), tier: 2, castSpeed: 1, unlock: 1000, studyTime: 8, desc: "A devastating hurricane." }, windBlade: { name: "Wind Blade", elem: "air", dmg: 40, cost: elemCost("air", 5), tier: 2, castSpeed: 1.8, unlock: 700, studyTime: 6, desc: "A blade of cutting wind." }, solarFlare: { name: "Solar Flare", elem: "light", dmg: 65, cost: elemCost("light", 9), tier: 2, castSpeed: 0.9, unlock: 1100, studyTime: 9, desc: "A blinding flare of solar energy." }, divineSmite: { name: "Divine Smite", elem: "light", dmg: 55, cost: elemCost("light", 7), tier: 2, castSpeed: 1.2, unlock: 900, studyTime: 7, desc: "A smite of divine power." }, voidRift: { name: "Void Rift", elem: "dark", dmg: 55, cost: elemCost("dark", 8), tier: 2, castSpeed: 1, unlock: 1000, studyTime: 8, desc: "Open a rift to the void." }, shadowStorm: { name: "Shadow Storm", elem: "dark", dmg: 48, cost: elemCost("dark", 6), tier: 2, castSpeed: 1.3, unlock: 800, studyTime: 6, desc: "A storm of shadows." }, soulRend: { name: "Soul Rend", elem: "death", dmg: 50, cost: elemCost("death", 7), tier: 2, castSpeed: 1.1, unlock: 1100, studyTime: 9, desc: "Tear at the enemy's soul.", effects: [{ type: 'lifesteal', value: 0.25 }] }, entangle: { name: "Entangle", elem: "life", dmg: 35, cost: elemCost("life", 5), tier: 2, castSpeed: 1.5, unlock: 700, studyTime: 6, desc: "Vines entangle and crush." }, // Tier 3 - Master Spells (20-30 hours study) pyroclasm: { name: "Pyroclasm", elem: "fire", dmg: 250, cost: elemCost("fire", 25), tier: 3, castSpeed: 0.6, unlock: 10000, studyTime: 24, desc: "An eruption of volcanic fury." }, tsunami: { name: "Tsunami", elem: "water", dmg: 220, cost: elemCost("water", 22), tier: 3, castSpeed: 0.65, unlock: 10000, studyTime: 24, desc: "A towering wall of water." }, meteorStrike: { name: "Meteor Strike", elem: "earth", dmg: 280, cost: elemCost("earth", 28), tier: 3, castSpeed: 0.5, unlock: 12000, studyTime: 28, desc: "Call down a meteor from the heavens." }, cosmicStorm: { name: "Cosmic Storm", elem: "air", dmg: 200, cost: elemCost("air", 20), tier: 3, castSpeed: 0.7, unlock: 10000, studyTime: 24, desc: "A storm of cosmic proportions." }, heavenLight: { name: "Heaven's Light", elem: "light", dmg: 240, cost: elemCost("light", 24), tier: 3, castSpeed: 0.6, unlock: 11000, studyTime: 26, desc: "The light of heaven itself." }, oblivion: { name: "Oblivion", elem: "dark", dmg: 230, cost: elemCost("dark", 23), tier: 3, castSpeed: 0.6, unlock: 10500, studyTime: 25, desc: "Consign to oblivion." }, deathMark: { name: "Death Mark", elem: "death", dmg: 200, cost: elemCost("death", 20), tier: 3, castSpeed: 0.7, unlock: 10000, studyTime: 24, desc: "Mark for death.", effects: [{ type: 'lifesteal', value: 0.35 }] }, worldTree: { name: "World Tree", elem: "life", dmg: 180, cost: elemCost("life", 18), tier: 3, castSpeed: 0.75, unlock: 9000, studyTime: 22, desc: "Power of the world tree itself.", effects: [{ type: 'lifesteal', value: 0.4 }] }, // Tier 4 - Legendary Spells (40-60 hours study, require exotic elements) stellarNova: { name: "Stellar Nova", elem: "stellar", dmg: 500, cost: elemCost("stellar", 15), tier: 4, castSpeed: 0.4, unlock: 50000, studyTime: 48, desc: "A nova of stellar energy." }, voidCollapse: { name: "Void Collapse", elem: "void", dmg: 450, cost: elemCost("void", 12), tier: 4, castSpeed: 0.45, unlock: 40000, studyTime: 42, desc: "Collapse the void upon your enemy." }, crystalShatter: { name: "Crystal Shatter", elem: "crystal", dmg: 400, cost: elemCost("crystal", 10), tier: 4, castSpeed: 0.5, unlock: 35000, studyTime: 36, desc: "Shatter crystalline energy." }, }; // ─── Skills ─────────────────────────────────────────────────────────────────── export const SKILLS_DEF: Record = { // Mana Skills (4-8 hours study) manaWell: { name: "Mana Well", desc: "+100 max mana", cat: "mana", max: 10, base: 100, studyTime: 4 }, manaFlow: { name: "Mana Flow", desc: "+1 regen/hr", cat: "mana", max: 10, base: 150, studyTime: 5 }, elemAttune: { name: "Elem. Attunement", desc: "+50 elem mana cap", cat: "mana", max: 10, base: 200, studyTime: 4 }, manaOverflow: { name: "Mana Overflow", desc: "+25% mana from clicks", cat: "mana", max: 5, base: 400, req: { manaWell: 3 }, studyTime: 6 }, // Study Skills (3-6 hours study) quickLearner: { name: "Quick Learner", desc: "+10% study speed", cat: "study", max: 10, base: 250, studyTime: 4 }, focusedMind: { name: "Focused Mind", desc: "-5% study mana cost", cat: "study", max: 10, base: 300, studyTime: 5 }, meditation: { name: "Meditation Focus", desc: "Up to 2.5x regen after 4hrs meditating", cat: "study", max: 1, base: 400, studyTime: 6 }, knowledgeRetention: { name: "Knowledge Retention", desc: "+20% study progress saved on cancel", cat: "study", max: 3, base: 350, studyTime: 5 }, // Enchanting Skills (4-8 hours study) - Core crafting system enchanting: { name: "Enchanting", desc: "Unlocks enchantment design", cat: "enchant", max: 10, base: 200, studyTime: 5 }, efficientEnchant:{ name: "Efficient Enchant", desc: "-5% enchantment capacity cost", cat: "enchant", max: 5, base: 350, studyTime: 6, req: { enchanting: 3 } }, disenchanting: { name: "Disenchanting", desc: "Recover 20% mana from removed enchantments", cat: "enchant", max: 3, base: 400, studyTime: 6, req: { enchanting: 2 } }, enchantSpeed: { name: "Enchant Speed", desc: "-10% enchantment time", cat: "enchant", max: 5, base: 300, studyTime: 4, req: { enchanting: 2 } }, scrollCrafting: { name: "Scroll Crafting", desc: "Create scrolls to store enchantment designs", cat: "enchant", max: 3, base: 500, studyTime: 8, req: { enchanting: 5 } }, essenceRefining: { name: "Essence Refining", desc: "+10% enchantment effect power", cat: "enchant", max: 5, base: 450, studyTime: 7, req: { enchanting: 4 } }, // Crafting Skills (4-6 hours study) 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 }, // Effect Research Skills (unlock enchantment effects for designing) // Tier 1 - Basic Spell Effects researchManaSpells: { name: "Mana Spell Research", desc: "Unlock Mana Strike spell enchantment", cat: "effectResearch", max: 1, base: 200, studyTime: 4, req: { enchanting: 1 } }, researchFireSpells: { name: "Fire Spell Research", desc: "Unlock Ember Shot, Fireball spell enchantments", cat: "effectResearch", max: 1, base: 300, studyTime: 6, req: { enchanting: 2 } }, researchWaterSpells: { name: "Water Spell Research", desc: "Unlock Water Jet, Ice Shard spell enchantments", cat: "effectResearch", max: 1, base: 300, studyTime: 6, req: { enchanting: 2 } }, researchAirSpells: { name: "Air Spell Research", desc: "Unlock Gust, Wind Slash spell enchantments", cat: "effectResearch", max: 1, base: 300, studyTime: 6, req: { enchanting: 2 } }, researchEarthSpells: { name: "Earth Spell Research", desc: "Unlock Stone Bullet, Rock Spike spell enchantments", cat: "effectResearch", max: 1, base: 350, studyTime: 6, req: { enchanting: 2 } }, researchLightSpells: { name: "Light Spell Research", desc: "Unlock Light Lance, Radiance spell enchantments", cat: "effectResearch", max: 1, base: 400, studyTime: 8, req: { enchanting: 3 } }, researchDarkSpells: { name: "Dark Spell Research", desc: "Unlock Shadow Bolt, Dark Pulse spell enchantments", cat: "effectResearch", max: 1, base: 400, studyTime: 8, req: { enchanting: 3 } }, researchLifeDeathSpells: { name: "Life & Death Research", desc: "Unlock Drain, Life Tap spell enchantments", cat: "effectResearch", max: 1, base: 400, studyTime: 8, req: { enchanting: 3 } }, // Tier 2 - Advanced Spell Effects researchAdvancedFire: { name: "Advanced Fire Research", desc: "Unlock Inferno, Flame Wave spell enchantments", cat: "effectResearch", max: 1, base: 600, studyTime: 12, req: { researchFireSpells: 1, enchanting: 4 } }, researchAdvancedWater: { name: "Advanced Water Research", desc: "Unlock Tidal Wave, Ice Storm spell enchantments", cat: "effectResearch", max: 1, base: 600, studyTime: 12, req: { researchWaterSpells: 1, enchanting: 4 } }, researchAdvancedAir: { name: "Advanced Air Research", desc: "Unlock Hurricane, Wind Blade spell enchantments", cat: "effectResearch", max: 1, base: 600, studyTime: 12, req: { researchAirSpells: 1, enchanting: 4 } }, researchAdvancedEarth: { name: "Advanced Earth Research", desc: "Unlock Earthquake, Stone Barrage spell enchantments", cat: "effectResearch", max: 1, base: 600, studyTime: 12, req: { researchEarthSpells: 1, enchanting: 4 } }, researchAdvancedLight: { name: "Advanced Light Research", desc: "Unlock Solar Flare, Divine Smite spell enchantments", cat: "effectResearch", max: 1, base: 700, studyTime: 14, req: { researchLightSpells: 1, enchanting: 5 } }, researchAdvancedDark: { name: "Advanced Dark Research", desc: "Unlock Void Rift, Shadow Storm spell enchantments", cat: "effectResearch", max: 1, base: 700, studyTime: 14, req: { researchDarkSpells: 1, enchanting: 5 } }, // Tier 3 - Master Spell Effects researchMasterFire: { name: "Master Fire Research", desc: "Unlock Pyroclasm spell enchantment", cat: "effectResearch", max: 1, base: 1200, studyTime: 24, req: { researchAdvancedFire: 1, enchanting: 7 } }, researchMasterWater: { name: "Master Water Research", desc: "Unlock Tsunami spell enchantment", cat: "effectResearch", max: 1, base: 1200, studyTime: 24, req: { researchAdvancedWater: 1, enchanting: 7 } }, researchMasterEarth: { name: "Master Earth Research", desc: "Unlock Meteor Strike spell enchantment", cat: "effectResearch", max: 1, base: 1300, studyTime: 26, req: { researchAdvancedEarth: 1, enchanting: 8 } }, // Combat Effect Research researchDamageEffects: { name: "Damage Effect Research", desc: "Unlock Minor/Moderate Power, Amplification effects", cat: "effectResearch", max: 1, base: 250, studyTime: 5, req: { enchanting: 1 } }, researchCombatEffects: { name: "Combat Effect Research", desc: "Unlock Sharp Edge, Swift Casting effects", cat: "effectResearch", max: 1, base: 350, studyTime: 6, req: { researchDamageEffects: 1, enchanting: 3 } }, // Mana Effect Research researchManaEffects: { name: "Mana Effect Research", desc: "Unlock Mana Reserve, Trickle, Mana Tap effects", cat: "effectResearch", max: 1, base: 200, studyTime: 4, req: { enchanting: 1 } }, researchAdvancedManaEffects: { name: "Advanced Mana Research", desc: "Unlock Mana Reservoir, Stream, River, Mana Surge effects", cat: "effectResearch", max: 1, base: 400, studyTime: 8, req: { researchManaEffects: 1, enchanting: 3 } }, // Utility Effect Research researchUtilityEffects: { name: "Utility Effect Research", desc: "Unlock Meditative Focus, Quick Study, Insightful effects", cat: "effectResearch", max: 1, base: 300, studyTime: 6, req: { enchanting: 2 } }, // Special Effect Research researchSpecialEffects: { name: "Special Effect Research", desc: "Unlock Echo Chamber, Siphoning, Bane effects", cat: "effectResearch", max: 1, base: 500, studyTime: 10, req: { enchanting: 4 } }, researchOverpower: { name: "Overpower Research", desc: "Unlock Overpower effect", cat: "effectResearch", max: 1, base: 700, studyTime: 12, req: { researchSpecialEffects: 1, enchanting: 5 } }, // Research Skills (longer study times: 12-72 hours) manaTap: { name: "Mana Tap", desc: "+1 mana/click", cat: "research", max: 1, base: 300, studyTime: 12 }, manaSurge: { name: "Mana Surge", desc: "+3 mana/click", cat: "research", max: 1, base: 800, studyTime: 36, req: { manaTap: 1 } }, manaSpring: { name: "Mana Spring", desc: "+2 mana regen", cat: "research", max: 1, base: 600, studyTime: 24 }, deepTrance: { name: "Deep Trance", desc: "Extend meditation bonus to 6hrs for 3x", cat: "research", max: 1, base: 900, studyTime: 48, req: { meditation: 1 } }, voidMeditation:{ name: "Void Meditation", desc: "Extend meditation bonus to 8hrs for 5x", cat: "research", max: 1, base: 1500, studyTime: 72, req: { deepTrance: 1 } }, // Ascension Skills (very long study, powerful effects) insightHarvest: { name: "Insight Harvest", desc: "+10% insight gain", cat: "ascension", max: 5, base: 1000, studyTime: 20 }, temporalMemory: { name: "Temporal Memory", desc: "Keep 1 spell learned across loops", cat: "ascension", max: 3, base: 2000, studyTime: 36 }, guardianBane: { name: "Guardian Bane", desc: "+20% dmg vs guardians", cat: "ascension", max: 3, base: 1500, studyTime: 30 }, }; // ─── Prestige Upgrades ──────────────────────────────────────────────────────── export const PRESTIGE_DEF: Record = { manaWell: { name: "Mana Well", desc: "+500 starting max mana", max: 5, cost: 500 }, manaFlow: { name: "Mana Flow", desc: "+0.5 regen/sec permanently", max: 10, cost: 750 }, deepMemory: { name: "Deep Memory", desc: "+1 memory slot", max: 5, cost: 1000 }, insightAmp: { name: "Insight Amp", desc: "+25% insight gain", max: 4, cost: 1500 }, spireKey: { name: "Spire Key", desc: "Start at floor +2", max: 5, cost: 4000 }, temporalEcho: { name: "Temporal Echo", desc: "+10% mana generation", max: 5, cost: 3000 }, steadyHand: { name: "Steady Hand", desc: "-15% durability loss", max: 5, cost: 1200 }, ancientKnowledge: { name: "Ancient Knowledge", desc: "Start with blueprint discovered", max: 5, cost: 2000 }, elementalAttune: { name: "Elemental Attunement", desc: "+25 elemental mana cap", max: 10, cost: 600 }, spellMemory: { name: "Spell Memory", desc: "Start with random spell learned", max: 3, cost: 2500 }, guardianPact: { name: "Guardian Pact", desc: "+10% pact multiplier", max: 5, cost: 3500 }, quickStart: { name: "Quick Start", desc: "Start with 100 raw mana", max: 3, cost: 400 }, elemStart: { name: "Elem. Start", desc: "Start with 5 of each unlocked element", max: 3, cost: 800 }, }; // ─── Skill Categories ───────────────────────────────────────────────────────── // Skills are now organized by attunement - each attunement grants access to specific skill categories export const SKILL_CATEGORIES = [ // Core categories (always available) { id: 'mana', name: 'Mana', icon: '💧', attunement: null }, { id: 'study', name: 'Study', icon: '📚', attunement: null }, { id: 'research', name: 'Research', icon: '🔮', attunement: null }, { id: 'ascension', name: 'Ascension', icon: '⭐', attunement: null }, // Enchanter attunement (Right Hand) { id: 'enchant', name: 'Enchanting', icon: '✨', attunement: 'enchanter' }, { id: 'effectResearch', name: 'Effect Research', icon: '🔬', attunement: 'enchanter' }, // Invoker attunement (Chest) { id: 'invocation', name: 'Invocation', icon: '💜', attunement: 'invoker' }, { id: 'pact', name: 'Pact Mastery', icon: '🤝', attunement: 'invoker' }, // Fabricator attunement (Left Hand) { id: 'fabrication', name: 'Fabrication', icon: '⚒️', attunement: 'fabricator' }, { id: 'golemancy', name: 'Golemancy', icon: '🗿', attunement: 'fabricator' }, // Legacy category (for backward compatibility) { id: 'craft', name: 'Crafting', icon: '🔧', attunement: null }, ]; // ─── Rarity Colors ─────────────────────────────────────────────────────────── export const RARITY_COLORS: Record = { common: '#9CA3AF', uncommon: '#22C55E', rare: '#3B82F6', epic: '#A855F7', legendary: '#F97316', mythic: '#EF4444', }; // ─── Effect Research Mapping ─────────────────────────────────────────────────── // Maps research skill IDs to the effect IDs they unlock export const EFFECT_RESEARCH_MAPPING: Record = { // Tier 1 - Basic Spell Effects researchManaSpells: ['spell_manaStrike'], researchFireSpells: ['spell_emberShot', 'spell_fireball'], researchWaterSpells: ['spell_waterJet', 'spell_iceShard'], researchAirSpells: ['spell_gust', 'spell_windSlash'], researchEarthSpells: ['spell_stoneBullet', 'spell_rockSpike'], researchLightSpells: ['spell_lightLance', 'spell_radiance'], researchDarkSpells: ['spell_shadowBolt', 'spell_darkPulse'], researchLifeDeathSpells: ['spell_drain', 'spell_lifeTap'], // Tier 2 - Advanced Spell Effects researchAdvancedFire: ['spell_inferno', 'spell_flameWave'], researchAdvancedWater: ['spell_tidalWave', 'spell_iceStorm'], researchAdvancedAir: ['spell_hurricane', 'spell_windBlade'], researchAdvancedEarth: ['spell_earthquake', 'spell_stoneBarrage'], researchAdvancedLight: ['spell_solarFlare', 'spell_divineSmite'], researchAdvancedDark: ['spell_voidRift', 'spell_shadowStorm'], // Tier 3 - Master Spell Effects researchMasterFire: ['spell_pyroclasm'], researchMasterWater: ['spell_tsunami'], researchMasterEarth: ['spell_meteorStrike'], // Combat Effect Research researchDamageEffects: ['damage_5', 'damage_10', 'damage_pct_10'], researchCombatEffects: ['crit_5', 'attack_speed_10'], // Mana Effect Research researchManaEffects: ['mana_cap_50', 'mana_regen_1', 'click_mana_1'], researchAdvancedManaEffects: ['mana_cap_100', 'mana_regen_2', 'mana_regen_5', 'click_mana_3'], // Utility Effect Research researchUtilityEffects: ['meditate_10', 'study_10', 'insight_5'], // Special Effect Research researchSpecialEffects: ['spell_echo_10', 'lifesteal_5', 'guardian_dmg_10'], researchOverpower: ['overpower_80'], }; // Base effects unlocked when player gets enchanting skill level 1 export const BASE_UNLOCKED_EFFECTS: string[] = []; // No effects at game start // Effects that unlock when getting enchanting skill level 1 export const ENCHANTING_UNLOCK_EFFECTS = ['spell_manaBolt']; // ─── Base Unlocked Elements ─────────────────────────────────────────────────── export const BASE_UNLOCKED_ELEMENTS = ['fire', 'water', 'air', 'earth']; // ─── Study Speed Formula ───────────────────────────────────────────────────── export function getStudySpeedMultiplier(skills: Record): number { return 1 + (skills.quickLearner || 0) * 0.1; } // ─── Study Cost Formula ─────────────────────────────────────────────────────── export function getStudyCostMultiplier(skills: Record): number { return 1 - (skills.focusedMind || 0) * 0.05; } // ─── Element Opposites for Damage Calculation ──────────────────────────────── export const ELEMENT_OPPOSITES: Record = { fire: 'water', water: 'fire', air: 'earth', earth: 'air', light: 'dark', dark: 'light', life: 'death', death: 'life', }; // ─── Element Icon Mapping (Lucide Icons) ────────────────────────────────────── // Note: These are string identifiers for dynamic icon loading // The actual Lucide icons are imported in the components export const ELEMENT_ICON_NAMES: Record = { fire: 'Flame', water: 'Droplet', air: 'Wind', earth: 'Mountain', light: 'Sun', dark: 'Moon', life: 'Leaf', death: 'Skull', mental: 'Brain', transference: 'Link', force: 'Wind', blood: 'Droplets', metal: 'Target', wood: 'TreeDeciduous', sand: 'Hourglass', crystal: 'Gem', stellar: 'Star', void: 'CircleDot', raw: 'Circle', };