feat: add material crafting recipes to Fabricator
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 4m25s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 4m25s
This commit is contained in:
@@ -24,8 +24,18 @@ export interface FabricatorRecipe {
|
||||
rarity: 'common' | 'uncommon' | 'rare' | 'epic' | 'legendary';
|
||||
/** Flavor text describing the gear's properties */
|
||||
gearTrait: string;
|
||||
/** Recipe type: 'equipment' (default) or 'material' */
|
||||
recipeType?: 'equipment' | 'material';
|
||||
/** For material recipes: the material ID produced */
|
||||
resultMaterial?: string;
|
||||
/** For material recipes: how many are produced */
|
||||
resultAmount?: number;
|
||||
}
|
||||
|
||||
import { MATERIAL_RECIPES } from './material-recipes';
|
||||
|
||||
export { MATERIAL_RECIPES };
|
||||
|
||||
export const FABRICATOR_RECIPES: FabricatorRecipe[] = [
|
||||
// ─── Earth Gear (Compacted Earth — high defense) ──────────────────────
|
||||
{
|
||||
@@ -190,16 +200,36 @@ export const FABRICATOR_RECIPES: FabricatorRecipe[] = [
|
||||
rarity: 'rare',
|
||||
gearTrait: '+20% cast speed, +5% evasion',
|
||||
},
|
||||
|
||||
];
|
||||
|
||||
// ─── Mana Type Labels ────────────────────────────────────────────────────────
|
||||
|
||||
export const MANA_TYPE_LABELS: Record<string, string> = {
|
||||
raw: '⚪ Raw',
|
||||
fire: '🔥 Fire',
|
||||
water: '💧 Water',
|
||||
air: '🌬️ Air',
|
||||
earth: '⛰️ Earth',
|
||||
light: '☀️ Light',
|
||||
dark: '🌑 Dark',
|
||||
metal: '🔩 Metal',
|
||||
crystal: '💎 Crystal',
|
||||
sand: '🏜️ Sand',
|
||||
};
|
||||
|
||||
// ─── Helpers ──────────────────────────────────────────────────────────────────
|
||||
|
||||
export function getRecipesByManaType(manaType: string): FabricatorRecipe[] {
|
||||
return FABRICATOR_RECIPES.filter(r => r.manaType === manaType);
|
||||
return FABRICATOR_RECIPES.filter(r => r.manaType === manaType && r.recipeType !== 'material');
|
||||
}
|
||||
|
||||
export function getMaterialRecipes(): FabricatorRecipe[] {
|
||||
return FABRICATOR_RECIPES.filter(r => r.recipeType === 'material');
|
||||
}
|
||||
|
||||
export function getRecipeById(id: string): FabricatorRecipe | undefined {
|
||||
return FABRICATOR_RECIPES.find(r => r.id === id);
|
||||
return FABRICATOR_RECIPES.find(r => r.id === id) ?? MATERIAL_RECIPES.find(r => r.id === id);
|
||||
}
|
||||
|
||||
export function canCraftRecipe(
|
||||
|
||||
Reference in New Issue
Block a user