feat: add commander_bonus weight to score_card()

Commanders get +5.0 priority in AI spell selection, making the
AI prioritize casting its commander when affordable.
This commit is contained in:
KoalaTrapLord committed 2026-03-17 03:38:14 +00:00
1 parent 4bade21220
commit 1121e1cb26
1 file changed
+6
+6
View File
@@ -68,6 +68,8 @@ AI_DEFAULT_WEIGHTS: dict[str, float] = {
"spell_enchantment": 3.0,
"spell_flash": 2.0,
"spell_cascade": 3.0,
# Commander bonus
"commander_bonus": 5.0,
}
@@ -320,6 +322,10 @@ def score_card(
if "search your library" in text:
score += w.get("spell_search", 2.0)
# ── Commander bonus ──
if card.is_commander:
score += w.get("commander_bonus", 5.0)
return score