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.
95 lines
3.6 KiB
95 lines
3.6 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', 'atkPercent', 'defPercent', 'hpPercent']; |
|
|
|
const coefficient = { shabby: 0.6, ordinary: 0.9, artifact: 1.3, epic: 1.6, unique: 1.8, colorful: 1.8 }; |
|
|
|
export const bracersColorfulCategorys: Categorys[] = [ |
|
new Categorys( |
|
'xianglong', |
|
'bracers/降龙.png', |
|
[ |
|
{ type: 'critDmg', valCoefficient: 1.2 }, |
|
{ type: 'atkPercent', valCoefficient: 0.7 }, |
|
{ type: 'atk', valCoefficient: 1 }, |
|
], |
|
'Xianglong' |
|
), |
|
]; |
|
export const bracersUniqueCategorys: Categorys[] = [ |
|
new Categorys('duoqing', 'bracers/多情腕.png', [ |
|
{ type: 'atk', valCoefficient: 1 }, |
|
{ type: 'hp', valCoefficient: 0.8 }, |
|
{ type: 'def', valCoefficient: 0.9 }, |
|
]), |
|
new Categorys('wano', 'bracers/玩藕.png', [ |
|
{ type: 'critDmg', valCoefficient: 1.5 }, |
|
{ type: 'crit', valCoefficient: 0.5 }, |
|
{ type: 'atk', valCoefficient: 0.8 }, |
|
]), |
|
new Categorys('rsggu', 'bracers/人参果裹布.png', [ |
|
{ type: 'critDmg', valCoefficient: 1.2 }, |
|
{ type: 'atkPercent', valCoefficient: 1.0 }, |
|
{ type: 'atk', valCoefficient: 0.7 }, |
|
]), |
|
new Categorys('yingwu', 'bracers/鹦鹉杯.png', [ |
|
{ type: 'critDmg', valCoefficient: 1.6 }, |
|
{ type: 'atk', valCoefficient: 1.6 }, |
|
]), |
|
new Categorys('meipusa', 'bracers/美菩萨.png', [ |
|
{ type: 'atkPercent', valCoefficient: 1.2 }, |
|
{ type: 'def', valCoefficient: 0.9 }, |
|
{ type: 'hp', valCoefficient: 1.2 }, |
|
]), |
|
]; |
|
export const bracersCategorys: Categorys[] = [ |
|
new Categorys('guoshi', 'bracers/裹尸布.png', [ |
|
{ type: 'def', valCoefficient: 0.9 }, |
|
{ type: 'hp', valCoefficient: 0.6 }, |
|
{ type: 'atk', valCoefficient: 0.5 }, |
|
]), |
|
new Categorys('xiuyugu', 'bracers/绣与骨.png', [ |
|
{ type: 'crit', valCoefficient: 1.1 }, |
|
{ type: 'hp', valCoefficient: 0.5 }, |
|
{ type: 'atk', valCoefficient: 0.6 }, |
|
]), |
|
new Categorys('huoshen', 'bracers/火神腕.png', [ |
|
{ type: 'crit', valCoefficient: 1.1 }, |
|
{ type: 'hp', valCoefficient: 0.6 }, |
|
{ type: 'atk', valCoefficient: 0.5 }, |
|
]), |
|
new Categorys('heishou', 'bracers/黑手.png', [ |
|
{ type: 'crit', valCoefficient: 0.75 }, |
|
{ type: 'critDmg', valCoefficient: 0.5 }, |
|
{ type: 'hp', valCoefficient: 0.5 }, |
|
]), |
|
]; |
|
|
|
export const initialbracers = () => { |
|
const type = 'bracers'; |
|
const qualityBean = new Quality(qualitys[0], coefficient[qualitys[0]]); |
|
const base = new EquipBase('shiwangsy', 'bracers/新手.png', [new Entry('atk', 1, '+1', 1, 1)]); |
|
const extraEntry = [new Entry('hp', 20, '+20', 20, 20)]; |
|
return new Equip(type, 1, qualityBean, base, extraEntry); |
|
}; |
|
|
|
export const createbracers = (quality, lv): Equip => { |
|
const type = 'bracers'; |
|
const qualityBean = new Quality(quality, coefficient[quality]); |
|
const category = getCategory(quality, bracersCategorys, bracersUniqueCategorys, bracersColorfulCategorys); |
|
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(bracersExtraEntry(quality, lv)); |
|
} |
|
return new Equip(type, lv, qualityBean, base, extraEntry); |
|
}; |
|
|
|
export const bracersExtraEntry = (quality, lv) => { |
|
return createExtraEntry(quality, lv, extraEntrys, coefficient); |
|
}; |
|
|
|
export const bracersSamples = createSamples(bracersCategorys, bracersUniqueCategorys, bracersColorfulCategorys, 'bracers', coefficient);
|
|
|