Shop-Leiste im TFT-Stil: Cards mit Splash, Trait-Pills, Shine, Upgrade-Sterne, Lock, Gold/Streak-Pills

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
team3
2026-07-23 05:47:52 +02:00
parent d191af34ca
commit 50c3f2857e
6 changed files with 214 additions and 45 deletions

View File

@@ -59,3 +59,19 @@ def test_state_shape(client):
assert key in state
assert state["player"]["score"] == 0.0
assert all(o["board"] is not None for o in state["opponents"])
def test_upgrade_hint():
from tft.api.app import upgrade_hint
from tft.sim.game import Game
static = make_static()
static["meta"]["patch"] = "t"
game = Game(artifact_mod.build(static), load_constants(17), seed=1)
assert upgrade_hint(game, "U1_0") == 0
game.bench = [{"api_name": "U1_0", "stars": 1, "items": []} for _ in range(2)]
assert upgrade_hint(game, "U1_0") == 2
game.bench = [{"api_name": "U1_0", "stars": 2, "items": []} for _ in range(2)] + \
[{"api_name": "U1_0", "stars": 1, "items": []} for _ in range(2)]
assert upgrade_hint(game, "U1_0") == 3
game.bench = [{"api_name": "U1_0", "stars": 3, "items": []}]
assert upgrade_hint(game, "U1_0") == 0