diff --git a/modules/playercards/helpers.py b/modules/playercards/helpers.py index a4a1a31b..c4c18c0d 100644 --- a/modules/playercards/helpers.py +++ b/modules/playercards/helpers.py @@ -7,11 +7,8 @@ from modules.playercards.fight_prop import FightProp, FightPropScore _project_path = os.path.dirname(__file__) _fight_prop_rule_file = os.path.join(_project_path, "metadata", "FightPropRule.json") -_fix_skills_level_file = os.path.join(_project_path, "metadata", "avatarName2SkillAdd_mapping.json") with open(_fight_prop_rule_file, "r", encoding="utf-8") as f: fight_prop_rule_data: dict = json.load(f) -with open(_fix_skills_level_file, "r", encoding="utf-8") as f: - fix_skills_level_data: dict = json.load(f) class ArtifactStatsTheory: diff --git a/modules/playercards/metadata/avatarName2SkillAdd_mapping.json b/modules/playercards/metadata/avatarName2SkillAdd_mapping.json deleted file mode 100644 index 5f74e0d8..00000000 --- a/modules/playercards/metadata/avatarName2SkillAdd_mapping.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "旅行者": [ - "E", - "Q" - ], - "胡桃": [ - "E", - "Q" - ], - "托马": [ - "E", - "Q" - ], - "宵宫": [ - "E", - "Q" - ], - "烟绯": [ - "E", - "Q" - ], - "可莉": [ - "E", - "Q" - ], - "迪卢克": [ - "E", - "Q" - ], - "辛焱": [ - "E", - "Q" - ], - "安柏": [ - "Q", - "E" - ], - "香菱": [ - "Q", - "E" - ], - "班尼特": [ - "E", - "Q" - ], - "珊瑚宫心海": [ - "Q", - "E" - ], - "达达利亚": [ - "E", - "Q" - ], - "行秋": [ - "Q", - "E" - ], - "莫娜": [ - "Q", - "E" - ], - "芭芭拉": [ - "Q", - "E" - ], - "申鹤": [ - "E", - "Q" - ], - "神里绫华": [ - "Q", - "E" - ], - "优菈": [ - "Q", - "E" - ], - "甘雨": [ - "Q", - "E" - ], - "凯亚": [ - "E", - "Q" - ], - "重云": [ - "Q", - "E" - ], - "七七": [ - "Q", - "E" - ], - "迪奥娜": [ - "Q", - "E" - ], - "罗莎莉亚": [ - "E", - "Q" - ], - "埃洛伊": [ - null, - null - ], - "八重神子": [ - "E", - "Q" - ], - "雷电将军": [ - "Q", - "E" - ], - "九条裟罗": [ - "Q", - "E" - ], - "刻晴": [ - "Q", - "E" - ], - "雷泽": [ - "Q", - "E" - ], - "菲谢尔": [ - "E", - "Q" - ], - "丽莎": [ - "Q", - "E" - ], - "北斗": [ - "E", - "Q" - ], - "早柚": [ - "Q", - "E" - ], - "枫原万叶": [ - "E", - "Q" - ], - "魈": [ - "E", - "Q" - ], - "温迪": [ - "Q", - "E" - ], - "琴": [ - "Q", - "E" - ], - "砂糖": [ - "E", - "Q" - ], - "荒泷一斗": [ - "E", - "Q" - ], - "五郎": [ - "E", - "Q" - ], - "阿贝多": [ - "E", - "Q" - ], - "钟离": [ - "E", - "Q" - ], - "诺艾尔": [ - "E", - "Q" - ], - "凝光": [ - "Q", - "E" - ], - "云堇": [ - "Q", - "E" - ], - "神里绫人": [ - "E", - "Q" - ], - "夜兰": [ - "Q", - "E" - ], - "久岐忍": [ - "E", - "Q" - ], - "鹿野院平藏": [ - "E", - "Q" - ], - "柯莱": [ - "E", - "Q" - ], - "提纳里": [ - "Q", - "E" - ], - "多莉": [ - "E", - "Q" - ], - "赛诺": [ - "E", - "Q" - ], - "妮露": [ - "E", - "Q" - ] -} \ No newline at end of file diff --git a/plugins/genshin/player_cards.py b/plugins/genshin/player_cards.py index 3af4089d..f8bd14f3 100644 --- a/plugins/genshin/player_cards.py +++ b/plugins/genshin/player_cards.py @@ -30,7 +30,7 @@ from core.template import TemplateService from core.user import UserService from core.user.error import UserNotFoundError from metadata.shortname import roleToName -from modules.playercards.helpers import ArtifactStatsTheory, fix_skills_level_data +from modules.playercards.helpers import ArtifactStatsTheory from utils.bot import get_args from utils.decorators.error import error_callable from utils.decorators.restricts import restricts @@ -258,8 +258,6 @@ class RenderTemplate: if artifact_total_score / 5 >= r[1]: artifact_total_score_label = r[0] - self.fix_skills_level() - data = { "uid": self.uid, "character": self.character, @@ -383,16 +381,3 @@ class RenderTemplate: for e in self.character.equipments if e.type == EquipmentsType.ARTIFACT ] - - def fix_skills_level(self) -> None: - """修复因命座加成导致的技能等级错误""" - data = fix_skills_level_data.get(self.character.name) - if not data: - return - unlocked_constellations = len([i for i in self.character.constellations if i.unlocked]) - for i in range(2): - if unlocked_constellations >= 3 + i * 2: - if data[i] == "E" and len(self.character.skills) >= 2: - self.character.skills[1].level += 3 - elif data[i] == "Q" and len(self.character.skills) >= 3: - self.character.skills[2].level += 3