From ea75a617e5073ac0e5cf3aa7a1a096935a017478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E7=93=9C=C2=B0?= Date: Fri, 25 Apr 2025 09:24:16 +0800 Subject: [PATCH] dev --- backend/core/basic/character.py | 2 +- .../core/character/GF/swordman_male/weapon_master.py | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/backend/core/basic/character.py b/backend/core/basic/character.py index 2fc6717d..196e8789 100644 --- a/backend/core/basic/character.py +++ b/backend/core/basic/character.py @@ -638,7 +638,7 @@ class Character(CharacterProperty): effects = get_equipment(self.equVersion).funs for detail in [(item.equInfo, item.fusionInfo, item.enchant, item.emblem_0, item.emblem_1) for item in filter(lambda x: x.equInfo is not None, self.charEquipInfo.values())]: equ = detail[0] - if equ is None and equ.detailType == '副武器': + if equ is None and equ.itemType == '副武器': return fusion = detail[1] enchat = detail[2] diff --git a/backend/core/character/GF/swordman_male/weapon_master.py b/backend/core/character/GF/swordman_male/weapon_master.py index fe7b2bd8..14e80c75 100644 --- a/backend/core/character/GF/swordman_male/weapon_master.py +++ b/backend/core/character/GF/swordman_male/weapon_master.py @@ -1113,3 +1113,15 @@ class classChange(Character): self.职业 = '剑魂' super().__init__(equVersion, __name__) + + def AddSkillLv(self, min: int, max: int, lv: int, type=-1) -> None: + """ + 增加技能等级 + type: -1 全部, 0 被动, 1 主动 + """ + for skill in self.skills: + # 四个武器精通不享受技能范围等级加成 + if min <= skill.learnLv <= max and skill.name not in ['太刀精通', '巨剑精通', '短剑精通', '钝器精通']: + skillType = 'all' if type == -1 else ('active' if type == 1 else 'passive') + if (skillType == 'all' or skill.type == skillType) and skill.lv > 0: + skill.lv += lv \ No newline at end of file