From 8e9e6f82454ed7f379aecafe9e70dca006c9a9fb Mon Sep 17 00:00:00 2001 From: Jared Miller Date: Sat, 14 Feb 2026 11:28:53 -0500 Subject: [PATCH] Add unlock conditions to roundhouse and sweep moves Roundhouse requires 5 total kills, sweep requires defeating 3 goblins. Basic moves (punch, dodge, duck, parry, jump) remain available from the start. --- content/combat/roundhouse.toml | 4 ++++ content/combat/sweep.toml | 5 +++++ tests/test_unlock_system.py | 31 +++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/content/combat/roundhouse.toml b/content/combat/roundhouse.toml index b805111..ba88879 100644 --- a/content/combat/roundhouse.toml +++ b/content/combat/roundhouse.toml @@ -9,3 +9,7 @@ resolve_miss = "{defender} counter{s} {attacker}'s roundhouse!" timing_window_ms = 2000 damage_pct = 0.25 countered_by = ["duck", "parry high", "parry low"] + +[unlock] +type = "kill_count" +threshold = 5 diff --git a/content/combat/sweep.toml b/content/combat/sweep.toml index c88f3aa..21968ca 100644 --- a/content/combat/sweep.toml +++ b/content/combat/sweep.toml @@ -9,3 +9,8 @@ resolve_miss = "{defender} jump{s} over {attacker}'s sweep!" timing_window_ms = 1800 damage_pct = 0.18 countered_by = ["jump", "parry low"] + +[unlock] +type = "mob_kills" +mob_name = "goblin" +threshold = 3 diff --git a/tests/test_unlock_system.py b/tests/test_unlock_system.py index 0b67efc..e423b9b 100644 --- a/tests/test_unlock_system.py +++ b/tests/test_unlock_system.py @@ -343,3 +343,34 @@ def test_check_unlocks_deduplicates_variants(): # Should only unlock "punch" once, not twice assert "punch" in player.unlocked_moves assert newly_unlocked == ["punch"] + + +def test_content_combat_moves_unlock_conditions(): + """Combat moves from content/ have expected unlock conditions.""" + from mudlib.combat.moves import load_moves + + content_dir = Path(__file__).parent.parent / "content" / "combat" + moves = load_moves(content_dir) + + # Roundhouse has kill_count unlock (5 total kills) + roundhouse = moves.get("roundhouse") + assert roundhouse is not None + assert roundhouse.unlock_condition is not None + assert roundhouse.unlock_condition.type == "kill_count" + assert roundhouse.unlock_condition.threshold == 5 + + # Sweep has mob_kills unlock (3 goblins) + sweep = moves.get("sweep") + assert sweep is not None + assert sweep.unlock_condition is not None + assert sweep.unlock_condition.type == "mob_kills" + assert sweep.unlock_condition.mob_name == "goblin" + assert sweep.unlock_condition.threshold == 3 + + # Punch (variants) are starter moves with no unlock + punch_left = moves.get("punch left") + punch_right = moves.get("punch right") + assert punch_left is not None + assert punch_left.unlock_condition is None + assert punch_right is not None + assert punch_right.unlock_condition is None