update
Some checks failed
Tests / headless (push) Has been cancelled
Tests / fenster-schnell (push) Has been cancelled
Tests / fenster-voll (push) Has been cancelled
Tests / balance (push) Has been cancelled

This commit is contained in:
Team3
2026-09-19 13:37:12 +02:00
parent 89db101137
commit 8944fdd017
21 changed files with 62 additions and 562 deletions

View File

@@ -829,7 +829,7 @@ func test_deck_slots_und_werkstatt() -> void:
check(m.decks[0].cards == ["f_kobold", "f_kobold"] and m.active_deck == 0 and m.dust == 0, "Version 2 wird zu Slot 1")
var v3 := Profile.from_dict(JSON.parse_string(JSON.stringify(p.to_dict())))
check(v3.decks[1].cards == ["f_kobold"] and v3.deck_name(1) == "Deck 2", "Version 3 gelesen")
# Werkstatt
# Zerlegen und Herstellen
p.collection["f_kobold"] = 5
check(p.dismantle("f_kobold") == "" and p.collection["f_kobold"] == 4 and p.dust == 5, "Zerlegen bringt Staub")
check(p.dismantle("f_kobold", 3) != "" and p.collection["f_kobold"] == 4, "Deckbedarf schützt Karten")
@@ -984,8 +984,6 @@ func test_statistik_pity_tagesaufgaben() -> void:
check(p.card_stats["f_kobold"].games == 1 and p.card_stats["f_kobold"].wins == 1 and p.card_stats["e_wall"].games == 1, "Partien und Siege je Deckkarte")
p.record_battle(false, 1, deck, -1, [])
check(p.card_stats["f_kobold"].games == 2 and p.card_stats["f_kobold"].wins == 1, "Niederlage zählt Partie")
var top := p.top_cards(3)
check(top.size() == 3 and top[0].wins == 1, "Bestenliste der Karten")
# Pity-Zähler
p.coins = 100000
var r := RandomNumberGenerator.new()
@@ -1157,11 +1155,7 @@ func test_bestenliste() -> void:
check(p.records.streak == 0 and p.records.best_streak == 2, "Niederlage bricht die Serie")
for i in 5:
p.record_battle(true, 1, mono, -1, [], 10)
var path := "user://test_statistik.csv"
check(p.export_stats(path) == "", "Statistik exportiert")
var text := FileAccess.get_file_as_string(path)
check(text.begins_with("karte;seltenheit;gespielt;partien;siege") and "beste_serie;5" in text, "CSV-Inhalt")
DirAccess.remove_absolute(ProjectSettings.globalize_path(path))
check(p.records.best_streak == 5, "neue beste Serie")
Profile.today_override = ""
@@ -1318,7 +1312,7 @@ func test_ki_zeitbudget() -> void:
check(act.type in ["play", "attack", "end"] and ms < 80, "Zeitbudget greift (%d ms)" % ms)
check(Cards.by_id("wl_gischt").keywords == ["Flink"] and Cards.by_id("wl_gischt").combo() == "Sturm", "Gischtläufer für Sturm")
var v := Profile.from_dict(JSON.parse_string(JSON.stringify(Profile.starter().to_dict())))
check(v.settings.has("big_font") and not v.tutorial2_done and v.records.margins is Array, "Version 5 mit neuen Feldern")
check(v.settings.has("big_font") and v.records.margins is Array, "Version 5 mit neuen Feldern")
## Elementbooster enthalten nur Karten des Elements; Deck-Codes sind umkehrbar und robust.
@@ -1388,7 +1382,7 @@ func test_kampf_speichern() -> void:
check(s2.players.all(func(p): return not (p.hand is Array) and not (p.traps is Array) and not (p.deck is Array)), "Zuschauer-Sicht ohne Hände, Decks und Fallen")
## Jeder tr("...")-Text in der Oberfläche und jeder Anleitungsschritt hat einen englischen Eintrag.
## Jeder tr("...")-Text in der Oberfläche hat einen englischen Eintrag.
func test_uebersetzung_vollstaendig() -> void:
var keys := {}
var csv := FileAccess.get_file_as_string("res://translations/ui.csv")
@@ -1423,8 +1417,4 @@ func test_uebersetzung_vollstaendig() -> void:
for m in rx_cards.search_all(FileAccess.get_file_as_string("res://scripts/cards.gd")):
if not keys.has(m.get_string(1)) and not (m.get_string(1) in missing):
missing.append(m.get_string(1))
for stepset in [BattleTutorial.STEPS1, BattleTutorial.STEPS2]:
for st in stepset:
if not keys.has(st[0]):
missing.append(st[0])
check(missing.is_empty(), "fehlende Übersetzungen: %s" % [missing])