Game rules
Teams & targeting
Every battle is a team battle. 1v1 is two teams of one; the same engine runs a 3v3 line or a 5v5 skirmish.
A team in code
var player = new TeamSetup(knight, archer); // front to back
player.relics.Add(warBanner); // side-wide item
var enemy = new TeamSetup(goblin, goblin, troll); // duplicates become "Goblin 1", "Goblin 2"
var result = new BattleEngine(player, enemy, statuses, rules, seed).Run();
With assets: database.Team(units, itemsPerUnit, relics) builds a TeamSetup, and database.CreateTeamBattle(player, enemy, rules, seed) makes the engine. The Party Line (3v3), Skirmish (5v5) and Mayhem (4v4) examples are complete examples, and the Battle Arena, Balance Lab, Trigger Debugger and party adventures all play teams.
Who acts when
The ruleset's turnMode:
| Mode | Order | Good for |
|---|---|---|
| Alternating | A1, B1, A2, B2... The side whose front fighter is faster starts. | Single-file lines (Party Line) |
| SideBySide | All of side A, then all of side B. | Wave or phase games |
| Initiative | Every fighter by speed, fastest first, whatever its side. | Skirmish-style queues |
Dead fighters are skipped. Summoned fighters join at the back and act from the next round.
Who gets hit
Plain strikes use strikeTargeting: Front (default), Random or LowestHealth. When the front fighter dies, the next one steps up.
Effects choose with a target:
| Target | Means |
|---|---|
| Self, Opponent | You; the enemy's front fighter. |
| EventSource, EventSubject | Whoever caused the event (the attacker); whoever it happened to. |
| RandomEnemy, LowestHealthEnemy, HighestAttackEnemy, BackEnemy | One living enemy. |
| AllEnemies, AllAllies | Everyone living on that side. |
| RandomAlly, LowestHealthAlly, FrontAlly, AdjacentAllies | Allies; AdjacentAllies is the fighter on each side of you. |
Listening to allies and enemies
An ability's Scope says whose events it hears: Self (default), Opponent, Ally (anyone else on your side) or Any. When an ally dies: gain 5 Attack is trigger When you die with scope Ally. Useful team triggers: When you die, When summoned, When struck and When healed.
Relics
Relics are items that belong to a side. Their abilities belong to the front living fighter, and for a relic yourself means anyone on your side, so a relic with Battle start fires once per fighter.
Good to knowBoard positioning and movement (hex or grid tactics) aren't part of 1.0.