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', 'bloc']; const coefficient = { shabby: 0.6, ordinary: 0.9, artifact: 1.3, epic: 1.6, unique: 1.8, colorful: 1.8 }; export const neckColorfulCategorys: Categorys[] = [ new Categorys( 'duanji', 'neck/断·极.png', [ { type: 'bloc', valCoefficient: 1.3 }, { type: 'def', valCoefficient: 0.8 }, { type: 'hp', valCoefficient: 0.9 }, ], 'Duan' ), ]; export const neckUniqueCategorys: Categorys[] = [ new Categorys('demonSlayer', 'U_neck01.png', [ { type: 'atk', valCoefficient: 1.0 }, { type: 'hp', valCoefficient: 0.8 }, { type: 'def', valCoefficient: 0.9 }, ]), new Categorys('darkDragon', 'U_neck02.png', [ { type: 'critDmg', valCoefficient: 1.5 }, { type: 'crit', valCoefficient: 0.5 }, { type: 'hp', valCoefficient: 0.8 }, ]), new Categorys('single', 'U_neck03.png', [ { type: 'critDmg', valCoefficient: 1.5 }, { type: 'bloc', valCoefficient: 0.7 }, { type: 'hp', valCoefficient: 0.7 }, ]), new Categorys('demons', 'U_neck04.png', [ { type: 'critDmg', valCoefficient: 1.6 }, { type: 'atk', valCoefficient: 1.6 }, ]), new Categorys('ipaya', 'U_neck05.png', [ { type: 'bloc', valCoefficient: 0.9 }, { type: 'def', valCoefficient: 0.9 }, { type: 'hp', valCoefficient: 1.3 }, ]), ]; export const neckCategorys: Categorys[] = [ new Categorys('crusade', 'Ac_1.png', [ { type: 'def', valCoefficient: 0.9 }, { type: 'hp', valCoefficient: 0.5 }, { type: 'bloc', valCoefficient: 0.6 }, ]), new Categorys('gintamaEyes', 'Ac_5.png', [ { type: 'crit', valCoefficient: 1.1 }, { type: 'hp', valCoefficient: 0.5 }, { type: 'atk', valCoefficient: 0.6 }, ]), new Categorys('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) => { const type = 'neck'; const qualityBean = new Quality(quality, coefficient[quality]); const category = getCategory(quality, neckCategorys, neckUniqueCategorys, neckColorfulCategorys); 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);