fix: add missing properties to GuardianDef type and GUARDIANS data
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 33s

- Add power, effects, signingCost, unlocksMana, damageMultiplier, insightMultiplier to GuardianDef interface
- Populate all 9 guardian entries with the new properties
- Fixes TS2339 errors in GuardianPanel, pactSlice, computed, EquipmentTab
This commit is contained in:
2026-05-13 12:00:05 +02:00
parent e437269adb
commit 6ad48efff9
2 changed files with 85 additions and 25 deletions
+66 -12
View File
@@ -5,14 +5,20 @@ import type { GuardianDef } from '../types';
export const GUARDIANS: Record<number, GuardianDef> = { export const GUARDIANS: Record<number, GuardianDef> = {
10: { 10: {
name: "Ignis Prime", element: "fire", hp: 5000, pact: 1.5, color: "#FF6B35", name: "Ignis Prime", element: "fire", hp: 5000, pact: 1.5, color: "#FF6B35",
armor: 0.10, // 10% damage reduction armor: 0.10,
boons: [ boons: [
{ type: 'elementalDamage', value: 5, desc: '+5% Fire damage' }, { type: 'elementalDamage', value: 5, desc: '+5% Fire damage' },
{ type: 'maxMana', value: 50, desc: '+50 max mana' }, { type: 'maxMana', value: 50, desc: '+50 max mana' },
], ],
pactCost: 500, pactCost: 500,
pactTime: 2, pactTime: 2,
uniquePerk: "Fire spells cast 10% faster" uniquePerk: "Fire spells cast 10% faster",
power: 50,
effects: [{ type: 'burn', value: 0.1 }],
signingCost: { mana: 500, time: 2 },
unlocksMana: ['fire', 'lightning'],
damageMultiplier: 1.1,
insightMultiplier: 1.05,
}, },
20: { 20: {
name: "Aqua Regia", element: "water", hp: 15000, pact: 1.75, color: "#4ECDC4", name: "Aqua Regia", element: "water", hp: 15000, pact: 1.75, color: "#4ECDC4",
@@ -23,7 +29,13 @@ export const GUARDIANS: Record<number, GuardianDef> = {
], ],
pactCost: 1000, pactCost: 1000,
pactTime: 4, pactTime: 4,
uniquePerk: "Water spells deal +15% damage" uniquePerk: "Water spells deal +15% damage",
power: 150,
effects: [{ type: 'armor_pierce', value: 0.15 }],
signingCost: { mana: 1000, time: 4 },
unlocksMana: ['water', 'transference'],
damageMultiplier: 1.2,
insightMultiplier: 1.1,
}, },
30: { 30: {
name: "Ventus Rex", element: "air", hp: 30000, pact: 2.0, color: "#00D4FF", name: "Ventus Rex", element: "air", hp: 30000, pact: 2.0, color: "#00D4FF",
@@ -34,18 +46,30 @@ export const GUARDIANS: Record<number, GuardianDef> = {
], ],
pactCost: 2000, pactCost: 2000,
pactTime: 6, pactTime: 6,
uniquePerk: "Air spells have 15% crit chance" uniquePerk: "Air spells have 15% crit chance",
power: 300,
effects: [{ type: 'cast_speed', value: 0.05 }],
signingCost: { mana: 2000, time: 6 },
unlocksMana: ['air', 'sand'],
damageMultiplier: 1.3,
insightMultiplier: 1.15,
}, },
40: { 40: {
name: "Terra Firma", element: "earth", hp: 50000, pact: 2.25, color: "#F4A261", name: "Terra Firma", element: "earth", hp: 50000, pact: 2.25, color: "#F4A261",
armor: 0.25, // Earth guardian - highest armor armor: 0.25,
boons: [ boons: [
{ type: 'elementalDamage', value: 5, desc: '+5% Earth damage' }, { type: 'elementalDamage', value: 5, desc: '+5% Earth damage' },
{ type: 'maxMana', value: 100, desc: '+100 max mana' }, { type: 'maxMana', value: 100, desc: '+100 max mana' },
], ],
pactCost: 4000, pactCost: 4000,
pactTime: 8, pactTime: 8,
uniquePerk: "Earth spells deal +25% damage to guardians" uniquePerk: "Earth spells deal +25% damage to guardians",
power: 500,
effects: [{ type: 'armor_pierce', value: 0.2 }],
signingCost: { mana: 4000, time: 8 },
unlocksMana: ['earth', 'metal'],
damageMultiplier: 1.4,
insightMultiplier: 1.2,
}, },
50: { 50: {
name: "Lux Aeterna", element: "light", hp: 80000, pact: 2.5, color: "#FFD700", name: "Lux Aeterna", element: "light", hp: 80000, pact: 2.5, color: "#FFD700",
@@ -56,7 +80,13 @@ export const GUARDIANS: Record<number, GuardianDef> = {
], ],
pactCost: 8000, pactCost: 8000,
pactTime: 10, pactTime: 10,
uniquePerk: "Light spells reveal enemy weaknesses (+20% damage)" uniquePerk: "Light spells reveal enemy weaknesses (+20% damage)",
power: 800,
effects: [{ type: 'crit_chance', value: 0.1 }],
signingCost: { mana: 8000, time: 10 },
unlocksMana: ['light', 'crystal'],
damageMultiplier: 1.5,
insightMultiplier: 1.3,
}, },
60: { 60: {
name: "Umbra Mortis", element: "dark", hp: 120000, pact: 2.75, color: "#9B59B6", name: "Umbra Mortis", element: "dark", hp: 120000, pact: 2.75, color: "#9B59B6",
@@ -67,7 +97,13 @@ export const GUARDIANS: Record<number, GuardianDef> = {
], ],
pactCost: 15000, pactCost: 15000,
pactTime: 12, pactTime: 12,
uniquePerk: "Dark spells deal +25% damage to armored enemies" uniquePerk: "Dark spells deal +25% damage to armored enemies",
power: 1200,
effects: [{ type: 'crit_damage', value: 0.15 }],
signingCost: { mana: 15000, time: 12 },
unlocksMana: ['dark', 'void'],
damageMultiplier: 1.6,
insightMultiplier: 1.4,
}, },
80: { 80: {
name: "Mors Ultima", element: "death", hp: 250000, pact: 3.25, color: "#778CA3", name: "Mors Ultima", element: "death", hp: 250000, pact: 3.25, color: "#778CA3",
@@ -78,7 +114,13 @@ export const GUARDIANS: Record<number, GuardianDef> = {
], ],
pactCost: 40000, pactCost: 40000,
pactTime: 16, pactTime: 16,
uniquePerk: "Death spells execute enemies below 20% HP" uniquePerk: "Death spells execute enemies below 20% HP",
power: 2500,
effects: [{ type: 'raw_damage', value: 0.1 }],
signingCost: { mana: 40000, time: 16 },
unlocksMana: ['death'],
damageMultiplier: 1.8,
insightMultiplier: 1.5,
}, },
90: { 90: {
name: "Primordialis", element: "void", hp: 400000, pact: 4.0, color: "#4A235A", name: "Primordialis", element: "void", hp: 400000, pact: 4.0, color: "#4A235A",
@@ -90,11 +132,17 @@ export const GUARDIANS: Record<number, GuardianDef> = {
], ],
pactCost: 75000, pactCost: 75000,
pactTime: 20, pactTime: 20,
uniquePerk: "Void spells ignore 30% of enemy resistance" uniquePerk: "Void spells ignore 30% of enemy resistance",
power: 4000,
effects: [{ type: 'void_resist', value: 0.3 }],
signingCost: { mana: 75000, time: 20 },
unlocksMana: ['void', 'stellar'],
damageMultiplier: 2.0,
insightMultiplier: 1.7,
}, },
100: { 100: {
name: "The Awakened One", element: "stellar", hp: 1000000, pact: 5.0, color: "#F0E68C", name: "The Awakened One", element: "stellar", hp: 1000000, pact: 5.0, color: "#F0E68C",
armor: 0.35, // Final boss has highest armor armor: 0.35,
boons: [ boons: [
{ type: 'elementalDamage', value: 20, desc: '+20% Stellar damage' }, { type: 'elementalDamage', value: 20, desc: '+20% Stellar damage' },
{ type: 'maxMana', value: 500, desc: '+500 max mana' }, { type: 'maxMana', value: 500, desc: '+500 max mana' },
@@ -103,6 +151,12 @@ export const GUARDIANS: Record<number, GuardianDef> = {
], ],
pactCost: 150000, pactCost: 150000,
pactTime: 24, pactTime: 24,
uniquePerk: "All spells deal +50% damage and cast 25% faster" uniquePerk: "All spells deal +50% damage and cast 25% faster",
power: 10000,
effects: [{ type: 'all_damage', value: 0.5 }],
signingCost: { mana: 150000, time: 24 },
unlocksMana: ['stellar'],
damageMultiplier: 2.5,
insightMultiplier: 2.0,
}, },
}; };
+6
View File
@@ -49,4 +49,10 @@ export interface GuardianDef {
pactTime: number; // Hours required for pact ritual pactTime: number; // Hours required for pact ritual
uniquePerk: string; // Description of unique perk uniquePerk: string; // Description of unique perk
armor?: number; // Damage reduction (0-1, e.g., 0.2 = 20% reduction) armor?: number; // Damage reduction (0-1, e.g., 0.2 = 20% reduction)
power: number; // Combat power for display
effects: { type: string; value: number }[]; // Passive combat effects
signingCost: { mana: number; time: number }; // Pact ritual cost & time
unlocksMana: string[]; // Mana types unlocked on pact
damageMultiplier: number; // Pact damage multiplier
insightMultiplier: number; // Pact insight multiplier
} }