update treasure to weapon and auxiliary

This commit is contained in:
bridge
2025-11-13 01:16:26 +08:00
parent 2ded449ade
commit e760ba107d
13 changed files with 487 additions and 76 deletions

View File

@@ -18,10 +18,11 @@ class DevourMortals(TimedAction):
def _execute(self) -> None:
# 若持有万魂幡累积吞噬魂魄10~100上限10000
tr = getattr(self.avatar, "treasure", None)
if tr is not None and tr.name == "万魂幡":
weapon = self.avatar.weapon
if weapon is not None and weapon.name == "万魂幡":
gain = random.randint(10, 100)
tr.devoured_souls = min(10000, int(tr.devoured_souls) + gain)
current_souls = weapon.special_data.get("devoured_souls", 0)
weapon.special_data["devoured_souls"] = min(10000, int(current_souls) + gain)
def can_start(self) -> tuple[bool, str]:
legal = self.avatar.effects.get("legal_actions", [])