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 00000000..2fefd5a0 Binary files /dev/null and b/frontend/src/assets/img/oath/1.png differ diff --git a/frontend/src/assets/img/oath/2.png b/frontend/src/assets/img/oath/2.png new file mode 100644 index 00000000..b22d381e Binary files /dev/null and b/frontend/src/assets/img/oath/2.png differ diff --git a/frontend/src/pages/Character/Forge/components/Oaths.vue b/frontend/src/pages/Character/Forge/components/Oaths.vue index 5aada1ce..a811b0f5 100644 --- a/frontend/src/pages/Character/Forge/components/Oaths.vue +++ b/frontend/src/pages/Character/Forge/components/Oaths.vue @@ -12,7 +12,7 @@ label="全局修改" > -
+
调适
+
+
誓约升级
+ +
@@ -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 = {