Browse Source

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

v1.0
许孟阳 2 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. 4
      src/views/backpack/strengthen.vue

8
src/config/equips/bracers.ts

@ -89,7 +89,7 @@ export const bracersUniqueCategorys = [ @@ -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 = [ @@ -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 = [ @@ -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);
};

7
src/config/equips/constant.ts

@ -40,6 +40,7 @@ export const attr_unitys = { @@ -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 = { @@ -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) => {

6
src/config/equips/jewelry.ts

@ -89,7 +89,7 @@ export const jewelryUniqueCategorys = [ @@ -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 = [ @@ -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 = [ @@ -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);
};

2
src/config/equips/neck.ts

@ -86,7 +86,7 @@ export const neckCategorys = [ @@ -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);
};

2
src/config/equips/ring.ts

@ -80,7 +80,7 @@ export const ringCategorys = [ @@ -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);
};

10
src/tool/caller/equip.ts

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
import { strengthen_rates } from '@/config';
import { strengthen_rates, strengthen_factor } from '@/config';
/**
*
@ -30,8 +30,8 @@ export const conisOfsell = (equip) => { @@ -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) => { @@ -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);
};

4
src/views/backpack/inherited.vue

@ -85,8 +85,8 @@ const useCoins = computed(() => { @@ -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();

4
src/views/backpack/strengthen.vue

@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
<div class="btn-group" v-if='!auto'>
<p>{{ t('stren.0') }}<span :class="{ 'red': useCoins < needCoins }">{{ needCoins }}</span></p>
<button class="button" @click="strengthen(false)">{{ t('stren.1') }}+{{ parseInt(equip.strengthenLv) + 1
}}</button>
}}</button>
</div>
<div class="btn-group" v-if='!auto'>
<p>{{ t('stren.0') }}<span :class="{ 'red': useCoins < needCoins }">{{ needCoins }}</span></p>
@ -111,7 +111,7 @@ const useCoins = computed(() => { @@ -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?) => {

Loading…
Cancel
Save