- config: cta_available=0 (user has no CTA weapon; was causing 5 failed weapon-swap attempts per run) - pather: traverse_nodes_fixed now allows can_teleport_with_charges chars through instead of raising ValueError; when charges deplete mid-path char.move() falls back to walking gracefully - utils: add skill_preflight.py (visual hotkey verification, all blizz_sorc skills use side=right) and skill_hotkey_setter.py (automated picker binding with step-by-step logging) - test: add test_skill_preflight.py (3 passing tests) - assets: add sorc skill icon templates for preflight matching - tools: add capture_sorc_skill_icons.py and set_sorc_skill_hotkeys.py - key_detector: extend VK map with numpad/F-key/symbol codes; add validate_key_bindings() and parse_key_file(); fix char_name lookup Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
49 lines
1.4 KiB
Python
49 lines
1.4 KiB
Python
import os
|
|
import sys
|
|
|
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "src"))
|
|
|
|
from utils.skill_preflight import get_build_skill_checks
|
|
|
|
|
|
class DummyConfig:
|
|
char = {"type": "blizz_sorc"}
|
|
blizz_sorc = {
|
|
"blizzard": "f1",
|
|
"ice_blast": "",
|
|
"energy_shield": "f3",
|
|
"frozen_armor": "f4",
|
|
"static_field": "f5",
|
|
"telekinesis": "f6",
|
|
"thunder_storm": "",
|
|
}
|
|
|
|
|
|
def test_blizz_sorc_skill_checks():
|
|
checks = get_build_skill_checks(DummyConfig())
|
|
by_skill = {check.skill: check for check in checks}
|
|
|
|
assert by_skill["blizzard"].required is True
|
|
assert by_skill["blizzard"].side == "right"
|
|
assert by_skill["blizzard"].hotkey == "f1"
|
|
|
|
assert "ice_blast" not in by_skill
|
|
assert by_skill["energy_shield"].required is False
|
|
assert by_skill["frozen_armor"].side == "right"
|
|
assert by_skill["static_field"].hotkey == "f5"
|
|
assert by_skill["telekinesis"].hotkey == "f6"
|
|
|
|
|
|
def test_blizz_sorc_optional_attack_is_right_skill():
|
|
config = DummyConfig()
|
|
config.blizz_sorc = dict(DummyConfig.blizz_sorc)
|
|
config.blizz_sorc["ice_blast"] = "f2"
|
|
|
|
by_skill = {check.skill: check for check in get_build_skill_checks(config)}
|
|
|
|
assert by_skill["ice_blast"].side == "right"
|
|
|
|
|
|
def test_unknown_build_has_no_checks():
|
|
assert get_build_skill_checks(DummyConfig(), "hammerdin") == []
|