You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
127 lines
3.9 KiB
127 lines
3.9 KiB
import { getCategory, createExtraEntry, createBase, createSamples } from './base'; |
|
import { Entry, Quality, EquipBase, Equip, Categorys } from './bean'; |
|
import { qualitys, extra_entry_num } from './constant'; |
|
|
|
const extraEntrys = ['atk', 'crit', 'critDmg', 'hp', 'def']; |
|
|
|
const coefficient = { shabby: 0.6, ordinary: 0.9, artifact: 1.3, epic: 1.6, unique: 1.8, colorful: 2 }; |
|
|
|
export const ringColorfulCategorys: Categorys[] = [ |
|
new Categorys( |
|
'jingangzhuo', |
|
'ring/金刚琢.png', |
|
[ |
|
{ type: 'atk', valCoefficient: 2.4 }, |
|
{ type: 'def', valCoefficient: 0.5 }, |
|
{ type: 'hp', valCoefficient: 0.9 }, |
|
], |
|
'SLWX,JinGangZhuo', |
|
0.9 |
|
), |
|
new Categorys( |
|
'pojie', |
|
'ring/破戒.png', |
|
[ |
|
{ type: 'critDmg', valCoefficient: 1.5 }, |
|
{ type: 'crit', valCoefficient: 0.5 }, |
|
{ type: 'atk', valCoefficient: 0.7 }, |
|
], |
|
'FengXie' |
|
), |
|
new Categorys( |
|
'mantanghong', |
|
'ring/满堂红.png', |
|
[ |
|
{ type: 'critDmg', valCoefficient: 1 }, |
|
{ type: 'crit', valCoefficient: 0.5 }, |
|
{ type: 'hp', valCoefficient: 1.5 }, |
|
], |
|
'ShiZhong' |
|
), |
|
new Categorys( |
|
'hanba', |
|
'ring/旱魃.png', |
|
[ |
|
{ type: 'critDmg', valCoefficient: 1 }, |
|
{ type: 'crit', valCoefficient: 0.5 }, |
|
{ type: 'hp', valCoefficient: 1.5 }, |
|
], |
|
'ShenShang' |
|
), |
|
new Categorys( |
|
'yaozuzhili', |
|
'ring/妖族之力.png', |
|
[ |
|
{ type: 'critDmg', valCoefficient: 0.7 }, |
|
{ type: 'crit', valCoefficient: 0.5 }, |
|
{ type: 'atk', valCoefficient: 1.5 }, |
|
], |
|
'TongJueFanJi', |
|
0.5 |
|
), |
|
]; |
|
|
|
export const ringUniqueCategorys: Categorys[] = [ |
|
new Categorys('death', 'U_ring01.png', [ |
|
{ type: 'crit', valCoefficient: 1 }, |
|
{ type: 'critDmg', valCoefficient: 0.5 }, |
|
{ type: 'hp', valCoefficient: 0.8 }, |
|
]), |
|
new Categorys('realFurryRing', 'U_ring02.png', [ |
|
{ type: 'critDmg', valCoefficient: 1.2 }, |
|
{ type: 'crit', valCoefficient: 0.5 }, |
|
{ type: 'atk', valCoefficient: 0.7 }, |
|
]), |
|
new Categorys('pioneer', 'U_ring03.png', [ |
|
{ type: 'critDmg', valCoefficient: 1 }, |
|
{ type: 'crit', valCoefficient: 0.5 }, |
|
{ type: 'hp', valCoefficient: 0.7 }, |
|
]), |
|
new Categorys('susan', 'U_ring04.png', [ |
|
{ type: 'critDmg', valCoefficient: 1.6 }, |
|
{ type: 'atk', valCoefficient: 1.1 }, |
|
]), |
|
new Categorys('moonlight', 'U_ring05.png', [ |
|
{ type: 'critDmg', valCoefficient: 1.5 }, |
|
{ type: 'hp', valCoefficient: 1.2 }, |
|
]), |
|
]; |
|
export const ringCategorys = [ |
|
new Categorys('life', 'Ac_9.png', [{ type: 'hp', valCoefficient: 1.5 }]), |
|
new Categorys('imperialSoul', 'Ac_10.png', [ |
|
{ type: 'hp', valCoefficient: 1 }, |
|
{ type: 'atk', valCoefficient: 0.5 }, |
|
]), |
|
new Categorys('furryRing', 'Ac_11.png', [ |
|
{ type: 'hp', valCoefficient: 0.9 }, |
|
{ type: 'atk', valCoefficient: 0.3 }, |
|
{ type: 'crit', valCoefficient: 0.8 }, |
|
]), |
|
]; |
|
|
|
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('atk', 1, '+1', 1, 1)]); |
|
const extraEntry = [new Entry('crit', 10, '+10%', 10, 10)]; |
|
return new Equip(type, 1, qualityBean, base, extraEntry); |
|
}; |
|
|
|
export const createRing = (quality, lv) => { |
|
const type = 'ring'; |
|
const qualityBean = new Quality(quality, coefficient[quality]); |
|
const category = getCategory(quality, ringCategorys, ringUniqueCategorys, ringColorfulCategorys); |
|
const base = createBase(quality, lv, category, coefficient); |
|
const extraEntry = new Array(); |
|
const extraEntryNum = extra_entry_num[quality]; |
|
for (let i = 0; i < extraEntryNum; i++) { |
|
extraEntry.push(ringExtraEntry(quality, lv)); |
|
} |
|
return new Equip(type, lv, qualityBean, base, extraEntry); |
|
}; |
|
|
|
export const ringExtraEntry = (quality, lv) => { |
|
return createExtraEntry(quality, lv, extraEntrys, coefficient); |
|
}; |
|
|
|
export const ringSamples = createSamples(ringCategorys, ringUniqueCategorys, ringColorfulCategorys, 'ring', coefficient);
|
|
|