Ganesha: Guardian of the Portal
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()— reachesMountFoesand subscribes to act changes: a foe appears when the act becomesFIGHTand is cleared on every other act.update(dt)— runs the foe's state machine: close, telegraph, strike, recover, plus whatever itsbehaviouradds.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:
brutecloses and swings;hunterdashes from the flank and retreats;slammerslams the ground and braces;casterthrows fire from range;stormteleports and calls bolts;swarmerhops in fast;destroyerandportal_lorddo all of it and change at their phase marks. - Phases come off the record. The Portal Lord's
phaseslist says when the sky changes and how fast it moves; crossing a mark firesBOSS_PHASE.