Log inGet started
World

Ganesha: Guardian of the Portal

Branchmain
Branchesmain
Commit1ae1a54e78

README.md

Foes — the eight Rakshasas

One instance, on the scene's MountFoes. One foe is live at a time: the arena picks which. Every Rakshasa is built from its G.FOES entry, so silhouette, scale, colour, speed, damage and behaviour are data rather than code.

Public fields

None. The live foe is published on G.foes and summarised in G.state.foe.

Methods

  • :summon() — force the current arena's foe to appear.
  • :healthShare() — the live foe's health as a 0-1 share, or nil.

Lifecycle

  • start() — reaches MountFoes and subscribes to act changes: a foe appears when the act becomes FIGHT and is cleared on every other act.
  • update(dt) — runs the foe's state machine: close, telegraph, strike, recover, plus whatever its behaviour adds.
  • onDestroy() — unsubscribes and clears the foe.

Notes

  • Every attack is telegraphed. A ring grows on the ground for the whole wind-up before anything lands, which is what makes a fight readable rather than a coin toss, and it is the rule the whole roster holds to.
  • hurt(amount, from) is the only way in. The hero slice calls it through the published record, and it answers how much actually landed — the Stone Brute's stance soaks part of a blow, and a heavy enough hit interrupts a wind-up.
  • Behaviours: brute closes and swings; hunter dashes from the flank and retreats; slammer slams the ground and braces; caster throws fire from range; storm teleports and calls bolts; swarmer hops in fast; destroyer and portal_lord do all of it and change at their phase marks.
  • Phases come off the record. The Portal Lord's phases list says when the sky changes and how fast it moves; crossing a mark fires BOSS_PHASE.