Unit-Stärken präzisiert: Stat-Proxy-Multiplikatoren + gelernte Unit-Gewichte
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -86,3 +86,33 @@ def test_craftable_item_pool():
|
||||
"TFT_Item_Radiant": {"composition": None},
|
||||
}
|
||||
assert craftable_items(items) == ["TFT_Item_InfinityEdge"]
|
||||
|
||||
|
||||
def test_stat_mults_rank_within_cost():
|
||||
from tft.model.baseline import compute_stat_mults
|
||||
|
||||
def unit(hp, armor, ad, aspd):
|
||||
return {"cost": 2, "traits": [], "role": "Tank",
|
||||
"stats": {"hp": hp, "armor": armor, "magicResist": armor,
|
||||
"damage": ad, "attackSpeed": aspd, "mana": 60,
|
||||
"initialMana": 0, "range": 1}}
|
||||
|
||||
units = {"tanky": unit(900, 60, 45, 0.6), "avg": unit(700, 40, 55, 0.7),
|
||||
"weak": unit(550, 25, 45, 0.6)}
|
||||
mults = compute_stat_mults(units)
|
||||
assert mults["tanky"] > mults["avg"] > mults["weak"]
|
||||
assert all(0.9 <= m <= 1.1 for m in mults.values())
|
||||
|
||||
|
||||
def test_stat_mults_identical_units_are_neutral():
|
||||
from tft.model.baseline import compute_stat_mults
|
||||
from tests.test_sim import make_static
|
||||
|
||||
mults = compute_stat_mults(make_static()["units"])
|
||||
assert all(m == 1.0 for m in mults.values())
|
||||
|
||||
|
||||
def test_stat_mult_raises_score():
|
||||
art = {**ARTIFACT, "stat_mults": {"TFT17_B": 1.1}}
|
||||
board = [{"api_name": "TFT17_B", "stars": 1, "items": []}]
|
||||
assert score_board(board, [], art) > score_board(board, [], ARTIFACT)
|
||||
|
||||
Reference in New Issue
Block a user