feat: add XP levels and progression points

This commit is contained in:
goose
2026-10-03 19:09:47 -04:00
parent e520708d0a
commit 36f2f62271
22 changed files with 527 additions and 13 deletions
+5
View File
@@ -13,6 +13,9 @@ func test_real_game_cast_opens_spell_targeting_and_resolves_imported_spell_befor
enemy.max_hit_points = 3
game.learn_test_spell(&"spell_epines_empoisonnees")
state.player.focus = 15
state.player.xp = 99
state.player.progression.set_total_xp(99)
enemy.xp_reward = 1
var started_events := game.submit_test_cast()
var overlay := game.get_node("HUD/SpellTargetingOverlay") as SpellTargetingOverlay
@@ -30,6 +33,8 @@ func test_real_game_cast_opens_spell_targeting_and_resolves_imported_spell_befor
assert_false(state.enemies.has(&"goblin")) # Domain outcome is immediate; A3 feedback is asynchronous.
assert_eq(state.player.focus, 10)
assert_eq(state.player.progression.level, 2)
assert_true(game.get_run_state().recent_events(10).any(func(event: GameEvent) -> bool: return event.kind == &"level_up"))
assert_eq(game.get_spell_state().cooldown_for(&"spell_epines_empoisonnees"), 1)
assert_false(overlay.visible)
assert_true(game.get_run_state().recent_events(8).any(func(event: GameEvent) -> bool: return event.kind == &"spell_damage_dealt"))