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-10-03 01:17:27 +02:00
parent 24a03ed1ee
commit 5f9442497a
27 changed files with 1040 additions and 871 deletions

View File

@@ -8,7 +8,7 @@ const SAVE_VERSION := 6
const SAVE_PATH := "user://spielstand.json"
const BOOSTER_COST := 100
const BOOSTER_SIZE := 5
const RARITY_WEIGHTS := {"gewöhnlich": 70.0, "selten": 20.0, "episch": 7.5, "legendär": 2.0, "mythisch": 0.5}
const RARITY_WEIGHTS := {"Common": 50.0, "Rare": 25.0, "Super Rare": 15.0, "Ultra Rare": 8.0, "Ultimate Rare": 2.0}
const START_COINS := 150
const REWARD_WIN := 100
const REWARD_LOSS := 50
@@ -19,12 +19,12 @@ const DIFFICULTIES := {
"schwer": {"name": "Schwer", "life": 35, "reward": 1.5, "smart": true},
}
# Sammlung: eine Stufe abgeben bringt Staub, eine Stufe aufwerten kostet Staub.
const DUST_DISMANTLE := {"gewöhnlich": 5, "selten": 20, "episch": 100, "legendär": 400, "mythisch": 1600}
const DUST_UPGRADE := {"selten": 100, "episch": 400, "legendär": 1600, "mythisch": 3200}
const DUST_DISMANTLE := {"Common": 50, "Rare": 100, "Super Rare": 200, "Ultra Rare": 500, "Ultimate Rare": 1000}
const DUST_UPGRADE := {"Rare": 100, "Super Rare": 200, "Ultra Rare": 500, "Ultimate Rare": 1000}
var coins := 0
var dust := 0
var collection := {} # id -> Seltenheitsstufe (Index in Cards.RARITIES), fehlend = gewöhnlich
var collection := {} # id -> Seltenheitsstufe (Index in Cards.RARITIES), fehlend = Common
var campaign_stage := 0 # Anzahl abgeschlossener Kampagnenstufen
var settings := {"volume": 0.8, "music": 0.5, "ai_speed": 1.0, "animations": true, "language": "de", "difficulty": "normal", "big_font": false}
var notices: Array[String] = [] # Meldungen für die Oberfläche (Kampagnenfortschritt)
@@ -116,7 +116,7 @@ func looks() -> Dictionary:
return out
## Anzahl Karten über der gewöhnlichen Stufe.
## Anzahl Karten über Common.
func upgraded_count() -> int:
var n := 0
for cid in collection:
@@ -142,7 +142,7 @@ func upgrade(cid: String) -> String:
func dismantle(cid: String) -> String:
var lvl := level(cid)
if lvl == 0:
return "Gewöhnliche Karten lassen sich nicht zerlegen"
return "Common-Karten lassen sich nicht zerlegen"
dust += DUST_DISMANTLE[Cards.RARITIES[lvl]]
collection[cid] = lvl - 1
return ""
@@ -158,8 +158,8 @@ static func roll_booster(r: RandomNumberGenerator) -> Array:
var out := []
for i in BOOSTER_SIZE:
var rar: String = rarities[r.rand_weighted(weights)]
if i == BOOSTER_SIZE - 1 and out.all(func(x): return x.rarity == "gewöhnlich"):
rar = "selten" # mindestens eine seltene Karte pro Booster
if i == BOOSTER_SIZE - 1 and out.all(func(x): return x.rarity == "Common"):
rar = "Rare" # mindestens eine Rare pro Booster
out.append({"card": pool[r.randi_range(0, pool.size() - 1)], "rarity": rar})
return out