This commit is contained in:
bridge
2025-10-19 02:00:25 +08:00
parent 840046080c
commit 08c32c38c2
3 changed files with 6 additions and 14 deletions

View File

@@ -2,28 +2,21 @@ from __future__ import annotations
from src.classes.action import TimedAction
from src.classes.event import Event
from src.classes.region import CityRegion
from src.classes.event import Event
import random
class DevourMortals(TimedAction):
"""
吞噬凡人:在城市区域执行,需持有万魂幡,吞噬魂魄可增加战力。
与普通修炼相比,经验获取显著更高。
吞噬凡人:需持有万魂幡,吞噬魂魄可大大增加战力。
"""
COMMENT = "在城镇吞噬凡人,获得大量修行经验(邪功法)"
DOABLES_REQUIREMENTS = "仅限城市区域;持有万魂幡"
COMMENT = "吞噬凡人,大大增加战力"
DOABLES_REQUIREMENTS = "持有万魂幡"
PARAMS = {}
duration_months = 2
EXP_GAIN = 2000
def _execute(self) -> None:
region = self.avatar.tile.region
if not isinstance(region, CityRegion):
return
# 若持有万魂幡累积吞噬魂魄10~100上限10000
tr = getattr(self.avatar, "treasure", None)
if tr is not None and tr.name == "万魂幡":
@@ -32,8 +25,6 @@ class DevourMortals(TimedAction):
def can_start(self) -> bool:
region = self.avatar.tile.region
if not isinstance(region, CityRegion):
return False
# 需持有万魂幡且行为被允许
tr = getattr(self.avatar, "treasure", None)
if tr is None or tr.name != "万魂幡":