From c111ed411550627017e51040df3042458b1757a0 Mon Sep 17 00:00:00 2001 From: mengyxu Date: Sun, 11 May 2025 00:09:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=83=A8=E5=88=86=E8=A3=85?= =?UTF-8?q?=E5=A4=87=E5=B1=9E=E6=80=A7=EF=BC=8C=E8=B0=83=E6=95=B4=E5=BC=BA?= =?UTF-8?q?=E5=8C=96=E8=B4=B9=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/equips/bracers.ts | 8 ++++---- src/config/equips/constant.ts | 7 ++++--- src/config/equips/jewelry.ts | 6 +++--- src/config/equips/neck.ts | 2 +- src/config/equips/ring.ts | 2 +- src/tool/caller/equip.ts | 10 +++++----- src/views/backpack/inherited.vue | 4 ++-- src/views/backpack/strengthen.vue | 4 ++-- 8 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/config/equips/bracers.ts b/src/config/equips/bracers.ts index e08da0d..36c634c 100644 --- a/src/config/equips/bracers.ts +++ b/src/config/equips/bracers.ts @@ -89,7 +89,7 @@ export const bracersUniqueCategorys = [ icon: 'bracers/人参果裹布.png', entry: [ { type: 'critDmg', valCoefficient: 1.2 }, - { type: 'dmgPercent', valCoefficient: 1.0 }, + { type: 'atkPercent', valCoefficient: 1.0 }, { type: 'atk', valCoefficient: 0.7 }, ], }, @@ -105,7 +105,7 @@ export const bracersUniqueCategorys = [ name: 'meipusa', icon: 'bracers/美菩萨.png', entry: [ - { type: 'dmgPercent', valCoefficient: 1.2 }, + { type: 'atkPercent', valCoefficient: 1.2 }, { type: 'def', valCoefficient: 0.9 }, { type: 'hp', valCoefficient: 1.2 }, ], @@ -153,8 +153,8 @@ export const bracersCategorys = [ export const initialbracers = () => { const type = 'bracers'; const qualityBean = new Quality(qualitys[0], coefficient[qualitys[0]]); - const base = new EquipBase('shiwangsy', 'bracers/新手.png', [new Entry('hp', 20, '+20', 20, 20)]); - const extraEntry = [new Entry('crit', 10, '+10%', 10, 10)]; + const base = new EquipBase('shiwangsy', 'bracers/新手.png', [new Entry('atk', 1, '+1', 1, 1)]); + const extraEntry = [new Entry('hp', 20, '+20', 20, 20)]; return new Equip(type, 1, qualityBean, base, extraEntry); }; diff --git a/src/config/equips/constant.ts b/src/config/equips/constant.ts index e0c372a..c3104d6 100644 --- a/src/config/equips/constant.ts +++ b/src/config/equips/constant.ts @@ -40,6 +40,7 @@ export const attr_unitys = { }; export const strengthen_rates = [1, 1, 1, 1, 1, 1, 0.8, 0.65, 0.45, 0.3, 0.2]; +export const strengthen_factor = { shabby: 1, ordinary: 1, artifact: 1, epic: 1, unique: 1.5, colorful: 2 }; export const entry_initor = { atk: (lv: number, qualityCoefficient: number, valCoefficient?: number) => { @@ -119,9 +120,9 @@ export const entry_initor = { return new Entry('dmgPercent', value, '+' + value + '%', max, min); }, dmgReduc: (lv: number, qualityCoefficient: number) => { - const value = Math.round((Math.random() * lv * 0.05 + 5) * qualityCoefficient) || 1; - const max = Math.round((lv * 0.05 + 5) * qualityCoefficient) || 1; - const min = Math.round(5 * qualityCoefficient) || 1; + const value = Math.round((Math.random() * lv * 0.05 + 6) * qualityCoefficient) || 1; + const max = Math.round((lv * 0.05 + 6) * qualityCoefficient) || 1; + const min = Math.round(6 * qualityCoefficient) || 1; return new Entry('dmgReduc', value, '+' + value + '%', max, min); }, critAvoid: (lv: number, qualityCoefficient: number) => { diff --git a/src/config/equips/jewelry.ts b/src/config/equips/jewelry.ts index b1ff6bd..bb3045b 100644 --- a/src/config/equips/jewelry.ts +++ b/src/config/equips/jewelry.ts @@ -89,7 +89,7 @@ export const jewelryUniqueCategorys = [ icon: 'jewelry/良人.png', entry: [ { type: 'critDmg', valCoefficient: 1.2 }, - { type: 'dmgPercent', valCoefficient: 0.5 }, + { type: 'dmgPercent', valCoefficient: 0.4 }, { type: 'atk', valCoefficient: 0.7 }, ], }, @@ -105,7 +105,7 @@ export const jewelryUniqueCategorys = [ name: 'cltx', icon: 'jewelry/赤羚天禧.png', entry: [ - { type: 'dmgPercent', valCoefficient: 0.6 }, + { type: 'dmgPercent', valCoefficient: 0.5 }, { type: 'def', valCoefficient: 0.9 }, { type: 'hp', valCoefficient: 1.2 }, ], @@ -153,7 +153,7 @@ export const jewelryCategorys = [ export const initialJewelry = () => { const type = 'jewelry'; const qualityBean = new Quality(qualitys[0], coefficient[qualitys[0]]); - const base = new EquipBase('shiwangsy', 'jewelry/狮王手印.png', [new Entry('hp', 20, '+20', 20, 20)]); + const base = new EquipBase('shiwangsy', 'jewelry/狮王手印.png', [new Entry('atk', 1, '+1', 1, 1)]); const extraEntry = [new Entry('crit', 10, '+10%', 10, 10)]; return new Equip(type, 1, qualityBean, base, extraEntry); }; diff --git a/src/config/equips/neck.ts b/src/config/equips/neck.ts index d509ecd..0025c94 100644 --- a/src/config/equips/neck.ts +++ b/src/config/equips/neck.ts @@ -86,7 +86,7 @@ export const neckCategorys = [ export const initialNeck = () => { const type = 'neck'; const qualityBean = new Quality(qualitys[0], coefficient[qualitys[0]]); - const base = new EquipBase('initial', 'Ac_3.png', [new Entry('hp', 20, '+20', 20, 20)]); + const base = new EquipBase('initial', 'Ac_3.png', [new Entry('atk', 1, '+1', 1, 1)]); const extraEntry = [new Entry('crit', 10, '+10%', 10, 10)]; return new Equip(type, 1, qualityBean, base, extraEntry); }; diff --git a/src/config/equips/ring.ts b/src/config/equips/ring.ts index 11dec57..86ab19b 100644 --- a/src/config/equips/ring.ts +++ b/src/config/equips/ring.ts @@ -80,7 +80,7 @@ export const ringCategorys = [ export const initialRing = () => { const type = 'ring'; const qualityBean = new Quality(qualitys[0], coefficient[qualitys[0]]); - const base = new EquipBase('initial', 'Ac_10.png', [new Entry('hp', 20, '+20', 20, 20)]); + const base = new EquipBase('initial', 'Ac_10.png', [new Entry('atk', 1, '+1', 1, 1)]); const extraEntry = [new Entry('crit', 10, '+10%', 10, 10)]; return new Equip(type, 1, qualityBean, base, extraEntry); }; diff --git a/src/tool/caller/equip.ts b/src/tool/caller/equip.ts index df746c1..7a0adbb 100644 --- a/src/tool/caller/equip.ts +++ b/src/tool/caller/equip.ts @@ -1,4 +1,4 @@ -import { strengthen_rates } from '@/config'; +import { strengthen_rates, strengthen_factor } from '@/config'; /** * 计算装备购买价格 @@ -30,8 +30,8 @@ export const conisOfsell = (equip) => { * @param strengthenLv 装备当前强化等级 * @returns */ -export const strengthenCoins = (lv, strengthenLv) => { - return Math.round((lv + 1) * 1.1 ** (strengthenLv ** 1.1) * (10 + lv / 5) + 100); +export const strengthenCoins = (lv, strengthenLv, quality) => { + return Math.round((lv + 1) * 1.1 ** (strengthenLv ** 1.1) * (10 + lv / 5) * strengthen_factor[quality] + 100); }; /** @@ -40,12 +40,12 @@ export const strengthenCoins = (lv, strengthenLv) => { * @param strengthenLv 装备目标强化等级 * @returns */ -export const strengthenAvgCoins = (lv, strengthenLv) => { +export const strengthenAvgCoins = (lv, strengthenLv, quality) => { let sum = 0; const len = strengthen_rates.length; for (let i = 0; i < strengthenLv; i++) { const rate = i < len ? strengthen_rates[i] : strengthen_rates[len - 1]; - sum += strengthenCoins(lv, i) / rate + (sum * (1 - rate)) / rate; + sum += strengthenCoins(lv, i, quality) / rate + (sum * (1 - rate)) / rate; } return Math.round(sum); }; diff --git a/src/views/backpack/inherited.vue b/src/views/backpack/inherited.vue index 04fb4c7..1581e33 100644 --- a/src/views/backpack/inherited.vue +++ b/src/views/backpack/inherited.vue @@ -85,8 +85,8 @@ const useCoins = computed(() => { return state.playerAttribute.coins; }) const needCoins = computed(() => { - const need = strengthenAvgCoins(prop.target.lv, prop.source.strengthenLv) - const used = strengthenAvgCoins(prop.source.lv, prop.source.strengthenLv) + const need = strengthenAvgCoins(prop.target.lv, prop.source.strengthenLv, prop.target.quality.quality) + const used = strengthenAvgCoins(prop.source.lv, prop.source.strengthenLv, prop.source.quality.quality) return need > used ? need - used : 0; }) const confirm = ref(); diff --git a/src/views/backpack/strengthen.vue b/src/views/backpack/strengthen.vue index c3122e0..d265105 100644 --- a/src/views/backpack/strengthen.vue +++ b/src/views/backpack/strengthen.vue @@ -33,7 +33,7 @@

{{ t('stren.0') }}:{{ needCoins }}

+ }}

{{ t('stren.0') }}:{{ needCoins }}

@@ -111,7 +111,7 @@ const useCoins = computed(() => { return state.playerAttribute.coins; }) const needCoins = computed(() => { - return strengthenCoins(prop.equip.lv, prop.equip.strengthenLv); + return strengthenCoins(prop.equip.lv, prop.equip.strengthenLv, prop.equip.quality.quality); }) const strengthen = (test?) => {