14 lines
365 B
Python
Raw Normal View History

2023-10-10 12:01:34 +08:00
class ActionAttr:
condition: str
effect: str
def __init__(self, conditions: str, effect: str) -> None:
self.condition = conditions
self.effect = effect
def __json__(self):
return {"condition": self.condition, "effect": self.effect}
def __text__(self) -> str:
return f"[条件] {self.condition}\n{self.effect}"