Dev notes ·

Phase 1, Step 12: skill tree (per-class progression)

Done (compiled cleanly 12:43 except the last test file; waiting on the user to play)
  • Data (Skills/): SkillTreeNode (SO: id, name/description keys, type Active/Passive/ Ultimate, tier 1–3 + 4 = Ultimate, max rank, prerequisites, IsBuilt, skill + power-per-rank for actives, stats-per-rank + condition for passives), SkillTree (SO: nodes, T2 at 5 / T3 at 10 / Ultimate at 15 points in that tree), ClassSkillTrees (SO: 3 trees + starting skills).
  • SkillTreeProgress.cs (pure): 1 point per level (points = level, so 30 at the cap), ranks, tier gate by points in that tree, prerequisites, not-built nodes refuse points, ResetAll (respec).
  • PlayerSkillTree.cs: learning an active node puts its skill on the hotbar (first free slot) and each extra rank adds +10% effect (damage and buff values, via a new Power on SkillContext); passives add stats per rank. Close Order turns on only while an enemy is within 3.5 m (checked 5×/s). Respec refunds everything.
  • SkillCaster: hotbar is now runtime-editable (Learn/Forget, HotbarChanged), with a per-skill power multiplier. The player starts with Strike only.
  • The Hoplite trees as data (Editor/SkillTreeDataBuilder.cs, menu Embers → Skills → Create Hoplite Skill Trees, Data/Skills/Trees/): Phalanx (9), Doru (8), Andreia (6) nodes with tiers/types straight from skill-trees.md §1. Built now: Close Order (+8 Armour/rank near enemies), Shield Bash, Rally, Piercing Thrust, Whetted Edge (+4% Damage/rank), Impale. The other 17 (blocking, Footing, bleed, knockback, being struck, ultimates) show as "Later" and can't take points. Max rank 5, ultimates 1.
  • UI/SkillTreeWindow.cs + UI/SkillTree.uss: N or K opens it. Three columns, tier rows (locked tiers dimmed with "needs 5 points"), node buttons with rank "2 / 5" (shape by type: actives square, passives rounded, ultimate gold double-width), green border = can learn now, gold fill = learned. Tooltip: description, per-rank effect, why it's locked. Footer: points left + "Reset all points (free for now)".
  • HUD: hotbar refreshes when skills are learned/reset; "N skill point(s) to spend: press N" above the XP bar. Bottom-left hint now "I: Inventory N: Skills".
  • Player/DevCheats.cs: F9 = +1 level, compiled into the editor and development builds only, so the tree can be tested without grinding ~140 cube kills for level 6.
  • Localization: 3 tree names + 19 node names (narrative), 23 node descriptions + 21 UI keys (systems). Spartan Line's canon line is in its tooltip verbatim.
  • Tests: SkillTreeProgressTests (10). Expected total ≈ 110.
Decisions (flag to the user)
  • Respec is free for now. The design says Lethe Water (obtainable, not free), but there are no stackable consumables yet; the cost plugs in with them (Act 1 content).
  • Max rank 5 per node and +10% effect per extra rank are my numbers (the design gives tiers and the 15-point ultimate gate, not ranks). With max rank 5 the 15-point gate needs ranks spread over ~3 nodes, which matches the D2 model.
  • Close Order gives only its Armour half (no Footing system yet).
  • Andreia has no built T1 node yet, so it can't take points: honest, since all its T1 effects need the player to be struck (enemy attacks come in Step 14).
  • Synergies (⚙) aren't modelled yet; nodes have a prerequisites field, left empty (the design defines branches by tier, not explicit prerequisites).

All dev notes