From 12603267bc7f08b2a3d4cc95466f59436099cdd8 Mon Sep 17 00:00:00 2001 From: team3 Date: Thu, 23 Jul 2026 09:34:46 +0200 Subject: [PATCH] Komponenten-Pool auf die 8 Basis-Komponenten gefiltert Co-Authored-By: Claude Fable 5 --- backend/tft/model/artifact.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/backend/tft/model/artifact.py b/backend/tft/model/artifact.py index 3a4aac8..c3b03af 100644 --- a/backend/tft/model/artifact.py +++ b/backend/tft/model/artifact.py @@ -35,12 +35,16 @@ def recipes(static_items: dict) -> dict: def component_pool(static_items: dict) -> list[str]: - """Die Basis-Komponenten — das, was Loot tatsächlich droppt.""" - return sorted({ - comp - for api in craftable_items(static_items) - for comp in static_items[api]["composition"] - }) + """Die Basis-Komponenten — das, was Loot tatsächlich droppt. + + Echte Komponenten stecken in vielen Rezepten; Sondervarianten + (z.B. CursedBlade) nur in einzelnen. + """ + counts: dict[str, int] = {} + for api in craftable_items(static_items): + for comp in static_items[api]["composition"]: + counts[comp] = counts.get(comp, 0) + 1 + return sorted(c for c, n in counts.items() if n >= 3) def tier_profiles(static: dict, roles: dict) -> dict: