add alignment

This commit is contained in:
bridge
2025-10-02 21:24:50 +08:00
parent f4ef5a00de
commit 939b1102eb
10 changed files with 167 additions and 9 deletions

21
src/classes/alignment.py Normal file
View File

@@ -0,0 +1,21 @@
from enum import Enum
class Alignment(Enum):
"""
阵营:正/邪。
值使用英文,便于与代码/保存兼容__str__ 返回中文。
"""
RIGHTEOUS = "righteous" # 正
EVIL = "evil" # 邪
def __str__(self) -> str:
return alignment_strs.get(self, self.value)
alignment_strs = {
Alignment.RIGHTEOUS: "",
Alignment.EVIL: "",
}