Augments: Tier aus Icon-Suffix, eine Stufe pro Runde, Evergreen-Pool, Beschreibungen gerendert, Karten-UI

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
team3
2026-07-23 09:03:59 +02:00
parent c450841822
commit f53f1e5c14
8 changed files with 112 additions and 11 deletions

View File

@@ -75,3 +75,18 @@ def test_resolve_spell_adaptive_and_fallback():
utility = {"desc": "Grant a shield.", "variables": [
{"name": "Shield", "value": [0, 300, 400, 500, 0, 0, 0]}]}
assert resolve_spell(utility)["spell_damage"] is None
def test_augment_tier_from_icon():
from tft.staticdata.parse import augment_tier
assert augment_tier("ASSETS/x/GodAugmentEkko_II.TFT_Set17.tex") == 2
assert augment_tier("ASSETS/x/LeonaHero_I.TFT_Set17.tex") == 1
assert augment_tier("ASSETS/x/Big_III.tex") == 3
assert augment_tier("ASSETS/x/NoSuffix.tex") is None
def test_render_desc():
from tft.staticdata.parse import render_desc
desc = "Gain <TFTBonus>@Gold@</TFTBonus> gold and @ADAP*100@% AD.<br>Rest."
assert render_desc(desc, {"Gold": 4, "ADAP": 0.15}) == "Gain 4 gold and 15% AD. Rest."
assert render_desc("@Unknown@ gold", {}) == "? gold"