Browse Source

调整部分装备属性,调整强化费用

v1.0
许孟阳 3 weeks ago
parent
commit
c111ed4115
  1. 8
      src/config/equips/bracers.ts
  2. 7
      src/config/equips/constant.ts
  3. 6
      src/config/equips/jewelry.ts
  4. 2
      src/config/equips/neck.ts
  5. 2
      src/config/equips/ring.ts
  6. 10
      src/tool/caller/equip.ts
  7. 4
      src/views/backpack/inherited.vue
  8. 2
      src/views/backpack/strengthen.vue

8
src/config/equips/bracers.ts

@ -89,7 +89,7 @@ export const bracersUniqueCategorys = [
icon: 'bracers/人参果裹布.png', icon: 'bracers/人参果裹布.png',
entry: [ entry: [
{ type: 'critDmg', valCoefficient: 1.2 }, { type: 'critDmg', valCoefficient: 1.2 },
{ type: 'dmgPercent', valCoefficient: 1.0 }, { type: 'atkPercent', valCoefficient: 1.0 },
{ type: 'atk', valCoefficient: 0.7 }, { type: 'atk', valCoefficient: 0.7 },
], ],
}, },
@ -105,7 +105,7 @@ export const bracersUniqueCategorys = [
name: 'meipusa', name: 'meipusa',
icon: 'bracers/美菩萨.png', icon: 'bracers/美菩萨.png',
entry: [ entry: [
{ type: 'dmgPercent', valCoefficient: 1.2 }, { type: 'atkPercent', valCoefficient: 1.2 },
{ type: 'def', valCoefficient: 0.9 }, { type: 'def', valCoefficient: 0.9 },
{ type: 'hp', valCoefficient: 1.2 }, { type: 'hp', valCoefficient: 1.2 },
], ],
@ -153,8 +153,8 @@ export const bracersCategorys = [
export const initialbracers = () => { export const initialbracers = () => {
const type = 'bracers'; const type = 'bracers';
const qualityBean = new Quality(qualitys[0], coefficient[qualitys[0]]); const qualityBean = new Quality(qualitys[0], coefficient[qualitys[0]]);
const base = new EquipBase('shiwangsy', 'bracers/新手.png', [new Entry('hp', 20, '+20', 20, 20)]); const base = new EquipBase('shiwangsy', 'bracers/新手.png', [new Entry('atk', 1, '+1', 1, 1)]);
const extraEntry = [new Entry('crit', 10, '+10%', 10, 10)]; const extraEntry = [new Entry('hp', 20, '+20', 20, 20)];
return new Equip(type, 1, qualityBean, base, extraEntry); return new Equip(type, 1, qualityBean, base, extraEntry);
}; };

7
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_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 = { export const entry_initor = {
atk: (lv: number, qualityCoefficient: number, valCoefficient?: number) => { atk: (lv: number, qualityCoefficient: number, valCoefficient?: number) => {
@ -119,9 +120,9 @@ export const entry_initor = {
return new Entry('dmgPercent', value, '+' + value + '%', max, min); return new Entry('dmgPercent', value, '+' + value + '%', max, min);
}, },
dmgReduc: (lv: number, qualityCoefficient: number) => { dmgReduc: (lv: number, qualityCoefficient: number) => {
const value = Math.round((Math.random() * lv * 0.05 + 5) * qualityCoefficient) || 1; const value = Math.round((Math.random() * lv * 0.05 + 6) * qualityCoefficient) || 1;
const max = Math.round((lv * 0.05 + 5) * qualityCoefficient) || 1; const max = Math.round((lv * 0.05 + 6) * qualityCoefficient) || 1;
const min = Math.round(5 * qualityCoefficient) || 1; const min = Math.round(6 * qualityCoefficient) || 1;
return new Entry('dmgReduc', value, '+' + value + '%', max, min); return new Entry('dmgReduc', value, '+' + value + '%', max, min);
}, },
critAvoid: (lv: number, qualityCoefficient: number) => { critAvoid: (lv: number, qualityCoefficient: number) => {

6
src/config/equips/jewelry.ts

@ -89,7 +89,7 @@ export const jewelryUniqueCategorys = [
icon: 'jewelry/良人.png', icon: 'jewelry/良人.png',
entry: [ entry: [
{ type: 'critDmg', valCoefficient: 1.2 }, { type: 'critDmg', valCoefficient: 1.2 },
{ type: 'dmgPercent', valCoefficient: 0.5 }, { type: 'dmgPercent', valCoefficient: 0.4 },
{ type: 'atk', valCoefficient: 0.7 }, { type: 'atk', valCoefficient: 0.7 },
], ],
}, },
@ -105,7 +105,7 @@ export const jewelryUniqueCategorys = [
name: 'cltx', name: 'cltx',
icon: 'jewelry/赤羚天禧.png', icon: 'jewelry/赤羚天禧.png',
entry: [ entry: [
{ type: 'dmgPercent', valCoefficient: 0.6 }, { type: 'dmgPercent', valCoefficient: 0.5 },
{ type: 'def', valCoefficient: 0.9 }, { type: 'def', valCoefficient: 0.9 },
{ type: 'hp', valCoefficient: 1.2 }, { type: 'hp', valCoefficient: 1.2 },
], ],
@ -153,7 +153,7 @@ export const jewelryCategorys = [
export const initialJewelry = () => { export const initialJewelry = () => {
const type = 'jewelry'; const type = 'jewelry';
const qualityBean = new Quality(qualitys[0], coefficient[qualitys[0]]); 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)]; const extraEntry = [new Entry('crit', 10, '+10%', 10, 10)];
return new Equip(type, 1, qualityBean, base, extraEntry); return new Equip(type, 1, qualityBean, base, extraEntry);
}; };

2
src/config/equips/neck.ts

@ -86,7 +86,7 @@ export const neckCategorys = [
export const initialNeck = () => { export const initialNeck = () => {
const type = 'neck'; const type = 'neck';
const qualityBean = new Quality(qualitys[0], coefficient[qualitys[0]]); 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)]; const extraEntry = [new Entry('crit', 10, '+10%', 10, 10)];
return new Equip(type, 1, qualityBean, base, extraEntry); return new Equip(type, 1, qualityBean, base, extraEntry);
}; };

2
src/config/equips/ring.ts

@ -80,7 +80,7 @@ export const ringCategorys = [
export const initialRing = () => { export const initialRing = () => {
const type = 'ring'; const type = 'ring';
const qualityBean = new Quality(qualitys[0], coefficient[qualitys[0]]); 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)]; const extraEntry = [new Entry('crit', 10, '+10%', 10, 10)];
return new Equip(type, 1, qualityBean, base, extraEntry); return new Equip(type, 1, qualityBean, base, extraEntry);
}; };

10
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 * @param strengthenLv
* @returns * @returns
*/ */
export const strengthenCoins = (lv, strengthenLv) => { export const strengthenCoins = (lv, strengthenLv, quality) => {
return Math.round((lv + 1) * 1.1 ** (strengthenLv ** 1.1) * (10 + lv / 5) + 100); 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 * @param strengthenLv
* @returns * @returns
*/ */
export const strengthenAvgCoins = (lv, strengthenLv) => { export const strengthenAvgCoins = (lv, strengthenLv, quality) => {
let sum = 0; let sum = 0;
const len = strengthen_rates.length; const len = strengthen_rates.length;
for (let i = 0; i < strengthenLv; i++) { for (let i = 0; i < strengthenLv; i++) {
const rate = i < len ? strengthen_rates[i] : strengthen_rates[len - 1]; 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); return Math.round(sum);
}; };

4
src/views/backpack/inherited.vue

@ -85,8 +85,8 @@ const useCoins = computed(() => {
return state.playerAttribute.coins; return state.playerAttribute.coins;
}) })
const needCoins = computed(() => { const needCoins = computed(() => {
const need = strengthenAvgCoins(prop.target.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) const used = strengthenAvgCoins(prop.source.lv, prop.source.strengthenLv, prop.source.quality.quality)
return need > used ? need - used : 0; return need > used ? need - used : 0;
}) })
const confirm = ref(); const confirm = ref();

2
src/views/backpack/strengthen.vue

@ -111,7 +111,7 @@ const useCoins = computed(() => {
return state.playerAttribute.coins; return state.playerAttribute.coins;
}) })
const needCoins = computed(() => { 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?) => { const strengthen = (test?) => {

Loading…
Cancel
Save