20 lines
619 B
Python
Raw Normal View History

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