diff --git a/src/mudlib/combat/moves.py b/src/mudlib/combat/moves.py index 8c2f518..a7d1d91 100644 --- a/src/mudlib/combat/moves.py +++ b/src/mudlib/combat/moves.py @@ -77,6 +77,16 @@ def load_move(path: Path) -> list[CombatMove]: msg = f"missing required field: {field_name}" raise ValueError(msg) + # Move-type-specific timing validation + move_type = data["move_type"] + name = data["name"] + if move_type == "attack" and data.get("hit_time_ms", 0) <= 0: + msg = f"attack move '{name}' requires hit_time_ms > 0" + raise ValueError(msg) + if move_type == "defense" and data.get("active_ms", 0) <= 0: + msg = f"defense move '{name}' requires active_ms > 0" + raise ValueError(msg) + base_name = data["name"] variants = data.get("variants")