From bbeierle12-skill-mcp-claude
Building decay and upkeep systems for survival games. Use when implementing timer-based decay, Tool Cupboard patterns (Rust-style protection radius), resource upkeep costs, or server performance management through automatic cleanup. Balances gameplay and server health.
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin bbeierle12-skill-mcp-claudeThis skill uses the workspace's default tool permissions.
Timer-based building decay and resource-based upkeep for survival games.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Timer-based building decay and resource-based upkeep for survival games.
import { DecayManager } from './scripts/decay-manager.js';
import { UpkeepSystem } from './scripts/upkeep-system.js';
import { ToolCupboard } from './scripts/tool-cupboard.js';
// Decay without protection
const decay = new DecayManager({
mode: 'rust',
decayMultiplier: 1.0
});
decay.addPiece(piece);
decay.tick(deltaTime); // Called every frame/tick
// Tool Cupboard protection
const tc = new ToolCupboard({
radius: 30,
upkeepCost: { wood: 100, stone: 50 }
});
tc.setPosition(position);
tc.depositResources({ wood: 500, stone: 250 });
// Protected pieces won't decay while upkeep is paid
See references/decay-upkeep-advanced.md for:
scripts/decay-manager.js - Tick-based decay, material rates, damage statesscripts/upkeep-system.js - Resource drain, calculation, UI datascripts/tool-cupboard.js - Protection radius, authorization, resource storagescripts/cleanup-scheduler.js - Server-side cleanup of abandoned structuresDecay serves dual purposes in survival games: gameplay balance (prevents infinite hoarding) and server performance (removes abandoned bases). The Tool Cupboard pattern elegantly ties both together—players must actively maintain bases, and inactive players' structures automatically clean up.