Skip to content

Let's add a hero with abilities and items ​

Build on the campaign tutorial: make a unit a hero, give him two abilities (one from the engine's effects, one with your own effect), add an item and a shop, show his HUD, and test an ability. The result is the campaign starter's third mission.

ChapterWhat it adds
1. The hero typeGrowth per level, experience, skill points, inventory
2. Two abilitiesHoly Light from engine effects; Judgement with defineEffect
3. An item and a shopItems with a bonus or charges, a shop, buying
4. The HUD and a testThe hero's HUD parts, replacing one, testing an ability

Every snippet is from the starter (src/campaign/units.ts, tests/rules.test.ts).