from typing import Dict
from typing import List


def get_retrohunt_rules(r: Dict) -> List[str]:
    """Extracts rules used within a retrohunt."""
    rules = []
    for line in r.get("attributes", {}).get("rules", "").splitlines():
        line = line.strip()
        if "rule" in line[:4]:
            line = line.split("{")[0]
            line = line.split(":")[0]
            line = line[4:].strip()
            rules.append(line)
    return rules