Fourteen Factions, One Ability Engine

Fourteen factions is a lot for a small team, and for a while part of it was a sketch. Every building, troop, upgrade chain and legendary was in place, with its costs, HP and spawn timers, but our engine only knew 17 kinds of effect, so any exotic ability got squeezed into the nearest one. A legendary hydra that should split into smaller hydras simply came back to life once. Curses meant for a single target became weaker auras.
The fourteen
- Crown: knights, marksmen and mages, with blessings and holy resurrection.
- Bone Legion: zombies, necromancers raising skeletons, vampires that turn their victims.
- Steppe Horde: brutal infantry, shamans who empower the troops, war beasts and totems.
- Sun Court: nimble archers, critical-striking swordsmen and solar magic.
- Moon Sentinels: multi-target arrows, binding roots, assassins and specters.
- Ancient Grove: poisons, healing, stunning bears and stone giants.
- Northern Clans: swift wolves, frost spearmaidens, freezing trolls and the endless winter.
- League of Gears: tanks, flamethrowers, automatons and energy shields.
- Abyssal Tide: regenerating scaleborn, bouncing serpents and a hydra that splits.
- The Corrupted: cursed trees, armor-eating void creatures and infernal engines.
- Abyssal Pact: demons, volcanoes and spells that wipe out whole armies.
- Kingdom of Sands: quillbacks, vultures, brutes, sand mages and storms.
- Elemental Conclave: spirits of wind, water, fire, lightning and earth.
- Jade Empire: healing monks, hard-to-hurt drunken brawlers and celestial chi.
They fight on six arenas: River Valley, Autumn Crossroads, Frozen Lake, Dune Canyon, Murky Swamp and Citadel Ring. Field, castles and territories are the same size everywhere. What changes is the no-man's-land in the middle (woods, rock or water, always symmetric), the biome and, in the Citadel Ring, walled bases and a road nobody can build on. In our tests of the first five arenas, none favored a side.
Abilities as data
The fix was a new engine in which every ability is data: a trigger (on attack, when struck, on a kill, on death, whenever mana and cooldown allow, or when you press a button), its targets (the nearest enemy, the most wounded ally, the biggest group, a point in the enemy base, a line, a cone) and its effects. That let every faction get its complete ability kit: spells with mana and cooldowns, lasting curses, frozen and disabled buildings, sheep, banishment, invisibility, summons, mind control, instant death, corpses and resurrection, mines and storms on the ground.
The Bone Legion was rebuilt from the ground up: zombies in three tiers, Vampires that grow into Vampire Lords, the Wailer, the Flesh Golem, the Death Pit and the City of Decay. Two buildings even have abilities you fire yourself, the Northern Clans' Winter's Wrath and a burst from The Corrupted's Well of Torment. Everything stays deterministic, so both computers in an online match calculate exactly the same battle. Where we had no hard number, such as the stats of summoned creatures, we estimated and flagged it for review.
Teaching the AI
The first AI-versus-AI round after the update was humbling: win rates ran from 10% for the Abyssal Tide to 86% for the Jade Empire. We tested the causes one at a time. Jade without its monks' Healing Spray fell from 87% to 40%; the Horde without its shamans' blessings, from 71% to 35%. The AI was part of the problem too. It poured gold into the Abyssal Tide's weakest line, and as the League of Gears it built several Power Plants whose auras don't stack, plus far more Hangars than any anti-air need called for.
So the AI learned three things: one Power Plant is enough, anti-air should match how many flyers the enemy really has, and each troop building gets a weight from win-rate data compared with the rest of its faction. Whatever imbalance remained, we evened out by making each faction's AI train a little faster or slower. That adjustment applies only to AI teams: you always play with the faction's actual numbers, the ones in the tooltips, against the AI and online.
The final round put every faction between 43% and 56%, a spread smaller than the round's own noise. The honest caveat: that balances the AI, not players. How the Jade Empire fares against the Abyssal Tide between two humans is something no simulation has measured yet. Browse them all on the factions page.
— The Castle Arena team
