Mechanisches Boardstärke-Modell: Statsheet aus cdragon-Exaktdaten, sqrt(eHP×DPS), Tier-Anker, Tau-Fit
A/B auf 38 Holdout-Matches: mechanical 0.724 vs legacy 0.695. Promotion durchgeführt. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -112,7 +112,61 @@ def test_stat_mults_identical_units_are_neutral():
|
||||
assert all(m == 1.0 for m in mults.values())
|
||||
|
||||
|
||||
def test_stat_mult_raises_score():
|
||||
def test_stat_mult_raises_score_legacy():
|
||||
from tft.model.score import score_board_legacy as score_board
|
||||
|
||||
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)
|
||||
|
||||
|
||||
def _mech_artifact():
|
||||
from tft.model import artifact as artifact_mod
|
||||
|
||||
static = {
|
||||
"meta": {"set": 17, "patch": "test"},
|
||||
"units": {
|
||||
"TANK": {"cost": 2, "traits": ["T_AD"], "role": "Tank",
|
||||
"stats": {"hp": 900, "armor": 50, "magicResist": 50, "damage": 45,
|
||||
"attackSpeed": 0.6, "mana": 60, "initialMana": 0},
|
||||
"spell_damage": None, "spell_scaling": None},
|
||||
"CARRY": {"cost": 2, "traits": ["T_AD"], "role": "Marksman",
|
||||
"stats": {"hp": 600, "armor": 20, "magicResist": 20, "damage": 70,
|
||||
"attackSpeed": 0.8, "mana": 50, "initialMana": 0},
|
||||
"spell_damage": [0, 250, 375, 560, 0, 0, 0], "spell_scaling": "ad"},
|
||||
},
|
||||
"traits": {"T_AD": {"breakpoints": [
|
||||
{"min_units": 2, "style": 1, "variables": {"BonusAP": 20.0}}]}},
|
||||
"items": {"SWORD": {"effects": {"AD": 0.35}}},
|
||||
"augments": {},
|
||||
}
|
||||
return artifact_mod.build(static)
|
||||
|
||||
|
||||
def test_mechanical_balanced_beats_lopsided():
|
||||
from tft.model.score import score_mechanical
|
||||
art = _mech_artifact()
|
||||
balanced = [{"api_name": "TANK", "stars": 1, "items": []},
|
||||
{"api_name": "CARRY", "stars": 1, "items": []}]
|
||||
tanks = [{"api_name": "TANK", "stars": 1, "items": []} for _ in range(2)]
|
||||
assert score_mechanical(balanced, [], art) > score_mechanical(tanks, [], art)
|
||||
|
||||
|
||||
def test_mechanical_items_and_stars_raise_strength():
|
||||
from tft.model.score import score_mechanical
|
||||
art = _mech_artifact()
|
||||
base = [{"api_name": "CARRY", "stars": 1, "items": []}]
|
||||
starred = [{"api_name": "CARRY", "stars": 2, "items": []}]
|
||||
equipped = [{"api_name": "CARRY", "stars": 1, "items": ["SWORD"]}]
|
||||
assert score_mechanical(starred, [], art) > score_mechanical(base, [], art)
|
||||
assert score_mechanical(equipped, [], art) > score_mechanical(base, [], art)
|
||||
|
||||
|
||||
def test_mechanical_recognized_trait_buffs_stats():
|
||||
from tft.model.score import score_mechanical
|
||||
art = _mech_artifact()
|
||||
pair = [{"api_name": "TANK", "stars": 1, "items": []},
|
||||
{"api_name": "CARRY", "stars": 1, "items": []}]
|
||||
solo_sum = (score_mechanical(pair[:1], [], art)
|
||||
+ score_mechanical(pair[1:], [], art))
|
||||
assert score_mechanical(pair, [], art) > solo_sum
|
||||
|
||||
Reference in New Issue
Block a user