From a7e5470e2d9da02346386e8946fc6af724209521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E7=93=9C=C2=B0?= Date: Mon, 8 Jun 2026 12:09:11 +0800 Subject: [PATCH] =?UTF-8?q?new:=E6=B7=BB=E5=8A=A0=E8=AA=93=E7=BA=A6?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/core/basic/character/calc_equip.py | 9 ++++++ backend/core/basic/roleinfo.py | 5 ++++ frontend/src/assets/img/oath/1.png | Bin 0 -> 2100 bytes frontend/src/assets/img/oath/2.png | Bin 0 -> 2048 bytes .../Character/Forge/components/Oaths.vue | 28 ++++++++++++++++-- .../Character/Result/components/Info.vue | 6 ++-- frontend/src/stores/config.ts | 2 ++ 7 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 frontend/src/assets/img/oath/1.png create mode 100644 frontend/src/assets/img/oath/2.png diff --git a/backend/core/basic/character/calc_equip.py b/backend/core/basic/character/calc_equip.py index 98b2a38c..1a94dc98 100644 --- a/backend/core/basic/character/calc_equip.py +++ b/backend/core/basic/character/calc_equip.py @@ -286,6 +286,15 @@ class CalcEquipMixin(CharacterBase): continue apply_uppercase_attrs(self, oath) fun(self) + # 誓约升级效果 + for upgrade in item.upgrade: + if upgrade == 1: + self.SetStatus(SkillAttack=0.04,Buffer=800) + pass + if upgrade == 2: + self.SetSkillCD(cd=0.08) + self.SetStatus(EquEffectRatio=0.04,Buffer=800) + pass pass def calc_avatar(self, avatar: dict): diff --git a/backend/core/basic/roleinfo.py b/backend/core/basic/roleinfo.py index 27f61b6d..60769a58 100644 --- a/backend/core/basic/roleinfo.py +++ b/backend/core/basic/roleinfo.py @@ -60,12 +60,16 @@ class CharacterOathInfo: """誓约ID""" adaptation: int """调适等级""" + upgrade: list[int] + """誓约升级""" oathInfo: Union['Oath', None] """誓约信息""" def __init__(self, info=None, equVerison=0, position='', equipments=None) -> None: if info is None: info = {} + if info.get('upgrade') is None: + info['upgrade'] = [0, 0, 0, 0] self.__dict__.update(info) self.id = str(self.id) equipments = equipments or get_equipment(equVerison) @@ -73,6 +77,7 @@ class CharacterOathInfo: if oath is not None and position in oath.position: self.oathInfo = oath.adapt(self.adaptation) self.adaptation = min(self.adaptation, self.oathInfo.max_adaptation) + self.upgrade = [int(upgrade) for upgrade in self.upgrade] else: self.oathInfo = None diff --git a/frontend/src/assets/img/oath/1.png b/frontend/src/assets/img/oath/1.png new file mode 100644 index 0000000000000000000000000000000000000000..2fefd5a00c78690fc477f4f0ac3f68081c5c7e78 GIT binary patch literal 2100 zcmV-42+Q}0P)GXLTq7UYhz(_AXa5^b7^mGBDW@OsGMl zsnluPzy0g7D4M2qQ`V$y5}M2@X`q2LrMUrtfC~m}AQ*#h*v8kr-^p=eAX!(bmL8qs zbH49;-pliT-+MTG^^X&-BH=!B%{)&FNM&6!&%bifC%t13XF-y6pG}+;kjT1EW*PN= z6N>~eA}K*ZP!se79U+Gx6BdmVRtW)uj}Rh6gy+nV6dpz4iNx7nN(BN&R!ArzloHH> z5fWi6BM1|g2(yG~f}5}+7!-e;_Zx|`z0?YXHH0k&rP9_>Q(M-7l{nh_#wiWV1R#v_nU}Cf~RtVfnX)nE2Yxr!;R0h?W?ur z(>*ut@nFoeh{a%#pJY+1@w6om)n+pyu^2uaz3chg7lS>Kczl3f-y}>4-meLsr?QDN z;gt!Yts*oR>2&RH?%DNStHB^UKY95`emkvmjo=W-W0|mLmkJ}*5XuQVDon=jAA4c<&Qv-rddq$V4zHIV zn6K8LM5n{gcI@D-Jv}sxJ(W*mWi^U7dd{KJWWsMc+92XYsW-aqy_4SM4`^7w;CWCW zPi4f!@~RMW`ix2@J@BW_@BKi+iKM?i-vfU%%B!NKycDmsHsSopINGZ#kVMUn8lS)+RS_noaTo*Hy;Jq{;0BHh2W0-g0$ zICEnHmHJ%d8he!3w1ogrX8=gA4y{xG8Z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1sp0*N4_-)PPZs_-J1XRl1J=CycbU)K7*|r1Qf3m=PgEFCaC$nb-&1L$hGM5Rss~-Zra2$4(3u?r@8#UsEdt=HyUqK z?C31>)P>_5iZHk|EKXb(eoz_^a^nZKf^%3k@t`Lgh~8%`q@5VHrhbq eM*i=Qw*LaQvv-i28Q;4A0000 -
+
调适
+
+
誓约升级
+ +
@@ -36,7 +50,7 @@ const configStore = useConfigStore() const infoStore = useInfoStore() const currentInfo = function (name: string, defaultValue?: T) { - return computed({ + return computed({ get() { return ( // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -74,4 +88,14 @@ const currentInfo = function (name: string, defaultValue?: T) { // 调适 const adaptation = currentInfo('adaptation') +// 誓约升级 +const oath_upgrade = currentInfo('upgrade', [0, 0, 0, 0]) + +const getOathUpgradeValue = (index: number) => oath_upgrade.value[index] ?? 0 + +const setOathUpgradeValue = (index: number, val: number) => { + const nextUpgrade = [...oath_upgrade.value] + nextUpgrade[index] = val + oath_upgrade.value = nextUpgrade +} diff --git a/frontend/src/pages/Character/Result/components/Info.vue b/frontend/src/pages/Character/Result/components/Info.vue index e82485a7..17f27d9e 100644 --- a/frontend/src/pages/Character/Result/components/Info.vue +++ b/frontend/src/pages/Character/Result/components/Info.vue @@ -203,9 +203,9 @@ const oathSuit = computed(() => { return props.suits.oath }) -const correction = computed(() => { - return props.suits.correction ?? 0 -}) +// const correction = computed(() => { +// return props.suits.correction ?? 0 +// }) const changeSkillId = (skill: { skillId: string; enable: boolean }) => { // console.log(skill) diff --git a/frontend/src/stores/config.ts b/frontend/src/stores/config.ts index 32ad6249..ca09cf5f 100644 --- a/frontend/src/stores/config.ts +++ b/frontend/src/stores/config.ts @@ -34,6 +34,7 @@ export interface IConfigEquip { export interface IConfigOath { id: string adaptation: number + upgrade: number[] } export interface IConfigEmblem { @@ -100,6 +101,7 @@ const defaultAvatarConfig = { const defaultOathConfig = { id: '', adaptation: 0, + upgrade: [0, 0, 0, 0], } const defaultEmblemConfig = {