From 8e4e09aeedf676334df6bb0b7be729a4d62f104e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E7=93=9C=C2=B0?= Date: Thu, 15 May 2025 18:41:43 +0800 Subject: [PATCH] dev --- backend/core/basic/character.py | 14 + backend/core/basic/roleinfo.py | 5 +- backend/core/basic/skill.py | 2 +- backend/core/equipment/version_0/stone.py | 4 +- backend/dataFiles/dcalc_0.db | Bin 1007616 -> 1007616 bytes .../Character/Forge/components/Equipments.vue | 287 ++++++++++-------- frontend/src/stores/config.ts | 2 + 7 files changed, 187 insertions(+), 127 deletions(-) diff --git a/backend/core/basic/character.py b/backend/core/basic/character.py index 979e6453..3faa438f 100644 --- a/backend/core/basic/character.py +++ b/backend/core/basic/character.py @@ -491,6 +491,7 @@ class Character(CharacterProperty): info['emblems'] = [i for i in equInfos.emblems] info['avatar'] = equInfos.funs.get_dress_list(skill_clothes) info['jades'] = equInfos.jades + info['options'] = equInfos.funs.options info['sundry'] = equInfos.funs.sundryList for skill in platinum: info['emblems'].append( @@ -686,6 +687,19 @@ class Character(CharacterProperty): # 获取装备额外属性 if fun is not None: fun(self) + # 武器贴膜处理 + weapon = self.charEquipInfo['武器'] + if weapon.equInfo is None or weapon.weaponFusion is None or weapon.weaponFusion == 0: + return + adaptation = min(weapon.adaptation,weapon.equInfo.max_adaptation) + if weapon.weaponFusion == 1: + self.SetStatus(SkillAttack = 0.07 + adaptation * 0.01) + if weapon.weaponFusion == 2: + self.SetStatus(SkillAttack = 0.01 + adaptation * 0.01) + self.SetSkillCD(1, 100, 0.1) + if weapon.weaponFusion == 3: + self.SetStatus(SkillAttack = 0.055 + adaptation * 0.01) + self.SetStatus(SpeedA = 0.2,SpeedM = 0.2,SpeedR = 0.2) def calc_avatar(self, avatar: dict): """计算时装效果""" diff --git a/backend/core/basic/roleinfo.py b/backend/core/basic/roleinfo.py index 4cddbe13..388d7c57 100644 --- a/backend/core/basic/roleinfo.py +++ b/backend/core/basic/roleinfo.py @@ -21,8 +21,8 @@ class CharacterEquipInfo: """贴膜ID""" refine: int | None """锻造等级""" - fusionDetail: dict | None - """贴膜详情""" + weaponFusion: int | None + """武器融合详情""" adaptation: int """调适等级""" equInfo: Union['Equ', None] @@ -35,6 +35,7 @@ class CharacterEquipInfo: def __init__(self, info={}, equVerison=0, part='') -> None: info["fusion"] = info.get("fusion", None) info["precision"] = info.get("precision", 0) + info["weaponFusion"] = info.get("weaponFusion", None) self.__dict__.update(info) equ = get_equipment(equVerison).equ_dict.get(self.id, None) fusion = get_equipment(equVerison).stone_dict.get(self.fusion, None) diff --git a/backend/core/basic/skill.py b/backend/core/basic/skill.py index 8f0d640f..56bd8610 100644 --- a/backend/core/basic/skill.py +++ b/backend/core/basic/skill.py @@ -216,7 +216,7 @@ class ActiveSkill(Skill): self.vp_2() def setReinforce(self): - if self.learnLv in [50, 85, 100] and not self.damage: + if self.learnLv in [50, 85, 100] or not self.damage: return if self.reinforce == 1: if self.learnLv < 35: diff --git a/backend/core/equipment/version_0/stone.py b/backend/core/equipment/version_0/stone.py index 5afa9a19..ba6198df 100644 --- a/backend/core/equipment/version_0/stone.py +++ b/backend/core/equipment/version_0/stone.py @@ -3488,7 +3488,7 @@ def stone_298(char: CharacterProperty): 技能伤害+17% 所有速度+25% """ - char.SetStatus(SkillAttack=0.17,SpeedA=0.25,SpeedM=0.25,SpeedR=0.25) + char.SetStatus(SkillAttack=0.185,SpeedA=0.25,SpeedM=0.25,SpeedR=0.25) pass @@ -3512,7 +3512,7 @@ def stone_300(char: CharacterProperty): 技能伤害+17% 800px范围内的队员所受物理/魔法伤害-15% """ - char.SetStatus(SkillAttack=0.17) + char.SetStatus(SkillAttack=0.185) pass diff --git a/backend/dataFiles/dcalc_0.db b/backend/dataFiles/dcalc_0.db index 8c0a0706f856a95b08bb629bb07c20bf5a3004ce..ca2f284d454bfb33b01d91d75bd6361794f57fa7 100644 GIT binary patch delta 190 zcmZoTVB2uOc7ilx=tLQ3#?Z!u)&$1Z1g6#m=GFw3)&$np1h&=$_SOWB)&$Ph1g_Qu z?$!jJtqHu#&Ks(-@crif!RXI(fkBm9fHQ!75{n4y6{Zjd2xwAk(vf6fFqf2+zRSC3`qfLk!qZ>e l5MO#S2AcaAi(yJOT6`5j5^b=+~HN8 z?sI{652N{X?u)#x+b`bX)na7Sn$Gy1S7LhhMc!jT36o2_3M`HFO`32~u6DV5yxZmO I@jYq;06tVWjsO4v diff --git a/frontend/src/pages/Character/Forge/components/Equipments.vue b/frontend/src/pages/Character/Forge/components/Equipments.vue index 54ca3c0a..b3312fb5 100644 --- a/frontend/src/pages/Character/Forge/components/Equipments.vue +++ b/frontend/src/pages/Character/Forge/components/Equipments.vue @@ -3,6 +3,7 @@ import { computed, defineComponent, ref, renderList } from 'vue' import type { IEnchantingInfo } from '@/api/info/type' import { useInfoStore, useConfigStore } from '@/stores' import EquList from '@/components/dnf/Equipment/List/index.vue' +import { getImageURL } from '@/utils/images' export default defineComponent({ name: 'Equip', setup(props) { @@ -24,7 +25,7 @@ export default defineComponent({ ) /** 是否可以设置秘宝精度 */ const can_set_secret = computed(() => { - return ['辅助装备', '魔法石','耳环'].includes(part.value as string) + return ['辅助装备', '魔法石', '耳环'].includes(part.value as string) }) const basicInfoStore = useInfoStore() @@ -55,7 +56,7 @@ export default defineComponent({ ) }, set(val) { - if (val == undefined) { + if (val == undefined && name !== 'weaponFusion') { return } if (name == 'emblem_1' && !has_emblem_1.value) { @@ -65,7 +66,7 @@ export default defineComponent({ let parts: string[] = [] - if (global_change.value) { + if (global_change.value && name !== 'weaponFusion') { if (name === 'enchant') { const enchant = basicInfoStore?.enchants?.find((item) => item.id == val) as | IEnchantingInfo @@ -84,7 +85,7 @@ export default defineComponent({ ) } } - if (['reinforceType', 'reinforce','adaptation'].includes(name)) { + if (['reinforceType', 'reinforce', 'adaptation'].includes(name)) { parts = basicInfoStore.parts.filter((e) => !['称号', '宠物'].includes(e)) } } else { @@ -92,7 +93,7 @@ export default defineComponent({ } for (const part of parts) { if (configStore.config.equips[part]) { - (configStore.config.equips[part] as Record)[name] = val + ;(configStore.config.equips[part] as Record)[name] = val } } }, @@ -121,7 +122,10 @@ export default defineComponent({ const adaptation = currentInfo('adaptation') //精度 - const precision = currentInfo('precision',0) + const precision = currentInfo('precision', 0) + + // 武器融合 + const weaponFusion = currentInfo('weaponFusion', 0) /** * 同步徽章1到徽章2 * @param val @@ -132,103 +136,139 @@ export default defineComponent({ } } + const setWeaponFusion = (val: number) => { + if (val == weaponFusion.value) { + weaponFusion.value = 0 + } else { + weaponFusion.value = val + } + } + return () => { return ( <> -
-
+
+ +
-
-
-
当前部位
- {part.value} - {can_upgrade.value ? ( - +
+
+
当前部位
+ {part.value} + {can_upgrade.value ? ( + + ) : ( +
+ )} +
+ {part.value == '武器' ? ( +
+
武器融合
+
+ {renderList(3, (i) => ( + setWeaponFusion(i)} + class="w-30px h-30px" + src={`${getImageURL(`/equipment/fusion/${i}.png`)}`} + style={weaponFusion.value == i ? '' : 'filter: grayscale(100%)'} + > + ))} +
+
) : (
)} -
- {part.value == '副武器' ? (<> -
-
强化
- - {renderList(31, (i) => ( - {i - 1} - ))} - -
):(<> - {can_upgrade.value ? ( -
-
增幅
- - 强化 - 增幅 - - - {renderList(31, (i) => ( - {i - 1} - ))} - - {part.value == '武器' && ( - - {renderList(9, (i) => ( - 锻造+ {i - 1} - ))} - - )} -
- ) : ( -
- )} -
-
附魔
- - 无 - {renderList(enchant_list.value ?? [], (item) => ( - {item.detail} - ))} - -
- {has_socket.value ? ( -
-
徽章
- - 无 - {renderList(emblem_list.value ?? [], (item) => ( - {`${item.rarity}${item.categorize}徽章[${item.detail}]`} - ))} - - {has_emblem_1.value && ( - - 无 - {renderList(emblem_list.value ?? [], (item) => ( - {`${item.rarity}${item.categorize}徽章[${item.detail}]`} - ))} - - )} -
- ) : ( -
- )} + {part.value == '副武器' ? ( + <> +
+
强化
+ + {renderList(31, (i) => ( + {i - 1} + ))} + +
+ + ) : ( + <> + {can_upgrade.value ? ( +
+
增幅
+ + 强化 + 增幅 + + + {renderList(31, (i) => ( + {i - 1} + ))} + + {part.value == '武器' && ( + + {renderList(9, (i) => ( + 锻造+ {i - 1} + ))} + + )} +
+ ) : ( +
+ )} - {can_upgrade.value ? ( -
-
调适
- {/* +
附魔
+ + 无 + {renderList(enchant_list.value ?? [], (item) => ( + {item.detail} + ))} + +
+ {has_socket.value ? ( +
+
徽章
+ + 无 + {renderList(emblem_list.value ?? [], (item) => ( + {`${item.rarity}${item.categorize}徽章[${item.detail}]`} + ))} + + {has_emblem_1.value && ( + + 无 + {renderList(emblem_list.value ?? [], (item) => ( + {`${item.rarity}${item.categorize}徽章[${item.detail}]`} + ))} + + )} +
+ ) : ( +
+ )} + + {can_upgrade.value ? ( +
+
调适
+ {/* */} - - {renderList(4, (i) => ( - {i - 1} - ))} - -
- ) : ( -
- )} - { - can_set_secret.value ? (<> -
-
秘宝
- -
- ) :
- } - )} -
+ + {renderList(4, (i) => ( + {i - 1} + ))} + +
+ ) : ( +
+ )} + {can_set_secret.value ? ( + <> +
+
秘宝
+ +
+ + ) : ( +
+ )} + + )} + ) } diff --git a/frontend/src/stores/config.ts b/frontend/src/stores/config.ts index d85fdc68..ab76e00e 100644 --- a/frontend/src/stores/config.ts +++ b/frontend/src/stores/config.ts @@ -28,6 +28,7 @@ export interface IConfigEquip { adaptation: number fusion: string precision: number + weaponFusion: number } export interface IConfig { @@ -70,6 +71,7 @@ const defaultEqusConfig = { adaptation: 0, fusion: '', precision: 0, + weaponFusion: 0, } const defaultAvatarConfig = {