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', 'hp', 'def', 'defPercent', 'hpPercent', 'dmgReduc', 'critAvoid', 'critDmgReduc']; const coefficient = { shabby: 0.7, ordinary: 1, artifact: 1.5, epic: 1.8, unique: 2, colorful: 2 }; export const pantsColorfulCategorys: Categorys[] = []; export const pantsUniqueCategorys: Categorys[] = [ new Categorys('mhlg', 'pants/梦回龙宫.png', [ { type: 'def', valCoefficient: 2 }, { type: 'hp', valCoefficient: 2.8 }, ]), new Categorys('longlin', 'pants/龙鳞胫甲.png', [ { type: 'def', valCoefficient: 0.9 }, { type: 'critDmg', valCoefficient: 1.7 }, { type: 'atk', valCoefficient: 1.7 }, ]), new Categorys('qiutu', 'pants/囚徒.png', [ { type: 'hp', valCoefficient: 2 }, { type: 'atk', valCoefficient: 2 }, { type: 'bloc', valCoefficient: 1.2 }, ]), new Categorys('wuwei', 'pants/五味.png', [ { type: 'def', valCoefficient: 1.2 }, { type: 'hp', valCoefficient: 1.7 }, { type: 'atk', valCoefficient: 1.0 }, ]), new Categorys('cangjing', 'pants/藏经甲.png', [ { type: 'def', valCoefficient: 1.5 }, { type: 'bloc', valCoefficient: 1.2 }, { type: 'hp', valCoefficient: 1.4 }, ]), ]; export const pantsCategorys: Categorys[] = [ new Categorys('qijia', 'pants/泣甲.png', [ { type: 'def', valCoefficient: 2 }, { type: 'hp', valCoefficient: 0.6 }, ]), new Categorys('guanjia', 'pants/管家服.png', [ { type: 'def', valCoefficient: 0.8 }, { type: 'hp', valCoefficient: 1.8 }, ]), new Categorys('egui', 'pants/饿鬼.png', [ { type: 'def', valCoefficient: 0.8 }, { type: 'hp', valCoefficient: 0.8 }, { type: 'atk', valCoefficient: 0.8 }, ]), ]; export const initialpants = () => { const type = 'pants'; const qualityBean = new Quality(qualitys[0], coefficient[qualitys[0]]); const base = new EquipBase('initial', 'pants/新手.png', [new Entry('def', 1, '+1', 1, 1)]); const extraEntry = [new Entry('hp', 10, '+10', 10, 10)]; return new Equip(type, 1, qualityBean, base, extraEntry); }; export const createpants = (quality, lv) => { const type = 'pants'; const qualityBean = new Quality(quality, coefficient[quality]); const category = getCategory(quality, pantsCategorys, pantsUniqueCategorys, pantsColorfulCategorys); 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(pantsExtraEntry(quality, lv)); } return new Equip(type, lv, qualityBean, base, extraEntry); }; export const pantsExtraEntry = (quality, lv) => { return createExtraEntry(quality, lv, extraEntrys, coefficient); }; export const pantsSamples = createSamples(pantsCategorys, pantsUniqueCategorys, pantsColorfulCategorys, 'pants', coefficient);