fix(#170): wire fabricator crafting completion + bonus enchantments + remove dead code
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m22s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m22s
This commit is contained in:
@@ -4,16 +4,13 @@ import type { EquipmentType } from './types';
|
||||
|
||||
export const SWORD_EQUIPMENT: Record<string, EquipmentType> = {
|
||||
// ─── Main Hand - Magic Swords ─────────────────────────────────────
|
||||
// Magic swords have low base damage but high cast speed
|
||||
// They can be enchanted with elemental effects that use mana over time
|
||||
// Magic swords can be enchanted with elemental effects that use mana over time
|
||||
ironBlade: {
|
||||
id: 'ironBlade',
|
||||
name: 'Iron Blade',
|
||||
category: 'sword',
|
||||
slot: 'mainHand',
|
||||
baseCapacity: 30,
|
||||
baseDamage: 3,
|
||||
baseCastSpeed: 4,
|
||||
description: 'A simple iron sword. Can be enchanted with elemental effects.',
|
||||
},
|
||||
steelBlade: {
|
||||
@@ -22,8 +19,6 @@ export const SWORD_EQUIPMENT: Record<string, EquipmentType> = {
|
||||
category: 'sword',
|
||||
slot: 'mainHand',
|
||||
baseCapacity: 40,
|
||||
baseDamage: 4,
|
||||
baseCastSpeed: 4,
|
||||
description: 'A well-crafted steel sword. Balanced for combat and enchanting.',
|
||||
},
|
||||
crystalBlade: {
|
||||
@@ -32,8 +27,6 @@ export const SWORD_EQUIPMENT: Record<string, EquipmentType> = {
|
||||
category: 'sword',
|
||||
slot: 'mainHand',
|
||||
baseCapacity: 55,
|
||||
baseDamage: 3,
|
||||
baseCastSpeed: 5,
|
||||
description: 'A blade made of crystallized mana. Excellent for elemental enchantments.',
|
||||
},
|
||||
arcanistBlade: {
|
||||
@@ -42,8 +35,6 @@ export const SWORD_EQUIPMENT: Record<string, EquipmentType> = {
|
||||
category: 'sword',
|
||||
slot: 'mainHand',
|
||||
baseCapacity: 65,
|
||||
baseDamage: 5,
|
||||
baseCastSpeed: 4,
|
||||
description: 'A sword forged for battle mages. High capacity for powerful enchantments.',
|
||||
},
|
||||
voidBlade: {
|
||||
@@ -52,8 +43,6 @@ export const SWORD_EQUIPMENT: Record<string, EquipmentType> = {
|
||||
category: 'sword',
|
||||
slot: 'mainHand',
|
||||
baseCapacity: 50,
|
||||
baseDamage: 6,
|
||||
baseCastSpeed: 3,
|
||||
description: 'A blade corrupted by void energy. Powerful but consumes more mana.',
|
||||
},
|
||||
};
|
||||
|
||||
@@ -26,7 +26,5 @@ export interface EquipmentType {
|
||||
slot: EquipmentSlot;
|
||||
baseCapacity: number;
|
||||
description: string;
|
||||
baseDamage?: number; // For swords
|
||||
baseCastSpeed?: number; // For swords (higher = faster)
|
||||
twoHanded?: boolean; // If true, weapon occupies both main hand and offhand slots
|
||||
}
|
||||
|
||||
@@ -17,6 +17,10 @@ export const PHYSICAL_BRANCH_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 5,
|
||||
rarity: 'rare',
|
||||
gearTrait: '+20% Cast Speed, +15% Spell Damage',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'damage_10', stacks: 1, actualCost: 28 },
|
||||
{ effectId: 'attack_speed_10', stacks: 1, actualCost: 22 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'arcanistBlade',
|
||||
@@ -30,6 +34,11 @@ export const PHYSICAL_BRANCH_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 7,
|
||||
rarity: 'epic',
|
||||
gearTrait: '+15% Spell Damage, +15% Cast Speed, +10% Enchantment Power',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'damage_10', stacks: 1, actualCost: 28 },
|
||||
{ effectId: 'attack_speed_10', stacks: 1, actualCost: 22 },
|
||||
{ effectId: 'metal_cap_10', stacks: 1, actualCost: 30 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'voidBlade',
|
||||
@@ -43,6 +52,10 @@ export const PHYSICAL_BRANCH_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 6,
|
||||
rarity: 'epic',
|
||||
gearTrait: '+25% Spell Damage, +10% Attack Speed',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'damage_10', stacks: 1, actualCost: 28 },
|
||||
{ effectId: 'dark_cap_10', stacks: 1, actualCost: 30 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'battleHelm',
|
||||
@@ -56,6 +69,10 @@ export const PHYSICAL_BRANCH_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 4,
|
||||
rarity: 'rare',
|
||||
gearTrait: '+10% Spell Damage, +15% Attack Speed',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'damage_5', stacks: 1, actualCost: 15 },
|
||||
{ effectId: 'attack_speed_10', stacks: 1, actualCost: 22 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'battleRobe',
|
||||
@@ -69,6 +86,10 @@ export const PHYSICAL_BRANCH_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 5,
|
||||
rarity: 'rare',
|
||||
gearTrait: '+15% Cast Speed, +10% Evasion',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'attack_speed_10', stacks: 1, actualCost: 22 },
|
||||
{ effectId: 'mana_cap_50', stacks: 1, actualCost: 20 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'battleBoots',
|
||||
@@ -82,6 +103,9 @@ export const PHYSICAL_BRANCH_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 3,
|
||||
rarity: 'uncommon',
|
||||
gearTrait: '+12% Cast Speed, +8% Attack Speed',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'attack_speed_10', stacks: 1, actualCost: 22 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'combatGauntlets',
|
||||
@@ -95,6 +119,9 @@ export const PHYSICAL_BRANCH_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 3,
|
||||
rarity: 'uncommon',
|
||||
gearTrait: '+10% Attack Speed, +10% Cast Speed',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'attack_speed_10', stacks: 1, actualCost: 22 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'runicShield',
|
||||
@@ -108,6 +135,10 @@ export const PHYSICAL_BRANCH_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 5,
|
||||
rarity: 'rare',
|
||||
gearTrait: '+20% Defensive Enchantment Power, +25 Earth Mana Capacity',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'earth_cap_10', stacks: 1, actualCost: 30 },
|
||||
{ effectId: 'mana_cap_50', stacks: 1, actualCost: 20 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'manaShield',
|
||||
@@ -121,5 +152,9 @@ export const PHYSICAL_BRANCH_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 6,
|
||||
rarity: 'epic',
|
||||
gearTrait: '+15% Spell Damage, +15% Defensive Enchantment Power',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'mana_cap_50', stacks: 1, actualCost: 20 },
|
||||
{ effectId: 'damage_5', stacks: 1, actualCost: 15 },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// ─── Fabricator Recipe Types ───────────────────────────────────────────────────
|
||||
// Shared types for fabricator and material recipes to avoid circular dependencies.
|
||||
|
||||
import type { EquipmentSlot } from './equipment/types';
|
||||
import type { AppliedEnchantment } from '../types/equipment';
|
||||
|
||||
export interface FabricatorRecipe {
|
||||
id: string;
|
||||
@@ -23,6 +23,8 @@ export interface FabricatorRecipe {
|
||||
rarity: 'common' | 'uncommon' | 'rare' | 'epic' | 'legendary';
|
||||
/** Flavor text describing the gear's properties */
|
||||
gearTrait: string;
|
||||
/** Actual enchantments applied to the crafted instance (empty = no bonus effects) */
|
||||
bonusEnchantments?: AppliedEnchantment[];
|
||||
/** Recipe type: 'equipment' (default) or 'material' */
|
||||
recipeType?: 'equipment' | 'material';
|
||||
/** For material recipes: the material ID produced */
|
||||
|
||||
@@ -25,6 +25,9 @@ export const FABRICATOR_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 3,
|
||||
rarity: 'uncommon',
|
||||
gearTrait: '+25 Earth Mana Capacity',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'earth_cap_10', stacks: 1, actualCost: 30 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'earthChest',
|
||||
@@ -38,6 +41,10 @@ export const FABRICATOR_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 6,
|
||||
rarity: 'rare',
|
||||
gearTrait: '+50 Earth Mana Capacity, +10% Earth Mana Regen',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'earth_cap_10', stacks: 1, actualCost: 30 },
|
||||
{ effectId: 'mana_regen_1', stacks: 1, actualCost: 15 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'earthBoots',
|
||||
@@ -51,6 +58,9 @@ export const FABRICATOR_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 2,
|
||||
rarity: 'uncommon',
|
||||
gearTrait: '+20 Earth Mana Capacity',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'earth_cap_10', stacks: 1, actualCost: 30 },
|
||||
],
|
||||
},
|
||||
|
||||
// ─── Metal Gear (Fire+Earth — balanced offense/defense) ──────────────
|
||||
@@ -66,6 +76,10 @@ export const FABRICATOR_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 5,
|
||||
rarity: 'rare',
|
||||
gearTrait: '+15% Enchantment Power, +20 Metal Mana Capacity',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'damage_5', stacks: 1, actualCost: 15 },
|
||||
{ effectId: 'metal_cap_10', stacks: 1, actualCost: 30 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'metalShield',
|
||||
@@ -79,6 +93,9 @@ export const FABRICATOR_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 5,
|
||||
rarity: 'rare',
|
||||
gearTrait: '+15% Enchantment Capacity',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'mana_cap_50', stacks: 1, actualCost: 20 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'metalGloves',
|
||||
@@ -92,6 +109,9 @@ export const FABRICATOR_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 3,
|
||||
rarity: 'uncommon',
|
||||
gearTrait: '+10% Enchantment Power, +15 Metal Mana Capacity',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'metal_cap_10', stacks: 1, actualCost: 30 },
|
||||
],
|
||||
},
|
||||
|
||||
// ─── Crystal Gear (Sand+Sand+Light — high enchantment capacity) ──────
|
||||
@@ -107,6 +127,10 @@ export const FABRICATOR_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 6,
|
||||
rarity: 'epic',
|
||||
gearTrait: '+40% enchantment capacity',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'mana_cap_50', stacks: 1, actualCost: 20 },
|
||||
{ effectId: 'mana_regen_1', stacks: 1, actualCost: 15 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'crystalRing',
|
||||
@@ -120,6 +144,9 @@ export const FABRICATOR_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 3,
|
||||
rarity: 'rare',
|
||||
gearTrait: '+15% enchantment capacity',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'mana_cap_50', stacks: 1, actualCost: 20 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'crystalAmulet',
|
||||
@@ -133,6 +160,9 @@ export const FABRICATOR_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 4,
|
||||
rarity: 'rare',
|
||||
gearTrait: '+10% all enchantment effects',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'crystal_cap_10', stacks: 1, actualCost: 30 },
|
||||
],
|
||||
},
|
||||
|
||||
// ─── Sand Gear (Earth+Water — lightweight, agile) ────────────────────
|
||||
@@ -148,6 +178,9 @@ export const FABRICATOR_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 2,
|
||||
rarity: 'uncommon',
|
||||
gearTrait: '+15% cast speed, +10% evasion',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'attack_speed_10', stacks: 1, actualCost: 22 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'sandGloves',
|
||||
@@ -161,6 +194,9 @@ export const FABRICATOR_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 2,
|
||||
rarity: 'uncommon',
|
||||
gearTrait: '+10% cast speed',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'attack_speed_10', stacks: 1, actualCost: 22 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'sandVest',
|
||||
@@ -174,6 +210,10 @@ export const FABRICATOR_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 4,
|
||||
rarity: 'rare',
|
||||
gearTrait: '+20% cast speed, +5% evasion',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'attack_speed_10', stacks: 1, actualCost: 22 },
|
||||
{ effectId: 'sand_cap_10', stacks: 1, actualCost: 30 },
|
||||
],
|
||||
},
|
||||
|
||||
// ─── Branch recipes ───────────────────────────────────────────────────
|
||||
|
||||
@@ -17,6 +17,10 @@ export const WIZARD_BRANCH_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 3,
|
||||
rarity: 'uncommon',
|
||||
gearTrait: '+15% Mana Regen, +20 Earth Mana Capacity',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'mana_regen_1', stacks: 1, actualCost: 15 },
|
||||
{ effectId: 'earth_cap_10', stacks: 1, actualCost: 30 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'arcanistStaff',
|
||||
@@ -30,6 +34,10 @@ export const WIZARD_BRANCH_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 8,
|
||||
rarity: 'epic',
|
||||
gearTrait: '+30% Enchantment Capacity, +20% Mana Regen',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'mana_cap_100', stacks: 1, actualCost: 35 },
|
||||
{ effectId: 'mana_regen_2', stacks: 1, actualCost: 28 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'battlestaff',
|
||||
@@ -43,6 +51,11 @@ export const WIZARD_BRANCH_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 6,
|
||||
rarity: 'rare',
|
||||
gearTrait: '+10% Enchantment Power, +10% Cast Speed',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'damage_5', stacks: 1, actualCost: 15 },
|
||||
{ effectId: 'mana_cap_50', stacks: 1, actualCost: 20 },
|
||||
{ effectId: 'metal_cap_10', stacks: 1, actualCost: 30 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'arcanistCirclet',
|
||||
@@ -56,6 +69,10 @@ export const WIZARD_BRANCH_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 4,
|
||||
rarity: 'rare',
|
||||
gearTrait: '+20% Enchantment Power, +15 Light Mana Capacity',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'mana_cap_50', stacks: 1, actualCost: 20 },
|
||||
{ effectId: 'light_cap_10', stacks: 1, actualCost: 30 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'arcanistRobe',
|
||||
@@ -69,6 +86,10 @@ export const WIZARD_BRANCH_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 8,
|
||||
rarity: 'epic',
|
||||
gearTrait: '+35% Enchantment Capacity, +10% all Mana Regen',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'mana_cap_100', stacks: 1, actualCost: 35 },
|
||||
{ effectId: 'mana_regen_5', stacks: 1, actualCost: 50 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'voidCatalyst',
|
||||
@@ -82,6 +103,11 @@ export const WIZARD_BRANCH_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 7,
|
||||
rarity: 'epic',
|
||||
gearTrait: '+30% Dark Enchantment Power, +15% Spell Damage',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'mana_cap_100', stacks: 1, actualCost: 35 },
|
||||
{ effectId: 'damage_10', stacks: 1, actualCost: 28 },
|
||||
{ effectId: 'dark_cap_10', stacks: 1, actualCost: 30 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'arcanistPendant',
|
||||
@@ -95,5 +121,9 @@ export const WIZARD_BRANCH_RECIPES: FabricatorRecipe[] = [
|
||||
craftTime: 5,
|
||||
rarity: 'epic',
|
||||
gearTrait: '+15% all enchantment effects, +10% Mana Regen',
|
||||
bonusEnchantments: [
|
||||
{ effectId: 'mana_cap_50', stacks: 1, actualCost: 20 },
|
||||
{ effectId: 'mana_regen_2', stacks: 1, actualCost: 28 },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user