Files
Mana-Loop/src/lib/game/constants.ts
Z User 2b1c115fee
Some checks failed
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m14s
feat: Remove banned mana types (life, blood, wood, mental, force) and lifesteal
- Remove life, blood, wood, mental, force mana types from ELEMENTS
- Remove all spells using banned mana types
- Remove lifesteal from all remaining spells and effects
- Update guardian perks to remove lifesteal mentions
- Remove research skills for banned spell types
- Update tests to reflect new element structure
- Add BANNED CONTENT section to AGENTS.md (lifesteal/healing ban)
- Add mana types overview to README.md and AGENTS.md
- All 44 tests pass, lint clean
2026-03-31 11:44:48 +00:00

1361 lines
54 KiB
TypeScript
Executable File

// ─── 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<string, ElementDef> = {
// 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" },
death: { name: "Death", sym: "💀", color: "#778CA3", glow: "#778CA340", cat: "base" },
// Utility Elements
transference: { name: "Transference", sym: "🔗", color: "#1ABC9C", glow: "#1ABC9C40", cat: "utility" },
// Composite Elements
metal: { name: "Metal", sym: "⚙️", color: "#BDC3C7", glow: "#BDC3C740", cat: "composite", recipe: ["fire", "earth"] },
sand: { name: "Sand", sym: "⏳", color: "#D4AC0D", glow: "#D4AC0D40", cat: "composite", recipe: ["earth", "water"] },
lightning: { name: "Lightning", sym: "⚡", color: "#FFEB3B", glow: "#FFEB3B40", cat: "composite", recipe: ["fire", "air"] },
// Exotic Elements
crystal: { name: "Crystal", sym: "💎", color: "#85C1E9", glow: "#85C1E940", cat: "exotic", recipe: ["sand", "sand", "light"] },
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"] },
};
// NOTE: Life, Blood, Wood, Mental, and Force mana types have been removed.
// Lifesteal and healing are BANNED from player abilities - see AGENTS.md
// Crystal recipe updated to use light instead of mental.
export const FLOOR_ELEM_CYCLE = ["fire", "water", "air", "earth", "light", "dark", "death"];
// ─── Room Types ────────────────────────────────────────────────────────────────
// Room types for spire floors
export type RoomType = 'combat' | 'puzzle' | 'swarm' | 'speed' | 'guardian';
// Room generation rules:
// - Guardian floors (10, 20, 30, etc.) are ALWAYS guardian type
// - Every 5th floor (5, 15, 25, etc.) has a chance for special rooms
// - Other floors are combat with chance for swarm/speed
export const PUZZLE_ROOM_INTERVAL = 7; // Every 7 floors, chance for puzzle
export const SWARM_ROOM_CHANCE = 0.15; // 15% chance for swarm room
export const SPEED_ROOM_CHANCE = 0.10; // 10% chance for speed room
export const PUZZLE_ROOM_CHANCE = 0.20; // 20% chance for puzzle room on puzzle floors
// Puzzle room definitions - themed around attunements
export const PUZZLE_ROOMS: Record<string, {
name: string;
attunements: string[]; // Which attunements speed up progress
baseProgressPerTick: number; // Base progress rate
attunementBonus: number; // Multiplier per relevant attunement level
description: string;
}> = {
enchanter_trial: {
name: "Enchanter's Trial",
attunements: ['enchanter'],
baseProgressPerTick: 0.02,
attunementBonus: 0.03,
description: "Decipher ancient enchantment runes."
},
fabricator_trial: {
name: "Fabricator's Trial",
attunements: ['fabricator'],
baseProgressPerTick: 0.02,
attunementBonus: 0.03,
description: "Construct a mana-powered mechanism."
},
invoker_trial: {
name: "Invoker's Trial",
attunements: ['invoker'],
baseProgressPerTick: 0.02,
attunementBonus: 0.03,
description: "Commune with guardian spirits."
},
hybrid_enchanter_fabricator: {
name: "Fusion Workshop",
attunements: ['enchanter', 'fabricator'],
baseProgressPerTick: 0.015,
attunementBonus: 0.025,
description: "Enchant and construct in harmony."
},
hybrid_enchanter_invoker: {
name: "Ritual Circle",
attunements: ['enchanter', 'invoker'],
baseProgressPerTick: 0.015,
attunementBonus: 0.025,
description: "Bind pact energies into enchantments."
},
hybrid_fabricator_invoker: {
name: "Golem Forge",
attunements: ['fabricator', 'invoker'],
baseProgressPerTick: 0.015,
attunementBonus: 0.025,
description: "Channel guardian power into constructs."
},
};
// Swarm room configuration
export const SWARM_CONFIG = {
minEnemies: 3,
maxEnemies: 6,
hpMultiplier: 0.4, // Each enemy has 40% of normal floor HP
armorBase: 0, // Swarm enemies start with no armor
armorPerFloor: 0.01, // Gain 1% armor per 10 floors
};
// Speed room configuration (dodging enemies)
export const SPEED_ROOM_CONFIG = {
baseDodgeChance: 0.25, // 25% base dodge chance
dodgePerFloor: 0.005, // +0.5% dodge per floor
maxDodge: 0.50, // Max 50% dodge
speedBonus: 0.5, // 50% less time to complete if dodged
};
// Armor scaling for normal floors
export const FLOOR_ARMOR_CONFIG = {
baseChance: 0, // No armor on floor 1-9
chancePerFloor: 0.01, // +1% chance per floor after 10
maxArmorChance: 0.5, // Max 50% of floors have armor
minArmor: 0.05, // Min 5% armor
maxArmor: 0.25, // Max 25% armor on non-guardians
};
// ─── Guardians ────────────────────────────────────────────────────────────────
// All guardians have armor - damage reduction percentage
export const GUARDIANS: Record<number, GuardianDef> = {
10: {
name: "Ignis Prime", element: "fire", hp: 5000, pact: 1.5, color: "#FF6B35",
armor: 0.10, // 10% damage reduction
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",
armor: 0.15,
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 deal +15% damage"
},
30: {
name: "Ventus Rex", element: "air", hp: 30000, pact: 2.0, color: "#00D4FF",
armor: 0.18,
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",
armor: 0.25, // Earth guardian - highest armor
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",
armor: 0.20,
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",
armor: 0.22,
boons: [
{ type: 'elementalDamage', value: 10, desc: '+10% Dark damage' },
{ type: 'critDamage', value: 15, desc: '+15% crit damage' },
],
pactCost: 15000,
pactTime: 12,
uniquePerk: "Dark spells deal +25% damage to armored enemies"
},
80: {
name: "Mors Ultima", element: "death", hp: 250000, pact: 3.25, color: "#778CA3",
armor: 0.25,
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",
armor: 0.30,
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",
armor: 0.35, // Final boss has highest armor
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<string, SpellDef> = {
// 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.",
},
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."
},
// 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."
},
// 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."
},
// 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."
},
// ═══════════════════════════════════════════════════════════════════════════
// LIGHTNING SPELLS - Fast, armor-piercing, harder to dodge
// ═══════════════════════════════════════════════════════════════════════════
// Tier 1 - Basic Lightning
spark: {
name: "Spark",
elem: "lightning",
dmg: 8,
cost: elemCost("lightning", 1),
tier: 1,
castSpeed: 4,
unlock: 120,
studyTime: 2,
desc: "A quick spark of lightning. Very fast and hard to dodge.",
effects: [{ type: 'armor_pierce', value: 0.2 }]
},
lightningBolt: {
name: "Lightning Bolt",
elem: "lightning",
dmg: 14,
cost: elemCost("lightning", 2),
tier: 1,
castSpeed: 3,
unlock: 150,
studyTime: 3,
desc: "A bolt of lightning that pierces armor.",
effects: [{ type: 'armor_pierce', value: 0.3 }]
},
// Tier 2 - Advanced Lightning
chainLightning: {
name: "Chain Lightning",
elem: "lightning",
dmg: 25,
cost: elemCost("lightning", 5),
tier: 2,
castSpeed: 2,
unlock: 900,
studyTime: 8,
desc: "Lightning that arcs between enemies. Hits 3 targets.",
isAoe: true,
aoeTargets: 3,
effects: [{ type: 'chain', value: 3 }]
},
stormCall: {
name: "Storm Call",
elem: "lightning",
dmg: 40,
cost: elemCost("lightning", 6),
tier: 2,
castSpeed: 1.5,
unlock: 1100,
studyTime: 10,
desc: "Call down a storm. Hits 2 targets with armor pierce.",
isAoe: true,
aoeTargets: 2,
effects: [{ type: 'armor_pierce', value: 0.4 }]
},
// Tier 3 - Master Lightning
thunderStrike: {
name: "Thunder Strike",
elem: "lightning",
dmg: 150,
cost: elemCost("lightning", 15),
tier: 3,
castSpeed: 0.8,
unlock: 10000,
studyTime: 24,
desc: "Devastating lightning that ignores 50% armor.",
effects: [{ type: 'armor_pierce', value: 0.5 }]
},
// ═══════════════════════════════════════════════════════════════════════════
// AOE SPELLS - Hit multiple enemies, less damage per target
// ═══════════════════════════════════════════════════════════════════════════
// Tier 1 AOE
fireballAoe: {
name: "Fireball (AOE)",
elem: "fire",
dmg: 8,
cost: elemCost("fire", 3),
tier: 1,
castSpeed: 2,
unlock: 150,
studyTime: 3,
desc: "An explosive fireball that hits 3 enemies.",
isAoe: true,
aoeTargets: 3,
effects: [{ type: 'aoe', value: 3 }]
},
frostNova: {
name: "Frost Nova",
elem: "water",
dmg: 6,
cost: elemCost("water", 3),
tier: 1,
castSpeed: 2,
unlock: 140,
studyTime: 3,
desc: "A burst of frost hitting 4 enemies. May freeze.",
isAoe: true,
aoeTargets: 4,
effects: [{ type: 'freeze', value: 0.15, chance: 0.2 }]
},
// Tier 2 AOE
meteorShower: {
name: "Meteor Shower",
elem: "fire",
dmg: 20,
cost: elemCost("fire", 8),
tier: 2,
castSpeed: 1,
unlock: 1200,
studyTime: 10,
desc: "Rain meteors on 5 enemies.",
isAoe: true,
aoeTargets: 5
},
blizzard: {
name: "Blizzard",
elem: "water",
dmg: 18,
cost: elemCost("water", 7),
tier: 2,
castSpeed: 1.2,
unlock: 1000,
studyTime: 9,
desc: "A freezing blizzard hitting 4 enemies.",
isAoe: true,
aoeTargets: 4,
effects: [{ type: 'freeze', value: 0.1, chance: 0.15 }]
},
earthquakeAoe: {
name: "Earth Tremor",
elem: "earth",
dmg: 25,
cost: elemCost("earth", 8),
tier: 2,
castSpeed: 0.8,
unlock: 1400,
studyTime: 10,
desc: "Shake the ground, hitting 3 enemies with high damage.",
isAoe: true,
aoeTargets: 3
},
// Tier 3 AOE
apocalypse: {
name: "Apocalypse",
elem: "fire",
dmg: 80,
cost: elemCost("fire", 20),
tier: 3,
castSpeed: 0.5,
unlock: 15000,
studyTime: 30,
desc: "End times. Hits ALL enemies with devastating fire.",
isAoe: true,
aoeTargets: 10
},
// ═══════════════════════════════════════════════════════════════════════════
// MAGIC SWORD ENCHANTMENTS - For weapon enchanting system
// ═══════════════════════════════════════════════════════════════════════════
fireBlade: {
name: "Fire Blade",
elem: "fire",
dmg: 3,
cost: rawCost(1),
tier: 1,
castSpeed: 4,
unlock: 100,
studyTime: 2,
desc: "Enchant a blade with fire. Burns enemies over time.",
isWeaponEnchant: true,
effects: [{ type: 'burn', value: 2, duration: 3 }]
},
frostBlade: {
name: "Frost Blade",
elem: "water",
dmg: 3,
cost: rawCost(1),
tier: 1,
castSpeed: 4,
unlock: 100,
studyTime: 2,
desc: "Enchant a blade with frost. Prevents enemy dodge.",
isWeaponEnchant: true,
effects: [{ type: 'freeze', value: 0, chance: 1 }] // 100% freeze = no dodge
},
lightningBlade: {
name: "Lightning Blade",
elem: "lightning",
dmg: 4,
cost: rawCost(1),
tier: 1,
castSpeed: 5,
unlock: 150,
studyTime: 3,
desc: "Enchant a blade with lightning. Pierces 30% armor.",
isWeaponEnchant: true,
effects: [{ type: 'armor_pierce', value: 0.3 }]
},
voidBlade: {
name: "Void Blade",
elem: "dark",
dmg: 5,
cost: rawCost(2),
tier: 2,
castSpeed: 3,
unlock: 800,
studyTime: 8,
desc: "Enchant a blade with void. +20% damage.",
isWeaponEnchant: true,
effects: [{ type: 'buff', value: 0.2 }]
},
// ═══════════════════════════════════════════════════════════════════════════
// COMPOUND MANA SPELLS - Blood, Metal, Wood, Sand
// ═══════════════════════════════════════════════════════════════════════════
// ─── METAL SPELLS (Fire + Earth) ─────────────────────────────────────────────
// Metal magic is slow but devastating with high armor pierce
metalShard: {
name: "Metal Shard",
elem: "metal",
dmg: 16,
cost: elemCost("metal", 2),
tier: 1,
castSpeed: 1.8,
unlock: 220,
studyTime: 3,
desc: "A sharpened metal shard. Slower but pierces armor.",
effects: [{ type: 'armor_pierce', value: 0.25 }]
},
ironFist: {
name: "Iron Fist",
elem: "metal",
dmg: 28,
cost: elemCost("metal", 4),
tier: 1,
castSpeed: 1.5,
unlock: 350,
studyTime: 5,
desc: "A crushing fist of iron. High armor pierce.",
effects: [{ type: 'armor_pierce', value: 0.35 }]
},
steelTempest: {
name: "Steel Tempest",
elem: "metal",
dmg: 55,
cost: elemCost("metal", 8),
tier: 2,
castSpeed: 1,
unlock: 1300,
studyTime: 12,
desc: "A whirlwind of steel blades. Ignores much armor.",
effects: [{ type: 'armor_pierce', value: 0.45 }]
},
furnaceBlast: {
name: "Furnace Blast",
elem: "metal",
dmg: 200,
cost: elemCost("metal", 20),
tier: 3,
castSpeed: 0.5,
unlock: 18000,
studyTime: 32,
desc: "Molten metal and fire combined. Devastating armor pierce.",
effects: [{ type: 'armor_pierce', value: 0.6 }]
},
// ─── SAND SPELLS (Earth + Water) ────────────────────────────────────────────
// Sand magic slows enemies and deals steady damage
sandBlast: {
name: "Sand Blast",
elem: "sand",
dmg: 11,
cost: elemCost("sand", 2),
tier: 1,
castSpeed: 3,
unlock: 190,
studyTime: 3,
desc: "A blast of stinging sand. Fast casting.",
},
sandstorm: {
name: "Sandstorm",
elem: "sand",
dmg: 22,
cost: elemCost("sand", 4),
tier: 1,
castSpeed: 2,
unlock: 300,
studyTime: 4,
desc: "A swirling sandstorm. Hits 2 enemies.",
isAoe: true,
aoeTargets: 2,
},
desertWind: {
name: "Desert Wind",
elem: "sand",
dmg: 38,
cost: elemCost("sand", 6),
tier: 2,
castSpeed: 1.5,
unlock: 950,
studyTime: 8,
desc: "A scouring desert wind. Hits 3 enemies.",
isAoe: true,
aoeTargets: 3,
},
duneCollapse: {
name: "Dune Collapse",
elem: "sand",
dmg: 100,
cost: elemCost("sand", 16),
tier: 3,
castSpeed: 0.6,
unlock: 14000,
studyTime: 28,
desc: "Dunes collapse on all enemies. Hits 5 targets.",
isAoe: true,
aoeTargets: 5,
},
// ═══════════════════════════════════════════════════════════════════════════
// UTILITY MANA SPELLS - Mental, Transference, Force
// ═══════════════════════════════════════════════════════════════════════════
// ─── TRANSFERENCE SPELLS ─────────────────────────────────────────────────────
// Transference magic moves mana and enhances efficiency
transferStrike: {
name: "Transfer Strike",
elem: "transference",
dmg: 9,
cost: elemCost("transference", 2),
tier: 1,
castSpeed: 3,
unlock: 150,
studyTime: 2,
desc: "Strike that transfers energy. Very efficient.",
},
manaRip: {
name: "Mana Rip",
elem: "transference",
dmg: 16,
cost: elemCost("transference", 3),
tier: 1,
castSpeed: 2.5,
unlock: 250,
studyTime: 4,
desc: "Rip mana from the enemy. High efficiency.",
},
essenceDrain: {
name: "Essence Drain",
elem: "transference",
dmg: 42,
cost: elemCost("transference", 7),
tier: 2,
castSpeed: 1.3,
unlock: 1050,
studyTime: 10,
desc: "Drain the enemy's essence.",
},
soulTransfer: {
name: "Soul Transfer",
elem: "transference",
dmg: 130,
cost: elemCost("transference", 16),
tier: 3,
castSpeed: 0.6,
unlock: 13000,
studyTime: 26,
desc: "Transfer the soul's energy.",
},
};
// ─── Skills ───────────────────────────────────────────────────────────────────
export const SKILLS_DEF: Record<string, SkillDef> = {
// Mana Skills (4-8 hours study) - Core, no attunement required
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) - Core, no attunement required
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) - Requires Enchanter attunement levels
enchanting: { name: "Enchanting", desc: "Unlocks enchantment design", cat: "enchant", max: 10, base: 200, studyTime: 5, attunement: 'enchanter', attunementReq: { enchanter: 1 } },
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 } },
// 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 } },
// Effect Research Skills (unlock enchantment effects for designing) - Requires Enchanter
// 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 }, attunementReq: { enchanter: 1 } },
researchFireSpells: { name: "Fire Spell Research", desc: "Unlock Ember Shot, Fireball spell enchantments", cat: "effectResearch", max: 1, base: 300, studyTime: 6, req: { enchanting: 2 }, attunementReq: { enchanter: 1 } },
researchWaterSpells: { name: "Water Spell Research", desc: "Unlock Water Jet, Ice Shard spell enchantments", cat: "effectResearch", max: 1, base: 300, studyTime: 6, req: { enchanting: 2 }, attunementReq: { enchanter: 1 } },
researchAirSpells: { name: "Air Spell Research", desc: "Unlock Gust, Wind Slash spell enchantments", cat: "effectResearch", max: 1, base: 300, studyTime: 6, req: { enchanting: 2 }, attunementReq: { enchanter: 1 } },
researchEarthSpells: { name: "Earth Spell Research", desc: "Unlock Stone Bullet, Rock Spike spell enchantments", cat: "effectResearch", max: 1, base: 350, studyTime: 6, req: { enchanting: 2 }, attunementReq: { enchanter: 1 } },
researchLightSpells: { name: "Light Spell Research", desc: "Unlock Light Lance, Radiance spell enchantments", cat: "effectResearch", max: 1, base: 400, studyTime: 8, req: { enchanting: 3 }, attunementReq: { enchanter: 2 } },
researchDarkSpells: { name: "Dark Spell Research", desc: "Unlock Shadow Bolt, Dark Pulse spell enchantments", cat: "effectResearch", max: 1, base: 400, studyTime: 8, req: { enchanting: 3 }, attunementReq: { enchanter: 2 } },
researchLifeDeathSpells: { name: "Death Research", desc: "Unlock Drain spell enchantment", cat: "effectResearch", max: 1, base: 400, studyTime: 8, req: { enchanting: 3 }, attunementReq: { enchanter: 2 } },
// Tier 2 - Advanced Spell Effects - Require Enchanter 3
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 }, attunementReq: { enchanter: 3 } },
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 }, attunementReq: { enchanter: 3 } },
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 }, attunementReq: { enchanter: 3 } },
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 }, attunementReq: { enchanter: 3 } },
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 }, attunementReq: { enchanter: 4 } },
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 }, attunementReq: { enchanter: 4 } },
// Tier 3 - Master Spell Effects - Require Enchanter 5
researchMasterFire: { name: "Master Fire Research", desc: "Unlock Pyroclasm spell enchantment", cat: "effectResearch", max: 1, base: 1200, studyTime: 24, req: { researchAdvancedFire: 1, enchanting: 7 }, attunementReq: { enchanter: 5 } },
researchMasterWater: { name: "Master Water Research", desc: "Unlock Tsunami spell enchantment", cat: "effectResearch", max: 1, base: 1200, studyTime: 24, req: { researchAdvancedWater: 1, enchanting: 7 }, attunementReq: { enchanter: 5 } },
researchMasterEarth: { name: "Master Earth Research", desc: "Unlock Meteor Strike spell enchantment", cat: "effectResearch", max: 1, base: 1300, studyTime: 26, req: { researchAdvancedEarth: 1, enchanting: 8 }, attunementReq: { enchanter: 5 } },
// 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 }, attunementReq: { enchanter: 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 }, attunementReq: { enchanter: 2 } },
// Mana Effect Research - Also unlocks weapon mana effects at Enchanter 3
researchManaEffects: { name: "Mana Effect Research", desc: "Unlock Mana Reserve, Trickle, Mana Tap, and weapon mana effects", cat: "effectResearch", max: 1, base: 200, studyTime: 4, req: { enchanting: 1 }, attunementReq: { enchanter: 1 } },
researchAdvancedManaEffects: { name: "Advanced Mana Research", desc: "Unlock Mana Reservoir, Stream, River, Mana Surge, and advanced weapon mana effects", cat: "effectResearch", max: 1, base: 400, studyTime: 8, req: { researchManaEffects: 1, enchanting: 3 }, attunementReq: { enchanter: 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 }, attunementReq: { enchanter: 1 } },
// 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 }, attunementReq: { enchanter: 3 } },
researchOverpower: { name: "Overpower Research", desc: "Unlock Overpower effect", cat: "effectResearch", max: 1, base: 700, studyTime: 12, req: { researchSpecialEffects: 1, enchanting: 5 }, attunementReq: { enchanter: 4 } },
// ═══════════════════════════════════════════════════════════════════════════
// COMPOUND MANA SPELL RESEARCH - Metal, Sand, Lightning
// ═══════════════════════════════════════════════════════════════════════════
// Tier 1 - Basic Compound Spells
researchMetalSpells: { name: "Metal Spell Research", desc: "Unlock Metal Shard, Iron Fist spell enchantments", cat: "effectResearch", max: 1, base: 400, studyTime: 6, req: { researchFireSpells: 1, researchEarthSpells: 1, enchanting: 3 }, attunementReq: { enchanter: 2 } },
researchSandSpells: { name: "Sand Spell Research", desc: "Unlock Sand Blast, Sandstorm spell enchantments", cat: "effectResearch", max: 1, base: 400, studyTime: 6, req: { researchEarthSpells: 1, researchWaterSpells: 1, enchanting: 3 }, attunementReq: { enchanter: 2 } },
researchLightningSpells: { name: "Lightning Spell Research", desc: "Unlock Spark, Lightning Bolt spell enchantments", cat: "effectResearch", max: 1, base: 400, studyTime: 6, req: { researchFireSpells: 1, researchAirSpells: 1, enchanting: 3 }, attunementReq: { enchanter: 2 } },
// Tier 2 - Advanced Compound Spells
researchAdvancedMetal: { name: "Advanced Metal Research", desc: "Unlock Steel Tempest spell enchantment", cat: "effectResearch", max: 1, base: 700, studyTime: 12, req: { researchMetalSpells: 1, enchanting: 5 }, attunementReq: { enchanter: 3 } },
researchAdvancedSand: { name: "Advanced Sand Research", desc: "Unlock Desert Wind spell enchantment", cat: "effectResearch", max: 1, base: 700, studyTime: 12, req: { researchSandSpells: 1, enchanting: 5 }, attunementReq: { enchanter: 3 } },
researchAdvancedLightning: { name: "Advanced Lightning Research", desc: "Unlock Chain Lightning, Storm Call spell enchantments", cat: "effectResearch", max: 1, base: 700, studyTime: 12, req: { researchLightningSpells: 1, enchanting: 5 }, attunementReq: { enchanter: 3 } },
// Tier 3 - Master Compound Spells
researchMasterMetal: { name: "Master Metal Research", desc: "Unlock Furnace Blast spell enchantment", cat: "effectResearch", max: 1, base: 1300, studyTime: 26, req: { researchAdvancedMetal: 1, enchanting: 7 }, attunementReq: { enchanter: 5 } },
researchMasterSand: { name: "Master Sand Research", desc: "Unlock Dune Collapse spell enchantment", cat: "effectResearch", max: 1, base: 1300, studyTime: 26, req: { researchAdvancedSand: 1, enchanting: 7 }, attunementReq: { enchanter: 5 } },
researchMasterLightning: { name: "Master Lightning Research", desc: "Unlock Thunder Strike spell enchantment", cat: "effectResearch", max: 1, base: 1300, studyTime: 26, req: { researchAdvancedLightning: 1, enchanting: 7 }, attunementReq: { enchanter: 5 } },
// ═══════════════════════════════════════════════════════════════════════════
// UTILITY MANA SPELL RESEARCH - Transference
// ═══════════════════════════════════════════════════════════════════════════
// Tier 1 - Basic Utility Spells
researchTransferenceSpells: { name: "Transference Spell Research", desc: "Unlock Transfer Strike, Mana Rip spell enchantments", cat: "effectResearch", max: 1, base: 350, studyTime: 5, req: { enchanting: 3 }, attunementReq: { enchanter: 1 } },
// Tier 2 - Advanced Utility Spells
researchAdvancedTransference: { name: "Advanced Transference Research", desc: "Unlock Essence Drain spell enchantment", cat: "effectResearch", max: 1, base: 650, studyTime: 12, req: { researchTransferenceSpells: 1, enchanting: 5 }, attunementReq: { enchanter: 3 } },
// Tier 3 - Master Utility Spells
researchMasterTransference: { name: "Master Transference Research", desc: "Unlock Soul Transfer spell enchantment", cat: "effectResearch", max: 1, base: 1300, studyTime: 26, req: { researchAdvancedTransference: 1, enchanting: 7 }, attunementReq: { enchanter: 5 } },
// Research Skills (longer study times: 12-72 hours) - Core skills, any attunement level 3
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) - 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 } },
guardianBane: { name: "Guardian Bane", desc: "+20% dmg vs guardians", cat: "ascension", max: 3, base: 1500, studyTime: 30, attunementReq: { invoker: 1 } },
};
// ─── Prestige Upgrades ────────────────────────────────────────────────────────
export const PRESTIGE_DEF: Record<string, PrestigeDef> = {
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<string, string> = {
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<string, string[]> = {
// 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'],
// 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', 'guardian_dmg_10'],
researchOverpower: ['overpower_80'],
// ═══════════════════════════════════════════════════════════════════════════
// COMPOUND MANA SPELL RESEARCH - Metal, Sand, Lightning
// ═══════════════════════════════════════════════════════════════════════════
// Tier 1 - Basic Compound Spells
researchMetalSpells: ['spell_metalShard', 'spell_ironFist'],
researchSandSpells: ['spell_sandBlast', 'spell_sandstorm'],
researchLightningSpells: ['spell_spark', 'spell_lightningBolt'],
// Tier 2 - Advanced Compound Spells
researchAdvancedMetal: ['spell_steelTempest'],
researchAdvancedSand: ['spell_desertWind'],
researchAdvancedLightning: ['spell_chainLightning', 'spell_stormCall'],
// Tier 3 - Master Compound Spells
researchMasterMetal: ['spell_furnaceBlast'],
researchMasterSand: ['spell_duneCollapse'],
researchMasterLightning: ['spell_thunderStrike'],
// ═══════════════════════════════════════════════════════════════════════════
// UTILITY MANA SPELL RESEARCH - Transference
// ═══════════════════════════════════════════════════════════════════════════
// Tier 1 - Basic Utility Spells
researchTransferenceSpells: ['spell_transferStrike', 'spell_manaRip'],
// Tier 2 - Advanced Utility Spells
researchAdvancedTransference: ['spell_essenceDrain'],
// Tier 3 - Master Utility Spells
researchMasterTransference: ['spell_soulTransfer'],
};
// 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<string, number>): number {
return 1 + (skills.quickLearner || 0) * 0.1;
}
// ─── Study Cost Formula ───────────────────────────────────────────────────────
export function getStudyCostMultiplier(skills: Record<string, number>): number {
return 1 - (skills.focusedMind || 0) * 0.05;
}
// ─── Element Opposites for Damage Calculation ────────────────────────────────
export const ELEMENT_OPPOSITES: Record<string, string> = {
fire: 'water', water: 'fire',
air: 'earth', earth: 'air',
light: 'dark', dark: 'light',
lightning: 'earth', // Lightning is weak to earth (grounding)
};
// ─── 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<string, string> = {
fire: 'Flame',
water: 'Droplet',
air: 'Wind',
earth: 'Mountain',
light: 'Sun',
dark: 'Moon',
death: 'Skull',
transference: 'Link',
metal: 'Target',
sand: 'Hourglass',
lightning: 'Zap',
crystal: 'Gem',
stellar: 'Star',
void: 'CircleDot',
raw: 'Circle',
};