XP-Modell nach VOD-Daten: 1->2 kostet 2 XP, Carousels geben keine XP
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -26,10 +26,9 @@ def validate(c: dict) -> None:
|
||||
if len(c["pool"]["sizes"]) != 5:
|
||||
raise ValueError("pool sizes must have 5 cost tiers")
|
||||
xp = c["xp"]
|
||||
# Level 1 -> 2 ist gratis (erste Welle); to_next deckt 2->3 bis (max-1)->max.
|
||||
if len(xp["to_next"]) != xp["max_level"] - 2:
|
||||
if len(xp["to_next"]) != xp["max_level"] - 1:
|
||||
raise ValueError(
|
||||
f"xp.to_next needs {xp['max_level'] - 2} entries, has {len(xp['to_next'])}"
|
||||
f"xp.to_next needs {xp['max_level'] - 1} entries, has {len(xp['to_next'])}"
|
||||
)
|
||||
if len(c["shop"]["odds"]) != xp["max_level"]:
|
||||
raise ValueError("shop odds must have one row per level")
|
||||
|
||||
@@ -29,10 +29,11 @@ copies_for_2star = 3
|
||||
copies_for_3star = 9
|
||||
|
||||
[xp]
|
||||
# Start auf Level 1. Level 2 kommt GRATIS nach der ersten PvE-Welle (1-2),
|
||||
# XP banken solange. to_next: Index 0 = Level 2 -> 3.
|
||||
# Start auf Level 1. Kampfrunden (PvE/PvP) geben 2 XP, Carousels KEINE.
|
||||
# Verlauf laut VOD: 1-3 Lvl 2, 1-4 Lvl 3, 2-1 Lvl 3 (2/6), 2-5 Lvl 4 (2/10).
|
||||
# to_next: Index 0 = Level 1 -> 2.
|
||||
start_level = 1
|
||||
to_next = [2, 6, 10, 20, 36, 60, 68, 68]
|
||||
to_next = [2, 2, 6, 10, 20, 36, 60, 68, 68]
|
||||
passive_per_round = 2
|
||||
buy_amount = 4
|
||||
buy_cost = 4
|
||||
|
||||
@@ -27,9 +27,7 @@ def xp_to_next(level: int, cfg: dict) -> int | None:
|
||||
xp = cfg["xp"]
|
||||
if level >= xp["max_level"]:
|
||||
return None
|
||||
if level < 2:
|
||||
return None # Level 2 kommt gratis nach der ersten PvE-Welle
|
||||
return xp["to_next"][level - 2]
|
||||
return xp["to_next"][level - 1]
|
||||
|
||||
|
||||
def apply_xp(level: int, xp: int, gained: int, cfg: dict) -> tuple[int, int]:
|
||||
|
||||
@@ -44,11 +44,10 @@ class Game:
|
||||
]
|
||||
|
||||
# 1-1-Carousel läuft automatisch für alle ab, dann startet 1-2.
|
||||
# Die 2 Passiv-XP aus 1-1 banken (Level 2 kommt erst nach 1-2 gratis).
|
||||
# Carousels geben keine XP.
|
||||
if self.round["kind"] == "carousel":
|
||||
for p in self.players:
|
||||
self._carousel(p)
|
||||
p.xp += cfg["xp"]["passive_per_round"]
|
||||
self.idx += 1
|
||||
# Bei 1-2 gibt es noch keinen Shop — niemand hat Gold.
|
||||
for p in self.players:
|
||||
@@ -156,10 +155,6 @@ class Game:
|
||||
p.level, p.xp = economy.apply_xp(
|
||||
p.level, p.xp, self.cfg["xp"]["passive_per_round"], self.cfg
|
||||
)
|
||||
# Nach der ersten PvE-Welle gibt es Level 2 gratis; gebankte XP kaskadieren.
|
||||
if rnd["label"] == "1-2" and p.level == 1:
|
||||
p.level = 2
|
||||
p.level, p.xp = economy.apply_xp(p.level, p.xp, 0, self.cfg)
|
||||
|
||||
self._advance()
|
||||
|
||||
@@ -232,12 +227,9 @@ class Game:
|
||||
self.idx += 1
|
||||
if self.round["kind"] != "carousel":
|
||||
break
|
||||
# Carousel ist keine eigene Einkommensrunde — nur Loot, Unit und XP.
|
||||
# Carousel gibt weder Einkommen noch XP — nur Loot und Unit.
|
||||
for p in self._alive():
|
||||
self._carousel(p)
|
||||
p.level, p.xp = economy.apply_xp(
|
||||
p.level, p.xp, self.cfg["xp"]["passive_per_round"], self.cfg
|
||||
)
|
||||
for p in self._alive():
|
||||
if p is self.player and p.shop_locked:
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user