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.
123 lines
3.9 KiB
123 lines
3.9 KiB
import { 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', 'bloc']; |
|
|
|
const coefficient = { shabby: 0.6, ordinary: 0.9, artifact: 1.3, epic: 1.6, unique: 1.8, colorful: 1.8 }; |
|
|
|
class NeckCategory extends Categorys { |
|
type: string = 'neck'; |
|
} |
|
|
|
export const neckColorfulCategorys: Categorys[] = [ |
|
new NeckCategory( |
|
'duanji', |
|
'neck/断·极.png', |
|
[ |
|
{ type: 'bloc', valCoefficient: 1.3 }, |
|
{ type: 'def', valCoefficient: 0.8 }, |
|
{ type: 'hp', valCoefficient: 0.9 }, |
|
], |
|
'Duan' |
|
), |
|
new NeckCategory( |
|
'hushi', |
|
'neck/虎视.png', |
|
[ |
|
{ type: 'atk', valCoefficient: 1.6 }, |
|
{ type: 'hp', valCoefficient: 1.5 }, |
|
], |
|
'NuMu' |
|
), |
|
new NeckCategory( |
|
'xuenu', |
|
'neck/血怒.png', |
|
[ |
|
{ type: 'critDmg', valCoefficient: 1.5 }, |
|
{ type: 'atk', valCoefficient: 1.6 }, |
|
], |
|
'HongYan' |
|
), |
|
new NeckCategory( |
|
'guiyan', |
|
'neck/鬼眼.png', |
|
[ |
|
{ type: 'critDmg', valCoefficient: 1.4 }, |
|
{ type: 'crit', valCoefficient: 0.5 }, |
|
{ type: 'hp', valCoefficient: 0.8 }, |
|
], |
|
'ShaYi' |
|
), |
|
new NeckCategory('longteng', 'neck/龙腾护心镜.png', [{ type: 'hp', valCoefficient: 3 }], 'LongTeng'), |
|
]; |
|
|
|
export const neckUniqueCategorys: NeckCategory[] = [ |
|
new NeckCategory('demonSlayer', 'U_neck01.png', [ |
|
{ type: 'atk', valCoefficient: 1.0 }, |
|
{ type: 'hp', valCoefficient: 0.8 }, |
|
{ type: 'def', valCoefficient: 0.9 }, |
|
]), |
|
new NeckCategory('darkDragon', 'U_neck02.png', [ |
|
{ type: 'critDmg', valCoefficient: 1.5 }, |
|
{ type: 'crit', valCoefficient: 0.5 }, |
|
{ type: 'hp', valCoefficient: 0.8 }, |
|
]), |
|
new NeckCategory('single', 'U_neck03.png', [ |
|
{ type: 'critDmg', valCoefficient: 1.5 }, |
|
{ type: 'bloc', valCoefficient: 0.7 }, |
|
{ type: 'hp', valCoefficient: 0.7 }, |
|
]), |
|
new NeckCategory('demons', 'U_neck04.png', [ |
|
{ type: 'critDmg', valCoefficient: 1.6 }, |
|
{ type: 'atk', valCoefficient: 1.6 }, |
|
]), |
|
new NeckCategory('ipaya', 'U_neck05.png', [ |
|
{ type: 'bloc', valCoefficient: 0.9 }, |
|
{ type: 'def', valCoefficient: 0.9 }, |
|
{ type: 'hp', valCoefficient: 1.3 }, |
|
]), |
|
]; |
|
export const neckCategorys: NeckCategory[] = [ |
|
new NeckCategory('crusade', 'Ac_1.png', [ |
|
{ type: 'def', valCoefficient: 0.9 }, |
|
{ type: 'hp', valCoefficient: 0.5 }, |
|
{ type: 'bloc', valCoefficient: 0.6 }, |
|
]), |
|
new NeckCategory('gintamaEyes', 'Ac_5.png', [ |
|
{ type: 'crit', valCoefficient: 1.1 }, |
|
{ type: 'hp', valCoefficient: 0.5 }, |
|
{ type: 'atk', valCoefficient: 0.6 }, |
|
]), |
|
new NeckCategory('iceDragon', 'Ac_7.png', [ |
|
{ type: 'crit', valCoefficient: 0.75 }, |
|
{ type: 'critDmg', valCoefficient: 0.5 }, |
|
{ type: 'hp', valCoefficient: 0.5 }, |
|
]), |
|
]; |
|
|
|
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('atk', 1, '+1', 1, 1)]); |
|
const extraEntry = [new Entry('crit', 10, '+10%', 10, 10)]; |
|
return new Equip(type, 1, qualityBean, base, extraEntry); |
|
}; |
|
|
|
export const createneck = (quality, lv, category) => { |
|
const type = 'neck'; |
|
const qualityBean = new Quality(quality, coefficient[quality]); |
|
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(neckExtraEntry(quality, lv)); |
|
} |
|
return new Equip(type, lv, qualityBean, base, extraEntry); |
|
}; |
|
|
|
export const neckExtraEntry = (quality, lv) => { |
|
return createExtraEntry(quality, lv, extraEntrys, coefficient); |
|
}; |
|
|
|
export const neckSamples = createSamples(neckCategorys, neckUniqueCategorys, neckColorfulCategorys, 'neck', coefficient);
|
|
|