import { createExtraEntry, createBase, createSamples } from './base'; import { Entry, Quality, EquipBase, Equip, Categorys } from './bean'; import { qualitys, extra_entry_num } from './constant'; export const ringExtraEntrys = ['atk', 'crit', 'critDmg', 'hp', 'def']; const coefficient = { shabby: 0.6, ordinary: 0.9, artifact: 1.3, epic: 1.6, unique: 1.8, colorful: 2 }; class RingCategory extends Categorys { type: string = 'ring'; } export const ringColorfulCategorys: Categorys[] = [ new RingCategory( 'jingangzhuo', 'ring/金刚琢.png', [ { type: 'critDmg', valCoefficient: 1.5 }, { type: 'crit', valCoefficient: 0.5 }, { type: 'atk', valCoefficient: 1 }, ], 'SLWX,JinGangZhuo', 0.8 ), new RingCategory( 'pojie', 'ring/破戒.png', [ { type: 'critDmg', valCoefficient: 1.5 }, { type: 'crit', valCoefficient: 0.5 }, { type: 'atk', valCoefficient: 0.7 }, ], 'FengXie' ), new RingCategory( 'mantanghong', 'ring/满堂红.png', [ { type: 'critDmg', valCoefficient: 1 }, { type: 'crit', valCoefficient: 0.5 }, { type: 'hp', valCoefficient: 1.5 }, ], 'ShiZhong' ), new RingCategory( 'hanba', 'ring/旱魃.png', [ { type: 'critDmg', valCoefficient: 1 }, { type: 'crit', valCoefficient: 0.5 }, { type: 'hp', valCoefficient: 1.5 }, ], 'ShenShang' ), new RingCategory( 'yaozuzhili', 'ring/妖族之力.png', [ { type: 'critDmg', valCoefficient: 0.7 }, { type: 'crit', valCoefficient: 0.5 }, { type: 'atk', valCoefficient: 1.5 }, ], 'TongJueFanJi', 0.6 ), new RingCategory( 'zuanjie', 'ring/黑白钻戒.png', [ { type: 'atk', valCoefficient: 1 }, { type: 'def', valCoefficient: 0.8 }, { type: 'hp', valCoefficient: 1.5 }, ], 'JainYing' ), ]; export const ringUniqueCategorys: RingCategory[] = [ new RingCategory('death', 'U_ring01.png', [ { type: 'crit', valCoefficient: 1 }, { type: 'critDmg', valCoefficient: 0.5 }, { type: 'hp', valCoefficient: 0.8 }, ]), new RingCategory('realFurryRing', 'U_ring02.png', [ { type: 'critDmg', valCoefficient: 1.2 }, { type: 'crit', valCoefficient: 0.5 }, { type: 'atk', valCoefficient: 0.7 }, ]), new RingCategory('pioneer', 'U_ring03.png', [ { type: 'critDmg', valCoefficient: 1 }, { type: 'crit', valCoefficient: 0.5 }, { type: 'hp', valCoefficient: 0.7 }, ]), new RingCategory('susan', 'U_ring04.png', [ { type: 'critDmg', valCoefficient: 1.6 }, { type: 'atk', valCoefficient: 1.1 }, ]), new RingCategory('moonlight', 'U_ring05.png', [ { type: 'critDmg', valCoefficient: 1.5 }, { type: 'hp', valCoefficient: 1.2 }, ]), ]; export const ringCategorys = [ new RingCategory('life', 'Ac_9.png', [{ type: 'hp', valCoefficient: 1.5 }]), new RingCategory('imperialSoul', 'Ac_10.png', [ { type: 'hp', valCoefficient: 1 }, { type: 'atk', valCoefficient: 0.5 }, ]), new RingCategory('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, category, extraQuality) => { const type = 'ring'; const qualityBean = new Quality(quality, coefficient[quality], extraQuality); const base = createBase(quality, lv, category, coefficient, extraQuality); const extraEntry = new Array(); const extraEntryNum = extra_entry_num[quality]; for (let i = 0; i < extraEntryNum; i++) { extraEntry.push(ringExtraEntry(quality, lv, extraQuality)); } return new Equip(type, lv, qualityBean, base, extraEntry); }; export const ringExtraEntry = (quality, lv, extraQuality, type?) => { return createExtraEntry(coefficient[quality], lv, type ? [type] : ringExtraEntrys, extraQuality); }; export const ringSamples = createSamples(ringCategorys, ringUniqueCategorys, ringColorfulCategorys, 'ring', coefficient);