refactor battle strength system
This commit is contained in:
@@ -115,7 +115,7 @@ def get_avatar_structured_info(avatar: "Avatar") -> dict:
|
||||
"gender": str(avatar.gender),
|
||||
"age": avatar.age.age,
|
||||
"lifespan": avatar.age.max_lifespan,
|
||||
"realm": avatar.cultivation_progress.realm.value,
|
||||
"realm": avatar.cultivation_progress.get_info(),
|
||||
"level": avatar.cultivation_progress.level,
|
||||
"hp": {"cur": avatar.hp.cur, "max": avatar.hp.max},
|
||||
"alignment": str(avatar.alignment) if avatar.alignment else "未知",
|
||||
@@ -191,7 +191,7 @@ def get_avatar_structured_info(avatar: "Avatar") -> dict:
|
||||
"target_id": other.id,
|
||||
"name": other.name,
|
||||
"relation": get_relation_label(relation, avatar, other),
|
||||
"realm": other.cultivation_progress.realm.value,
|
||||
"realm": other.cultivation_progress.get_info(),
|
||||
"sect": other.sect.name if other.sect else "散修"
|
||||
})
|
||||
info["relations"] = relations_list
|
||||
|
||||
@@ -116,7 +116,7 @@ class Sect:
|
||||
"pic_id": resolve_avatar_pic_id(a),
|
||||
"gender": a.gender.value if hasattr(a.gender, "value") else "male",
|
||||
"rank": a.get_sect_rank_name(),
|
||||
"realm": a.cultivation_progress.realm.value if hasattr(a, 'cultivation_progress') else "未知",
|
||||
"realm": a.cultivation_progress.get_info() if hasattr(a, 'cultivation_progress') else "未知",
|
||||
"_sort_val": sort_val
|
||||
})
|
||||
# 按职位排序
|
||||
|
||||
Reference in New Issue
Block a user