Fortress v2 for developers. Walls are firewalls, towers are services, dungeons are legacy archives, sieges are load tests.
- JavaScript 100%
| node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 | ||
| src | ||
| tests | ||
| package.json | ||
| README.md | ||
code-fortress-v2
Fortress v2 for developers. Walls are firewalls, towers are services, dungeons are legacy archives, sieges are load tests.
Usage
const { Fortress, WALL_TYPES, TOWER_TYPES, GARRISON_ROLES, SIEGE_ENGINES } = require('./src/fortress');
const fort = new Fortress('Production Keep');
// Build defenses
fort.buildWall(WALL_TYPES.WAF);
fort.buildTower(TOWER_TYPES.MAGE);
// Recruit garrison
fort.recruit('Alice', GARRISON_ROLES.KNIGHT);
fort.recruit('Bob', GARRISON_ROLES.MAGE);
// Siege begins!
fort.deploySiege(SIEGE_ENGINES.TREBUCHET);
// Defend
fort.defend();
fort.siegeAttack();
// Repair
fort.repairAll();
console.log(fort.fortressView());
console.log(fort.report());
Walls
- Firewall (DEF 60, HP 200) — Packet inspection
- WAF Rampart (DEF 80, HP 250) — Sophisticated attack catcher
- Rate Limiter (DEF 40, HP 150) — Slows attackers
- VPN Moat (DEF 90, HP 100) — Only authorized cross
Garrison
- Knight (Senior Dev) — ATK 15, heavy hitter
- Archer (QA) — ATK 12, ranged test volleys
- Mage (SRE) — ATK 20, infrastructure spells
- Scout (Monitoring) — Early warning
- Berserker (Hotfixer) — ATK 25, 3AM heroics
Siege Engines
- Trebuchet (DDoS) — Massive traffic from afar
- Battering Ram (Brute Force) — Direct wall assault
- Siege Tower (Multi-Vector) — Simultaneous scaling
- Sapper (Zero-Day Exploit) — Tunnels under walls