feat: add configurable battle loss cooldown in Web 2.0.13
Web image / image (push) Waiting to run

This commit is contained in:
AttilaNet
2026-11-17 00:17:52 +08:00
parent 598bdf5c1c
commit b976151263
23 changed files with 297 additions and 43 deletions
+2
View File
@@ -40,6 +40,8 @@ def checked_progression_policy(data):
if not isinstance(data, dict):
raise ValueError("主线策略必须是对象")
raw = asdict(ProgressionPolicy()) | data
if type(raw["loss_retry_hours"]) is not int or not 1 <= raw["loss_retry_hours"] <= 168:
raise ValueError("战败冷却时间须为1至168小时")
for key in ("reserve_ti", "max_money"):
if type(raw[key]) is not int or not 0 <= raw[key] <= 1_000_000_000:
raise ValueError("主线策略数量超出范围:" + key)