Bash.tv → GitHub → itch.io

Design and build boss fights. Phases triggered by health thresholds, attack patterns chosen from a per-phase pool with no immediate repeats, telegraphs and safe windows, vulnerable moments, arena design, intro and defeat sequences, health bars, difficulty and checkpoints, preventing cheese, and testing the fight. Builds on the enemy AI state machine. Use for "add a boss", "boss phases", "boss a...

Download skill (.zip) Files on GitHub

Boss battles

A boss is a test of what the player learned, as a performance with readable patterns. Build it from enemy-ai’s StateMachine, combat-system’s damage, and projectile-system patterns.

Structure

const PHASES = [
  { until: 0.66, attacks: ["slam", "spray"], speed: 1 },
  { until: 0.33, attacks: ["slam", "spray", "charge"], speed: 1.2, enter: (b) => roar(b) },
  { until: 0, attacks: ["charge", "spiral", "summon"], speed: 1.4, enter: (b) => { roar(b); arena.crumble(); } },
];
const ATTACKS = {
  slam:   { windup: 0.7, active: 0.2, recover: 1.0, run: (b) => shockwave(b) },          // recover = player's damage window
  spray:  { windup: 0.5, active: 1.5, recover: 0.6, run: (b, t) => fireRing(b, 12, t * 2) },
  charge: { windup: 0.6, active: 0.8, recover: 1.2, run: (b) => dashAtPlayer(b) },
};
function phaseFor(b) { const f = b.hp / b.maxHp; return PHASES.findIndex((p) => f > p.until); }
function nextAttack(b) {                                                              // no immediate repeats
  const pool = PHASES[b.phase].attacks.filter((a) => a !== b.lastAttack);
  b.lastAttack = pool[Math.floor(rng.next() * pool.length)]; return b.lastAttack;
}
// states: intro → choose → windup → active → recover → choose … → transition (on phase change) → dying

On a phase change: interrupt the current attack, play a transition (roar, brief invincibility, arena change), and give the player a moment.

Design rules

Test

Play it many times: can a new player read every attack? Is there a safe answer to each? Does any strategy trivialize it (standing in a corner, spamming one move)? Use game-balance-testing for HP and damage numbers and game-playability-audit for fairness.