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.
149 lines
4.8 KiB
149 lines
4.8 KiB
import { createExtraEntry, createBase, createSamples } from './base'; |
|
import { Entry, Quality, EquipBase, Equip, Categorys } from './bean'; |
|
import { qualitys, extra_entry_num } from './constant'; |
|
|
|
export const armorExtraEntrys = ['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 }; |
|
|
|
class ArmorCategory extends Categorys { |
|
type: string = 'armor'; |
|
} |
|
export const armorColorfulCategorys: Categorys[] = [ |
|
new ArmorCategory( |
|
'baihua', |
|
'armor/百花内甲.png', |
|
[ |
|
{ type: 'def', valCoefficient: 1.0 }, |
|
{ type: 'hp', valCoefficient: 1.4 }, |
|
{ type: 'atk', valCoefficient: 1.4 }, |
|
], |
|
'BHXDJC', |
|
0.9 |
|
), |
|
new ArmorCategory( |
|
'heixi', |
|
'armor/黑犀.png', |
|
[ |
|
{ type: 'def', valCoefficient: 1.8 }, |
|
{ type: 'hp', valCoefficient: 1 }, |
|
{ type: 'bloc', valCoefficient: 1 }, |
|
], |
|
'TieBi' |
|
), |
|
new ArmorCategory( |
|
'guiwen', |
|
'armor/龟纹铠.png', |
|
[ |
|
{ type: 'def', valCoefficient: 1.0 }, |
|
{ type: 'hp', valCoefficient: 1.4 }, |
|
{ type: 'bloc', valCoefficient: 1.4 }, |
|
], |
|
'DuJunQianNeng' |
|
), |
|
new ArmorCategory( |
|
'wuxing', |
|
'armor/五行压贴.png', |
|
[ |
|
{ type: 'def', valCoefficient: 0.7 }, |
|
{ type: 'hp', valCoefficient: 1.5 }, |
|
{ type: 'bloc', valCoefficient: 1.4 }, |
|
], |
|
'JinGuangHuShen' |
|
), |
|
new ArmorCategory( |
|
'guimen', |
|
'armor/鬼门甲.png', |
|
[ |
|
{ type: 'bloc', valCoefficient: 2.8 }, |
|
{ type: 'def', valCoefficient: 1.0 }, |
|
], |
|
'LaoBuKePo' |
|
), |
|
]; |
|
|
|
export const armorUniqueCategorys: ArmorCategory[] = [ |
|
new ArmorCategory('dispute', 'U_Armor01.png', [ |
|
{ type: 'def', valCoefficient: 1.0 }, |
|
{ type: 'hp', valCoefficient: 1.4 }, |
|
{ type: 'atk', valCoefficient: 1.4 }, |
|
]), |
|
new ArmorCategory('jianHao', 'U_Armor02.png', [ |
|
{ type: 'def', valCoefficient: 2.1 }, |
|
{ type: 'hp', valCoefficient: 2.6 }, |
|
]), |
|
new ArmorCategory('samurai', 'U_Armor03.png', [ |
|
{ type: 'def', valCoefficient: 1.3 }, |
|
{ type: 'hp', valCoefficient: 1.7 }, |
|
{ type: 'atk', valCoefficient: 0.9 }, |
|
]), |
|
new ArmorCategory('trackers', 'U_Armor04.png', [ |
|
{ type: 'def', valCoefficient: 0.9 }, |
|
{ type: 'critDmg', valCoefficient: 1.7 }, |
|
{ type: 'atk', valCoefficient: 1.7 }, |
|
]), |
|
new ArmorCategory('rongYi', 'U_Armor05.png', [ |
|
{ type: 'hp', valCoefficient: 1.6 }, |
|
{ type: 'atk', valCoefficient: 2.4 }, |
|
{ type: 'bloc', valCoefficient: 1.2 }, |
|
]), |
|
new ArmorCategory('nightwear', 'U_Armor06.png', [ |
|
{ type: 'def', valCoefficient: 1.2 }, |
|
{ type: 'hp', valCoefficient: 1.5 }, |
|
{ type: 'atk', valCoefficient: 1.2 }, |
|
]), |
|
new ArmorCategory('wildDragon', 'U_Armor07.png', [ |
|
{ type: 'def', valCoefficient: 1.5 }, |
|
{ type: 'bloc', valCoefficient: 1.2 }, |
|
{ type: 'hp', valCoefficient: 1.4 }, |
|
]), |
|
]; |
|
export const armorCategorys: ArmorCategory[] = [ |
|
new ArmorCategory('guard', 'A_A2.png', [ |
|
{ type: 'def', valCoefficient: 2 }, |
|
{ type: 'hp', valCoefficient: 0.6 }, |
|
]), |
|
new ArmorCategory('redWillow', 'A_A3.png', [ |
|
{ type: 'def', valCoefficient: 0.9 }, |
|
{ type: 'hp', valCoefficient: 1.2 }, |
|
]), |
|
new ArmorCategory('warrior', 'A_A5.png', [ |
|
{ type: 'def', valCoefficient: 1.1 }, |
|
{ type: 'hp', valCoefficient: 0.8 }, |
|
]), |
|
new ArmorCategory('lightArmor', 'A_A7.png', [ |
|
{ type: 'def', valCoefficient: 0.7 }, |
|
{ type: 'hp', valCoefficient: 0.5 }, |
|
{ type: 'atk', valCoefficient: 0.5 }, |
|
]), |
|
new ArmorCategory('furryArmor', 'A_A9.png', [ |
|
{ type: 'def', valCoefficient: 0.8 }, |
|
{ type: 'hp', valCoefficient: 0.8 }, |
|
{ type: 'atk', valCoefficient: 0.4 }, |
|
]), |
|
]; |
|
|
|
export const initialArmor = () => { |
|
const type = 'armor'; |
|
const qualityBean = new Quality(qualitys[0], coefficient[qualitys[0]], ''); |
|
const base = new EquipBase('initial', 'A_A3.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 createarmor = (quality, lv, category, extraQuality) => { |
|
const type = 'armor'; |
|
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(armorExtraEntry(quality, lv, extraQuality)); |
|
} |
|
return new Equip(type, lv, qualityBean, base, extraEntry); |
|
}; |
|
|
|
export const armorExtraEntry = (quality, lv, extraQuality) => { |
|
return createExtraEntry(quality, lv, armorExtraEntrys, coefficient, extraQuality); |
|
}; |
|
|
|
export const armorSamples = createSamples(armorCategorys, armorUniqueCategorys, armorColorfulCategorys, 'armor', coefficient);
|
|
|