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.
This commit is contained in:
Jared Miller 2026-02-14 11:28:53 -05:00
parent a2efd16390
commit 8e9e6f8245
Signed by: shmup
GPG key ID: 22B5C6D66A38B06C
3 changed files with 40 additions and 0 deletions

View file

@ -9,3 +9,7 @@ resolve_miss = "{defender} counter{s} {attacker}'s roundhouse!"
timing_window_ms = 2000 timing_window_ms = 2000
damage_pct = 0.25 damage_pct = 0.25
countered_by = ["duck", "parry high", "parry low"] countered_by = ["duck", "parry high", "parry low"]
[unlock]
type = "kill_count"
threshold = 5

View file

@ -9,3 +9,8 @@ resolve_miss = "{defender} jump{s} over {attacker}'s sweep!"
timing_window_ms = 1800 timing_window_ms = 1800
damage_pct = 0.18 damage_pct = 0.18
countered_by = ["jump", "parry low"] countered_by = ["jump", "parry low"]
[unlock]
type = "mob_kills"
mob_name = "goblin"
threshold = 3

View file

@ -343,3 +343,34 @@ def test_check_unlocks_deduplicates_variants():
# Should only unlock "punch" once, not twice # Should only unlock "punch" once, not twice
assert "punch" in player.unlocked_moves assert "punch" in player.unlocked_moves
assert newly_unlocked == ["punch"] 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