Browse Source

装备随机方式变更

同品质所有部位随机
v1.0
许孟阳 2 weeks ago
parent
commit
ed3f4f945c
  1. 47
      src/config/equips/armor.ts
  2. 20
      src/config/equips/base.ts
  3. 3
      src/config/equips/bean.ts
  4. 40
      src/config/equips/bracers.ts
  5. 43
      src/config/equips/jewelry.ts
  6. 39
      src/config/equips/neck.ts
  7. 39
      src/config/equips/pants.ts
  8. 37
      src/config/equips/ring.ts
  9. 36
      src/config/equips/shoes.ts
  10. 49
      src/config/equips/weapon.ts

47
src/config/equips/armor.ts

@ -1,11 +1,15 @@
import { getCategory, createExtraEntry, createBase, createSamples } from './base'; import { createExtraEntry, createBase, createSamples } from './base';
import { Entry, Quality, EquipBase, Equip, Categorys } from './bean'; import { Entry, Quality, EquipBase, Equip, Categorys } from './bean';
import { qualitys, entry_initor, extra_entry_num } from './constant'; import { qualitys, entry_initor, extra_entry_num } from './constant';
const extraEntrys = ['atk', 'hp', 'def', 'defPercent', 'hpPercent', 'dmgReduc', 'critAvoid', 'critDmgReduc']; 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 }; 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[] = [ export const armorColorfulCategorys: Categorys[] = [
new Categorys( new ArmorCategory(
'baihua', 'baihua',
'armor/百花内甲.png', 'armor/百花内甲.png',
[ [
@ -16,7 +20,7 @@ export const armorColorfulCategorys: Categorys[] = [
'BHXDJC', 'BHXDJC',
0.9 0.9
), ),
new Categorys( new ArmorCategory(
'heixi', 'heixi',
'armor/黑犀.png', 'armor/黑犀.png',
[ [
@ -26,7 +30,7 @@ export const armorColorfulCategorys: Categorys[] = [
], ],
'TieBi' 'TieBi'
), ),
new Categorys( new ArmorCategory(
'guiwen', 'guiwen',
'armor/龟纹铠.png', 'armor/龟纹铠.png',
[ [
@ -36,7 +40,7 @@ export const armorColorfulCategorys: Categorys[] = [
], ],
'DuJunQianNeng' 'DuJunQianNeng'
), ),
new Categorys( new ArmorCategory(
'wuxing', 'wuxing',
'armor/五行压贴.png', 'armor/五行压贴.png',
[ [
@ -46,7 +50,7 @@ export const armorColorfulCategorys: Categorys[] = [
], ],
'JinGuangHuShen' 'JinGuangHuShen'
), ),
new Categorys( new ArmorCategory(
'guimen', 'guimen',
'armor/鬼门甲.png', 'armor/鬼门甲.png',
[ [
@ -57,61 +61,61 @@ export const armorColorfulCategorys: Categorys[] = [
), ),
]; ];
export const armorUniqueCategorys: Categorys[] = [ export const armorUniqueCategorys: ArmorCategory[] = [
new Categorys('dispute', 'U_Armor01.png', [ new ArmorCategory('dispute', 'U_Armor01.png', [
{ type: 'def', valCoefficient: 1.0 }, { type: 'def', valCoefficient: 1.0 },
{ type: 'hp', valCoefficient: 1.4 }, { type: 'hp', valCoefficient: 1.4 },
{ type: 'atk', valCoefficient: 1.4 }, { type: 'atk', valCoefficient: 1.4 },
]), ]),
new Categorys('jianHao', 'U_Armor02.png', [ new ArmorCategory('jianHao', 'U_Armor02.png', [
{ type: 'def', valCoefficient: 2.1 }, { type: 'def', valCoefficient: 2.1 },
{ type: 'hp', valCoefficient: 2.6 }, { type: 'hp', valCoefficient: 2.6 },
]), ]),
new Categorys('samurai', 'U_Armor03.png', [ new ArmorCategory('samurai', 'U_Armor03.png', [
{ type: 'def', valCoefficient: 1.3 }, { type: 'def', valCoefficient: 1.3 },
{ type: 'hp', valCoefficient: 1.7 }, { type: 'hp', valCoefficient: 1.7 },
{ type: 'atk', valCoefficient: 0.9 }, { type: 'atk', valCoefficient: 0.9 },
]), ]),
new Categorys('trackers', 'U_Armor04.png', [ new ArmorCategory('trackers', 'U_Armor04.png', [
{ type: 'def', valCoefficient: 0.9 }, { type: 'def', valCoefficient: 0.9 },
{ type: 'critDmg', valCoefficient: 1.7 }, { type: 'critDmg', valCoefficient: 1.7 },
{ type: 'atk', valCoefficient: 1.7 }, { type: 'atk', valCoefficient: 1.7 },
]), ]),
new Categorys('rongYi', 'U_Armor05.png', [ new ArmorCategory('rongYi', 'U_Armor05.png', [
{ type: 'hp', valCoefficient: 1.6 }, { type: 'hp', valCoefficient: 1.6 },
{ type: 'atk', valCoefficient: 2.4 }, { type: 'atk', valCoefficient: 2.4 },
{ type: 'bloc', valCoefficient: 1.2 }, { type: 'bloc', valCoefficient: 1.2 },
]), ]),
new Categorys('nightwear', 'U_Armor06.png', [ new ArmorCategory('nightwear', 'U_Armor06.png', [
{ type: 'def', valCoefficient: 1.2 }, { type: 'def', valCoefficient: 1.2 },
{ type: 'hp', valCoefficient: 1.5 }, { type: 'hp', valCoefficient: 1.5 },
{ type: 'atk', valCoefficient: 1.2 }, { type: 'atk', valCoefficient: 1.2 },
]), ]),
new Categorys('wildDragon', 'U_Armor07.png', [ new ArmorCategory('wildDragon', 'U_Armor07.png', [
{ type: 'def', valCoefficient: 1.5 }, { type: 'def', valCoefficient: 1.5 },
{ type: 'bloc', valCoefficient: 1.2 }, { type: 'bloc', valCoefficient: 1.2 },
{ type: 'hp', valCoefficient: 1.4 }, { type: 'hp', valCoefficient: 1.4 },
]), ]),
]; ];
export const armorCategorys: Categorys[] = [ export const armorCategorys: ArmorCategory[] = [
new Categorys('guard', 'A_A2.png', [ new ArmorCategory('guard', 'A_A2.png', [
{ type: 'def', valCoefficient: 2 }, { type: 'def', valCoefficient: 2 },
{ type: 'hp', valCoefficient: 0.6 }, { type: 'hp', valCoefficient: 0.6 },
]), ]),
new Categorys('redWillow', 'A_A3.png', [ new ArmorCategory('redWillow', 'A_A3.png', [
{ type: 'def', valCoefficient: 0.9 }, { type: 'def', valCoefficient: 0.9 },
{ type: 'hp', valCoefficient: 1.2 }, { type: 'hp', valCoefficient: 1.2 },
]), ]),
new Categorys('warrior', 'A_A5.png', [ new ArmorCategory('warrior', 'A_A5.png', [
{ type: 'def', valCoefficient: 1.1 }, { type: 'def', valCoefficient: 1.1 },
{ type: 'hp', valCoefficient: 0.8 }, { type: 'hp', valCoefficient: 0.8 },
]), ]),
new Categorys('lightArmor', 'A_A7.png', [ new ArmorCategory('lightArmor', 'A_A7.png', [
{ type: 'def', valCoefficient: 0.7 }, { type: 'def', valCoefficient: 0.7 },
{ type: 'hp', valCoefficient: 0.5 }, { type: 'hp', valCoefficient: 0.5 },
{ type: 'atk', valCoefficient: 0.5 }, { type: 'atk', valCoefficient: 0.5 },
]), ]),
new Categorys('furryArmor', 'A_A9.png', [ new ArmorCategory('furryArmor', 'A_A9.png', [
{ type: 'def', valCoefficient: 0.8 }, { type: 'def', valCoefficient: 0.8 },
{ type: 'hp', valCoefficient: 0.8 }, { type: 'hp', valCoefficient: 0.8 },
{ type: 'atk', valCoefficient: 0.4 }, { type: 'atk', valCoefficient: 0.4 },
@ -126,10 +130,9 @@ export const initialArmor = () => {
return new Equip(type, 1, qualityBean, base, extraEntry); return new Equip(type, 1, qualityBean, base, extraEntry);
}; };
export const createArmor = (quality, lv) => { export const createarmor = (quality, lv, category) => {
const type = 'armor'; const type = 'armor';
const qualityBean = new Quality(quality, coefficient[quality]); const qualityBean = new Quality(quality, coefficient[quality]);
const category = getCategory(quality, armorCategorys, armorUniqueCategorys, armorColorfulCategorys);
const base = createBase(quality, lv, category, coefficient); const base = createBase(quality, lv, category, coefficient);
const extraEntry = new Array(); const extraEntry = new Array();
const extraEntryNum = extra_entry_num[quality]; const extraEntryNum = extra_entry_num[quality];

20
src/config/equips/base.ts

@ -1,23 +1,5 @@
import { Categorys, Equip, EquipBase, Quality } from './bean'; import { Categorys, Equip, EquipBase, Quality } from './bean';
import { entry_initor, qualitys } from './constant'; import { entry_initor, extra_entry_num, qualitys } from './constant';
export const getCategory = (quality, categorys: Categorys[], uniqueCategorys: Categorys[], colorfulCategorys: Categorys[]) => {
switch (quality) {
case qualitys[4]:
categorys = uniqueCategorys;
break;
case qualitys[5]:
categorys = colorfulCategorys;
break;
}
while (true) {
const category = categorys[Math.floor(Math.random() * categorys.length)];
if (category.reRoll > 0 && Math.random() < category.reRoll) {
continue;
}
return category;
}
};
export const createBase = (quality, lv, category, coefficient) => { export const createBase = (quality, lv, category, coefficient) => {
const entry = new Array(); const entry = new Array();

3
src/config/equips/bean.ts

@ -63,7 +63,8 @@ export class Equip {
} }
} }
export class Categorys { export abstract class Categorys {
abstract type: string;
name: string; name: string;
icon: string; icon: string;
entry: any[]; entry: any[];

40
src/config/equips/bracers.ts

@ -1,4 +1,4 @@
import { getCategory, createExtraEntry, createBase, createSamples } from './base'; import { createExtraEntry, createBase, createSamples } from './base';
import { Entry, Quality, EquipBase, Equip, Categorys } from './bean'; import { Entry, Quality, EquipBase, Equip, Categorys } from './bean';
import { qualitys, extra_entry_num } from './constant'; import { qualitys, extra_entry_num } from './constant';
@ -6,8 +6,11 @@ const extraEntrys = ['atk', 'crit', 'critDmg', 'hp', 'def', 'atkPercent', 'defPe
const coefficient = { shabby: 0.6, ordinary: 0.9, artifact: 1.3, epic: 1.6, unique: 1.8, colorful: 1.8 }; const coefficient = { shabby: 0.6, ordinary: 0.9, artifact: 1.3, epic: 1.6, unique: 1.8, colorful: 1.8 };
class BracersCategory extends Categorys {
type: string = 'bracers';
}
export const bracersColorfulCategorys: Categorys[] = [ export const bracersColorfulCategorys: Categorys[] = [
new Categorys( new BracersCategory(
'limao', 'limao',
'bracers/狸猫足印.png', 'bracers/狸猫足印.png',
[ [
@ -18,7 +21,7 @@ export const bracersColorfulCategorys: Categorys[] = [
'LiZhao', 'LiZhao',
0.8 0.8
), ),
new Categorys( new BracersCategory(
'dushe', 'dushe',
'bracers/毒蛇.png', 'bracers/毒蛇.png',
[ [
@ -29,7 +32,7 @@ export const bracersColorfulCategorys: Categorys[] = [
'JuDu', 'JuDu',
0.5 0.5
), ),
new Categorys( new BracersCategory(
'xianglong', 'xianglong',
'bracers/降龙.png', 'bracers/降龙.png',
[ [
@ -40,7 +43,7 @@ export const bracersColorfulCategorys: Categorys[] = [
'Xianglong', 'Xianglong',
0.1 0.1
), ),
new Categorys( new BracersCategory(
'huojing', 'huojing',
'bracers/火晶环.png', 'bracers/火晶环.png',
[ [
@ -49,7 +52,7 @@ export const bracersColorfulCategorys: Categorys[] = [
], ],
'DaLiDan' 'DaLiDan'
), ),
new Categorys('xingjia', 'bracers/刑枷.png', [ new BracersCategory('xingjia', 'bracers/刑枷.png', [
{ type: 'atkPercent', valCoefficient: 1 }, { type: 'atkPercent', valCoefficient: 1 },
{ type: 'critDmg', valCoefficient: 1.2 }, { type: 'critDmg', valCoefficient: 1.2 },
{ type: 'crit', valCoefficient: 1.2 }, { type: 'crit', valCoefficient: 1.2 },
@ -58,49 +61,49 @@ export const bracersColorfulCategorys: Categorys[] = [
{ type: 'def', valCoefficient: 1.2 }, { type: 'def', valCoefficient: 1.2 },
]), ]),
]; ];
export const bracersUniqueCategorys: Categorys[] = [ export const bracersUniqueCategorys: BracersCategory[] = [
new Categorys('duoqing', 'bracers/多情腕.png', [ new BracersCategory('duoqing', 'bracers/多情腕.png', [
{ type: 'atk', valCoefficient: 1 }, { type: 'atk', valCoefficient: 1 },
{ type: 'hp', valCoefficient: 0.8 }, { type: 'hp', valCoefficient: 0.8 },
{ type: 'def', valCoefficient: 0.9 }, { type: 'def', valCoefficient: 0.9 },
]), ]),
new Categorys('wano', 'bracers/玩藕.png', [ new BracersCategory('wano', 'bracers/玩藕.png', [
{ type: 'critDmg', valCoefficient: 1.5 }, { type: 'critDmg', valCoefficient: 1.5 },
{ type: 'crit', valCoefficient: 0.5 }, { type: 'crit', valCoefficient: 0.5 },
{ type: 'atk', valCoefficient: 0.8 }, { type: 'atk', valCoefficient: 0.8 },
]), ]),
new Categorys('rsggu', 'bracers/人参果裹布.png', [ new BracersCategory('rsggu', 'bracers/人参果裹布.png', [
{ type: 'critDmg', valCoefficient: 1.2 }, { type: 'critDmg', valCoefficient: 1.2 },
{ type: 'atkPercent', valCoefficient: 1 }, { type: 'atkPercent', valCoefficient: 1 },
{ type: 'atk', valCoefficient: 0.7 }, { type: 'atk', valCoefficient: 0.7 },
]), ]),
new Categorys('yingwu', 'bracers/鹦鹉杯.png', [ new BracersCategory('yingwu', 'bracers/鹦鹉杯.png', [
{ type: 'critDmg', valCoefficient: 1.6 }, { type: 'critDmg', valCoefficient: 1.6 },
{ type: 'atk', valCoefficient: 1.6 }, { type: 'atk', valCoefficient: 1.6 },
]), ]),
new Categorys('meipusa', 'bracers/美菩萨.png', [ new BracersCategory('meipusa', 'bracers/美菩萨.png', [
{ type: 'atkPercent', valCoefficient: 1 }, { type: 'atkPercent', valCoefficient: 1 },
{ type: 'def', valCoefficient: 0.9 }, { type: 'def', valCoefficient: 0.9 },
{ type: 'hp', valCoefficient: 1.2 }, { type: 'hp', valCoefficient: 1.2 },
]), ]),
]; ];
export const bracersCategorys: Categorys[] = [ export const bracersCategorys: BracersCategory[] = [
new Categorys('guoshi', 'bracers/裹尸布.png', [ new BracersCategory('guoshi', 'bracers/裹尸布.png', [
{ type: 'def', valCoefficient: 0.9 }, { type: 'def', valCoefficient: 0.9 },
{ type: 'hp', valCoefficient: 0.6 }, { type: 'hp', valCoefficient: 0.6 },
{ type: 'atk', valCoefficient: 0.5 }, { type: 'atk', valCoefficient: 0.5 },
]), ]),
new Categorys('xiuyugu', 'bracers/绣与骨.png', [ new BracersCategory('xiuyugu', 'bracers/绣与骨.png', [
{ type: 'crit', valCoefficient: 1.1 }, { type: 'crit', valCoefficient: 1.1 },
{ type: 'hp', valCoefficient: 0.5 }, { type: 'hp', valCoefficient: 0.5 },
{ type: 'atk', valCoefficient: 0.6 }, { type: 'atk', valCoefficient: 0.6 },
]), ]),
new Categorys('huoshen', 'bracers/火神腕.png', [ new BracersCategory('huoshen', 'bracers/火神腕.png', [
{ type: 'crit', valCoefficient: 1.1 }, { type: 'crit', valCoefficient: 1.1 },
{ type: 'hp', valCoefficient: 0.6 }, { type: 'hp', valCoefficient: 0.6 },
{ type: 'atk', valCoefficient: 0.5 }, { type: 'atk', valCoefficient: 0.5 },
]), ]),
new Categorys('heishou', 'bracers/黑手.png', [ new BracersCategory('heishou', 'bracers/黑手.png', [
{ type: 'crit', valCoefficient: 0.75 }, { type: 'crit', valCoefficient: 0.75 },
{ type: 'critDmg', valCoefficient: 0.5 }, { type: 'critDmg', valCoefficient: 0.5 },
{ type: 'hp', valCoefficient: 0.5 }, { type: 'hp', valCoefficient: 0.5 },
@ -115,10 +118,9 @@ export const initialbracers = () => {
return new Equip(type, 1, qualityBean, base, extraEntry); return new Equip(type, 1, qualityBean, base, extraEntry);
}; };
export const createbracers = (quality, lv): Equip => { export const createbracers = (quality, lv, category): Equip => {
const type = 'bracers'; const type = 'bracers';
const qualityBean = new Quality(quality, coefficient[quality]); const qualityBean = new Quality(quality, coefficient[quality]);
const category = getCategory(quality, bracersCategorys, bracersUniqueCategorys, bracersColorfulCategorys);
const base = createBase(quality, lv, category, coefficient); const base = createBase(quality, lv, category, coefficient);
const extraEntry = new Array(); const extraEntry = new Array();
const extraEntryNum = extra_entry_num[quality]; const extraEntryNum = extra_entry_num[quality];

43
src/config/equips/jewelry.ts

@ -1,4 +1,4 @@
import { getCategory, createExtraEntry, createBase, createSamples } from './base'; import { createExtraEntry, createBase, createSamples } from './base';
import { Entry, Quality, EquipBase, Equip, Categorys } from './bean'; import { Entry, Quality, EquipBase, Equip, Categorys } from './bean';
import { qualitys, extra_entry_num } from './constant'; import { qualitys, extra_entry_num } from './constant';
@ -6,8 +6,12 @@ const extraEntrys = ['atk', 'crit', 'critDmg', 'hp', 'def', 'dmgPercent'];
const coefficient = { shabby: 0.6, ordinary: 0.9, artifact: 1.3, epic: 1.6, unique: 1.8, colorful: 1.8 }; const coefficient = { shabby: 0.6, ordinary: 0.9, artifact: 1.3, epic: 1.6, unique: 1.8, colorful: 1.8 };
class JewelryCategory extends Categorys {
type: string = 'jewelry';
}
export const jewelryColorfulCategorys: Categorys[] = [ export const jewelryColorfulCategorys: Categorys[] = [
new Categorys( new JewelryCategory(
'youerhuan', 'youerhuan',
'jewelry/白骨夫人的右耳环.png', 'jewelry/白骨夫人的右耳环.png',
[ [
@ -18,7 +22,7 @@ export const jewelryColorfulCategorys: Categorys[] = [
'Vampire1', 'Vampire1',
0.9 0.9
), ),
new Categorys( new JewelryCategory(
'shuzhuang', 'shuzhuang',
'jewelry/梳妆镜.png', 'jewelry/梳妆镜.png',
[ [
@ -29,7 +33,7 @@ export const jewelryColorfulCategorys: Categorys[] = [
'JHSY', 'JHSY',
0.8 0.8
), ),
new Categorys( new JewelryCategory(
'liulipan', 'liulipan',
'jewelry/琉璃盘.png', 'jewelry/琉璃盘.png',
[ [
@ -39,7 +43,7 @@ export const jewelryColorfulCategorys: Categorys[] = [
], ],
'Liulipan' 'Liulipan'
), ),
new Categorys( new JewelryCategory(
'ghdp', 'ghdp',
'jewelry/勾魂夺魂.png', 'jewelry/勾魂夺魂.png',
[ [
@ -49,7 +53,7 @@ export const jewelryColorfulCategorys: Categorys[] = [
], ],
'CritFear' 'CritFear'
), ),
new Categorys( new JewelryCategory(
'jingboyu', 'jingboyu',
'jewelry/金钵盂.png', 'jewelry/金钵盂.png',
[ [
@ -59,7 +63,7 @@ export const jewelryColorfulCategorys: Categorys[] = [
], ],
'Prototype' 'Prototype'
), ),
new Categorys( new JewelryCategory(
'zijingboyu', 'zijingboyu',
'jewelry/紫金钵盂.png', 'jewelry/紫金钵盂.png',
[ [
@ -70,49 +74,49 @@ export const jewelryColorfulCategorys: Categorys[] = [
'Fate' 'Fate'
), ),
]; ];
export const jewelryUniqueCategorys: Categorys[] = [ export const jewelryUniqueCategorys: JewelryCategory[] = [
new Categorys('hanjing', 'jewelry/寒晶佩.png', [ new JewelryCategory('hanjing', 'jewelry/寒晶佩.png', [
{ type: 'atk', valCoefficient: 1 }, { type: 'atk', valCoefficient: 1 },
{ type: 'hp', valCoefficient: 0.8 }, { type: 'hp', valCoefficient: 0.8 },
{ type: 'def', valCoefficient: 0.9 }, { type: 'def', valCoefficient: 0.9 },
]), ]),
new Categorys('ylhm', 'jewelry/月灵幻梦.png', [ new JewelryCategory('ylhm', 'jewelry/月灵幻梦.png', [
{ type: 'critDmg', valCoefficient: 1.5 }, { type: 'critDmg', valCoefficient: 1.5 },
{ type: 'crit', valCoefficient: 0.5 }, { type: 'crit', valCoefficient: 0.5 },
{ type: 'atk', valCoefficient: 0.8 }, { type: 'atk', valCoefficient: 0.8 },
]), ]),
new Categorys('liangren', 'jewelry/良人.png', [ new JewelryCategory('liangren', 'jewelry/良人.png', [
{ type: 'critDmg', valCoefficient: 1.2 }, { type: 'critDmg', valCoefficient: 1.2 },
{ type: 'dmgPercent', valCoefficient: 0.5 }, { type: 'dmgPercent', valCoefficient: 0.5 },
{ type: 'atk', valCoefficient: 0.7 }, { type: 'atk', valCoefficient: 0.7 },
]), ]),
new Categorys('duzhan', 'jewelry/督战.png', [ new JewelryCategory('duzhan', 'jewelry/督战.png', [
{ type: 'critDmg', valCoefficient: 1.6 }, { type: 'critDmg', valCoefficient: 1.6 },
{ type: 'atk', valCoefficient: 1.6 }, { type: 'atk', valCoefficient: 1.6 },
]), ]),
new Categorys('cltx', 'jewelry/赤羚天禧.png', [ new JewelryCategory('cltx', 'jewelry/赤羚天禧.png', [
{ type: 'dmgPercent', valCoefficient: 0.6 }, { type: 'dmgPercent', valCoefficient: 0.6 },
{ type: 'def', valCoefficient: 0.9 }, { type: 'def', valCoefficient: 0.9 },
{ type: 'hp', valCoefficient: 1.2 }, { type: 'hp', valCoefficient: 1.2 },
]), ]),
]; ];
export const jewelryCategorys: Categorys[] = [ export const jewelryCategorys: JewelryCategory[] = [
new Categorys('weihun', 'jewelry/未婚.png', [ new JewelryCategory('weihun', 'jewelry/未婚.png', [
{ type: 'def', valCoefficient: 0.9 }, { type: 'def', valCoefficient: 0.9 },
{ type: 'hp', valCoefficient: 0.6 }, { type: 'hp', valCoefficient: 0.6 },
{ type: 'atk', valCoefficient: 0.5 }, { type: 'atk', valCoefficient: 0.5 },
]), ]),
new Categorys('huangyan', 'jewelry/谎言.png', [ new JewelryCategory('huangyan', 'jewelry/谎言.png', [
{ type: 'crit', valCoefficient: 1.1 }, { type: 'crit', valCoefficient: 1.1 },
{ type: 'hp', valCoefficient: 0.5 }, { type: 'hp', valCoefficient: 0.5 },
{ type: 'atk', valCoefficient: 0.6 }, { type: 'atk', valCoefficient: 0.6 },
]), ]),
new Categorys('zhenjing', 'jewelry/真经.png', [ new JewelryCategory('zhenjing', 'jewelry/真经.png', [
{ type: 'crit', valCoefficient: 1.1 }, { type: 'crit', valCoefficient: 1.1 },
{ type: 'hp', valCoefficient: 0.6 }, { type: 'hp', valCoefficient: 0.6 },
{ type: 'atk', valCoefficient: 0.5 }, { type: 'atk', valCoefficient: 0.5 },
]), ]),
new Categorys('maming', 'jewelry/马鸣玉佩.png', [ new JewelryCategory('maming', 'jewelry/马鸣玉佩.png', [
{ type: 'crit', valCoefficient: 0.75 }, { type: 'crit', valCoefficient: 0.75 },
{ type: 'critDmg', valCoefficient: 0.5 }, { type: 'critDmg', valCoefficient: 0.5 },
{ type: 'hp', valCoefficient: 0.5 }, { type: 'hp', valCoefficient: 0.5 },
@ -127,10 +131,9 @@ export const initialJewelry = () => {
return new Equip(type, 1, qualityBean, base, extraEntry); return new Equip(type, 1, qualityBean, base, extraEntry);
}; };
export const createJewelry = (quality, lv): Equip => { export const createjewelry = (quality, lv, category): Equip => {
const type = 'jewelry'; const type = 'jewelry';
const qualityBean = new Quality(quality, coefficient[quality]); const qualityBean = new Quality(quality, coefficient[quality]);
const category = getCategory(quality, jewelryCategorys, jewelryUniqueCategorys, jewelryColorfulCategorys);
const base = createBase(quality, lv, category, coefficient); const base = createBase(quality, lv, category, coefficient);
const extraEntry = new Array(); const extraEntry = new Array();
const extraEntryNum = extra_entry_num[quality]; const extraEntryNum = extra_entry_num[quality];

39
src/config/equips/neck.ts

@ -1,4 +1,4 @@
import { getCategory, createExtraEntry, createBase, createSamples } from './base'; import { createExtraEntry, createBase, createSamples } from './base';
import { Entry, Quality, EquipBase, Equip, Categorys } from './bean'; import { Entry, Quality, EquipBase, Equip, Categorys } from './bean';
import { qualitys, extra_entry_num } from './constant'; import { qualitys, extra_entry_num } from './constant';
@ -6,8 +6,12 @@ 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 }; const coefficient = { shabby: 0.6, ordinary: 0.9, artifact: 1.3, epic: 1.6, unique: 1.8, colorful: 1.8 };
class NeckCategory extends Categorys {
type: string = 'neck';
}
export const neckColorfulCategorys: Categorys[] = [ export const neckColorfulCategorys: Categorys[] = [
new Categorys( new NeckCategory(
'duanji', 'duanji',
'neck/断·极.png', 'neck/断·极.png',
[ [
@ -17,7 +21,7 @@ export const neckColorfulCategorys: Categorys[] = [
], ],
'Duan' 'Duan'
), ),
new Categorys( new NeckCategory(
'hushi', 'hushi',
'neck/虎视.png', 'neck/虎视.png',
[ [
@ -26,7 +30,7 @@ export const neckColorfulCategorys: Categorys[] = [
], ],
'NuMu' 'NuMu'
), ),
new Categorys( new NeckCategory(
'xuenu', 'xuenu',
'neck/血怒.png', 'neck/血怒.png',
[ [
@ -35,7 +39,7 @@ export const neckColorfulCategorys: Categorys[] = [
], ],
'HongYan' 'HongYan'
), ),
new Categorys( new NeckCategory(
'guiyan', 'guiyan',
'neck/鬼眼.png', 'neck/鬼眼.png',
[ [
@ -45,47 +49,47 @@ export const neckColorfulCategorys: Categorys[] = [
], ],
'ShaYi' 'ShaYi'
), ),
new Categorys('longteng', 'neck/龙腾护心镜.png', [{ type: 'hp', valCoefficient: 3 }], 'LongTeng'), new NeckCategory('longteng', 'neck/龙腾护心镜.png', [{ type: 'hp', valCoefficient: 3 }], 'LongTeng'),
]; ];
export const neckUniqueCategorys: Categorys[] = [ export const neckUniqueCategorys: NeckCategory[] = [
new Categorys('demonSlayer', 'U_neck01.png', [ new NeckCategory('demonSlayer', 'U_neck01.png', [
{ type: 'atk', valCoefficient: 1.0 }, { type: 'atk', valCoefficient: 1.0 },
{ type: 'hp', valCoefficient: 0.8 }, { type: 'hp', valCoefficient: 0.8 },
{ type: 'def', valCoefficient: 0.9 }, { type: 'def', valCoefficient: 0.9 },
]), ]),
new Categorys('darkDragon', 'U_neck02.png', [ new NeckCategory('darkDragon', 'U_neck02.png', [
{ type: 'critDmg', valCoefficient: 1.5 }, { type: 'critDmg', valCoefficient: 1.5 },
{ type: 'crit', valCoefficient: 0.5 }, { type: 'crit', valCoefficient: 0.5 },
{ type: 'hp', valCoefficient: 0.8 }, { type: 'hp', valCoefficient: 0.8 },
]), ]),
new Categorys('single', 'U_neck03.png', [ new NeckCategory('single', 'U_neck03.png', [
{ type: 'critDmg', valCoefficient: 1.5 }, { type: 'critDmg', valCoefficient: 1.5 },
{ type: 'bloc', valCoefficient: 0.7 }, { type: 'bloc', valCoefficient: 0.7 },
{ type: 'hp', valCoefficient: 0.7 }, { type: 'hp', valCoefficient: 0.7 },
]), ]),
new Categorys('demons', 'U_neck04.png', [ new NeckCategory('demons', 'U_neck04.png', [
{ type: 'critDmg', valCoefficient: 1.6 }, { type: 'critDmg', valCoefficient: 1.6 },
{ type: 'atk', valCoefficient: 1.6 }, { type: 'atk', valCoefficient: 1.6 },
]), ]),
new Categorys('ipaya', 'U_neck05.png', [ new NeckCategory('ipaya', 'U_neck05.png', [
{ type: 'bloc', valCoefficient: 0.9 }, { type: 'bloc', valCoefficient: 0.9 },
{ type: 'def', valCoefficient: 0.9 }, { type: 'def', valCoefficient: 0.9 },
{ type: 'hp', valCoefficient: 1.3 }, { type: 'hp', valCoefficient: 1.3 },
]), ]),
]; ];
export const neckCategorys: Categorys[] = [ export const neckCategorys: NeckCategory[] = [
new Categorys('crusade', 'Ac_1.png', [ new NeckCategory('crusade', 'Ac_1.png', [
{ type: 'def', valCoefficient: 0.9 }, { type: 'def', valCoefficient: 0.9 },
{ type: 'hp', valCoefficient: 0.5 }, { type: 'hp', valCoefficient: 0.5 },
{ type: 'bloc', valCoefficient: 0.6 }, { type: 'bloc', valCoefficient: 0.6 },
]), ]),
new Categorys('gintamaEyes', 'Ac_5.png', [ new NeckCategory('gintamaEyes', 'Ac_5.png', [
{ type: 'crit', valCoefficient: 1.1 }, { type: 'crit', valCoefficient: 1.1 },
{ type: 'hp', valCoefficient: 0.5 }, { type: 'hp', valCoefficient: 0.5 },
{ type: 'atk', valCoefficient: 0.6 }, { type: 'atk', valCoefficient: 0.6 },
]), ]),
new Categorys('iceDragon', 'Ac_7.png', [ new NeckCategory('iceDragon', 'Ac_7.png', [
{ type: 'crit', valCoefficient: 0.75 }, { type: 'crit', valCoefficient: 0.75 },
{ type: 'critDmg', valCoefficient: 0.5 }, { type: 'critDmg', valCoefficient: 0.5 },
{ type: 'hp', valCoefficient: 0.5 }, { type: 'hp', valCoefficient: 0.5 },
@ -100,10 +104,9 @@ export const initialNeck = () => {
return new Equip(type, 1, qualityBean, base, extraEntry); return new Equip(type, 1, qualityBean, base, extraEntry);
}; };
export const createNeck = (quality, lv) => { export const createneck = (quality, lv, category) => {
const type = 'neck'; const type = 'neck';
const qualityBean = new Quality(quality, coefficient[quality]); const qualityBean = new Quality(quality, coefficient[quality]);
const category = getCategory(quality, neckCategorys, neckUniqueCategorys, neckColorfulCategorys);
const base = createBase(quality, lv, category, coefficient); const base = createBase(quality, lv, category, coefficient);
const extraEntry = new Array(); const extraEntry = new Array();
const extraEntryNum = extra_entry_num[quality]; const extraEntryNum = extra_entry_num[quality];

39
src/config/equips/pants.ts

@ -1,11 +1,15 @@
import { getCategory, createExtraEntry, createBase, createSamples } from './base'; import { createExtraEntry, createBase, createSamples } from './base';
import { Entry, Quality, EquipBase, Equip, Categorys } from './bean'; import { Entry, Quality, EquipBase, Equip, Categorys } from './bean';
import { qualitys, extra_entry_num } from './constant'; import { qualitys, extra_entry_num } from './constant';
const extraEntrys = ['atk', 'hp', 'def', 'defPercent', 'hpPercent', 'dmgReduc', 'critAvoid', 'critDmgReduc']; 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 }; const coefficient = { shabby: 0.7, ordinary: 1, artifact: 1.5, epic: 1.8, unique: 2, colorful: 2 };
class PantsCategory extends Categorys {
type: string = 'pants';
}
export const pantsColorfulCategorys: Categorys[] = [ export const pantsColorfulCategorys: Categorys[] = [
new Categorys( new PantsCategory(
'guijia', 'guijia',
'pants/鬼甲.png', 'pants/鬼甲.png',
[ [
@ -16,7 +20,7 @@ export const pantsColorfulCategorys: Categorys[] = [
'KongBuLingYu', 'KongBuLingYu',
0.98 0.98
), ),
new Categorys( new PantsCategory(
'baizhequn', 'baizhequn',
'pants/奎英的百褶裙.png', 'pants/奎英的百褶裙.png',
[ [
@ -26,7 +30,7 @@ export const pantsColorfulCategorys: Categorys[] = [
], ],
'FuRenBiHu' 'FuRenBiHu'
), ),
new Categorys( new PantsCategory(
'yulan', 'yulan',
'pants/鱼篮.png', 'pants/鱼篮.png',
[ [
@ -36,7 +40,7 @@ export const pantsColorfulCategorys: Categorys[] = [
], ],
'LingGan' 'LingGan'
), ),
new Categorys( new PantsCategory(
'qiutu', 'qiutu',
'pants/囚徒.png', 'pants/囚徒.png',
[ [
@ -45,7 +49,7 @@ export const pantsColorfulCategorys: Categorys[] = [
], ],
'WanKang' 'WanKang'
), ),
new Categorys( new PantsCategory(
'wuwei', 'wuwei',
'pants/五味.png', 'pants/五味.png',
[ [
@ -57,42 +61,42 @@ export const pantsColorfulCategorys: Categorys[] = [
), ),
]; ];
export const pantsUniqueCategorys: Categorys[] = [ export const pantsUniqueCategorys: PantsCategory[] = [
new Categorys('mhlg', 'pants/梦回龙宫.png', [ new PantsCategory('mhlg', 'pants/梦回龙宫.png', [
{ type: 'def', valCoefficient: 2 }, { type: 'def', valCoefficient: 2 },
{ type: 'hp', valCoefficient: 2.8 }, { type: 'hp', valCoefficient: 2.8 },
]), ]),
new Categorys('longlin', 'pants/龙鳞胫甲.png', [ new PantsCategory('longlin', 'pants/龙鳞胫甲.png', [
{ type: 'def', valCoefficient: 0.9 }, { type: 'def', valCoefficient: 0.9 },
{ type: 'critDmg', valCoefficient: 1.7 }, { type: 'critDmg', valCoefficient: 1.7 },
{ type: 'atk', valCoefficient: 1.7 }, { type: 'atk', valCoefficient: 1.7 },
]), ]),
new Categorys('cangjing', 'pants/藏经甲.png', [ new PantsCategory('cangjing', 'pants/藏经甲.png', [
{ type: 'def', valCoefficient: 1.5 }, { type: 'def', valCoefficient: 1.5 },
{ type: 'bloc', valCoefficient: 1.2 }, { type: 'bloc', valCoefficient: 1.2 },
{ type: 'hp', valCoefficient: 1.4 }, { type: 'hp', valCoefficient: 1.4 },
]), ]),
new Categorys('egui', 'pants/饿鬼.png', [ new PantsCategory('egui', 'pants/饿鬼.png', [
{ type: 'def', valCoefficient: 1.2 }, { type: 'def', valCoefficient: 1.2 },
{ type: 'hp', valCoefficient: 1.7 }, { type: 'hp', valCoefficient: 1.7 },
{ type: 'atk', valCoefficient: 1.0 }, { type: 'atk', valCoefficient: 1.0 },
]), ]),
new Categorys('qijia', 'pants/泣甲.png', [ new PantsCategory('qijia', 'pants/泣甲.png', [
{ type: 'hp', valCoefficient: 2 }, { type: 'hp', valCoefficient: 2 },
{ type: 'atk', valCoefficient: 2 }, { type: 'atk', valCoefficient: 2 },
{ type: 'bloc', valCoefficient: 1.2 }, { type: 'bloc', valCoefficient: 1.2 },
]), ]),
]; ];
export const pantsCategorys: Categorys[] = [ export const pantsCategorys: PantsCategory[] = [
new Categorys('kaishulin', 'pants/铠鼠鳞.png', [ new PantsCategory('kaishulin', 'pants/铠鼠鳞.png', [
{ type: 'def', valCoefficient: 2 }, { type: 'def', valCoefficient: 2 },
{ type: 'hp', valCoefficient: 0.6 }, { type: 'hp', valCoefficient: 0.6 },
]), ]),
new Categorys('guanjia', 'pants/管家服.png', [ new PantsCategory('guanjia', 'pants/管家服.png', [
{ type: 'def', valCoefficient: 0.8 }, { type: 'def', valCoefficient: 0.8 },
{ type: 'hp', valCoefficient: 1.8 }, { type: 'hp', valCoefficient: 1.8 },
]), ]),
new Categorys('shengxian', 'pants/升仙.png', [ new PantsCategory('shengxian', 'pants/升仙.png', [
{ type: 'def', valCoefficient: 0.8 }, { type: 'def', valCoefficient: 0.8 },
{ type: 'hp', valCoefficient: 0.8 }, { type: 'hp', valCoefficient: 0.8 },
{ type: 'atk', valCoefficient: 0.8 }, { type: 'atk', valCoefficient: 0.8 },
@ -107,10 +111,9 @@ export const initialpants = () => {
return new Equip(type, 1, qualityBean, base, extraEntry); return new Equip(type, 1, qualityBean, base, extraEntry);
}; };
export const createpants = (quality, lv) => { export const createpants = (quality, lv, category) => {
const type = 'pants'; const type = 'pants';
const qualityBean = new Quality(quality, coefficient[quality]); const qualityBean = new Quality(quality, coefficient[quality]);
const category = getCategory(quality, pantsCategorys, pantsUniqueCategorys, pantsColorfulCategorys);
const base = createBase(quality, lv, category, coefficient); const base = createBase(quality, lv, category, coefficient);
const extraEntry = new Array(); const extraEntry = new Array();
const extraEntryNum = extra_entry_num[quality]; const extraEntryNum = extra_entry_num[quality];

37
src/config/equips/ring.ts

@ -1,4 +1,4 @@
import { getCategory, createExtraEntry, createBase, createSamples } from './base'; import { createExtraEntry, createBase, createSamples } from './base';
import { Entry, Quality, EquipBase, Equip, Categorys } from './bean'; import { Entry, Quality, EquipBase, Equip, Categorys } from './bean';
import { qualitys, extra_entry_num } from './constant'; import { qualitys, extra_entry_num } from './constant';
@ -6,8 +6,12 @@ const extraEntrys = ['atk', 'crit', 'critDmg', 'hp', 'def'];
const coefficient = { shabby: 0.6, ordinary: 0.9, artifact: 1.3, epic: 1.6, unique: 1.8, colorful: 2 }; 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[] = [ export const ringColorfulCategorys: Categorys[] = [
new Categorys( new RingCategory(
'jingangzhuo', 'jingangzhuo',
'ring/金刚琢.png', 'ring/金刚琢.png',
[ [
@ -18,7 +22,7 @@ export const ringColorfulCategorys: Categorys[] = [
'SLWX,JinGangZhuo', 'SLWX,JinGangZhuo',
0.9 0.9
), ),
new Categorys( new RingCategory(
'pojie', 'pojie',
'ring/破戒.png', 'ring/破戒.png',
[ [
@ -28,7 +32,7 @@ export const ringColorfulCategorys: Categorys[] = [
], ],
'FengXie' 'FengXie'
), ),
new Categorys( new RingCategory(
'mantanghong', 'mantanghong',
'ring/满堂红.png', 'ring/满堂红.png',
[ [
@ -38,7 +42,7 @@ export const ringColorfulCategorys: Categorys[] = [
], ],
'ShiZhong' 'ShiZhong'
), ),
new Categorys( new RingCategory(
'hanba', 'hanba',
'ring/旱魃.png', 'ring/旱魃.png',
[ [
@ -48,7 +52,7 @@ export const ringColorfulCategorys: Categorys[] = [
], ],
'ShenShang' 'ShenShang'
), ),
new Categorys( new RingCategory(
'yaozuzhili', 'yaozuzhili',
'ring/妖族之力.png', 'ring/妖族之力.png',
[ [
@ -61,38 +65,38 @@ export const ringColorfulCategorys: Categorys[] = [
), ),
]; ];
export const ringUniqueCategorys: Categorys[] = [ export const ringUniqueCategorys: RingCategory[] = [
new Categorys('death', 'U_ring01.png', [ new RingCategory('death', 'U_ring01.png', [
{ type: 'crit', valCoefficient: 1 }, { type: 'crit', valCoefficient: 1 },
{ type: 'critDmg', valCoefficient: 0.5 }, { type: 'critDmg', valCoefficient: 0.5 },
{ type: 'hp', valCoefficient: 0.8 }, { type: 'hp', valCoefficient: 0.8 },
]), ]),
new Categorys('realFurryRing', 'U_ring02.png', [ new RingCategory('realFurryRing', 'U_ring02.png', [
{ type: 'critDmg', valCoefficient: 1.2 }, { type: 'critDmg', valCoefficient: 1.2 },
{ type: 'crit', valCoefficient: 0.5 }, { type: 'crit', valCoefficient: 0.5 },
{ type: 'atk', valCoefficient: 0.7 }, { type: 'atk', valCoefficient: 0.7 },
]), ]),
new Categorys('pioneer', 'U_ring03.png', [ new RingCategory('pioneer', 'U_ring03.png', [
{ type: 'critDmg', valCoefficient: 1 }, { type: 'critDmg', valCoefficient: 1 },
{ type: 'crit', valCoefficient: 0.5 }, { type: 'crit', valCoefficient: 0.5 },
{ type: 'hp', valCoefficient: 0.7 }, { type: 'hp', valCoefficient: 0.7 },
]), ]),
new Categorys('susan', 'U_ring04.png', [ new RingCategory('susan', 'U_ring04.png', [
{ type: 'critDmg', valCoefficient: 1.6 }, { type: 'critDmg', valCoefficient: 1.6 },
{ type: 'atk', valCoefficient: 1.1 }, { type: 'atk', valCoefficient: 1.1 },
]), ]),
new Categorys('moonlight', 'U_ring05.png', [ new RingCategory('moonlight', 'U_ring05.png', [
{ type: 'critDmg', valCoefficient: 1.5 }, { type: 'critDmg', valCoefficient: 1.5 },
{ type: 'hp', valCoefficient: 1.2 }, { type: 'hp', valCoefficient: 1.2 },
]), ]),
]; ];
export const ringCategorys = [ export const ringCategorys = [
new Categorys('life', 'Ac_9.png', [{ type: 'hp', valCoefficient: 1.5 }]), new RingCategory('life', 'Ac_9.png', [{ type: 'hp', valCoefficient: 1.5 }]),
new Categorys('imperialSoul', 'Ac_10.png', [ new RingCategory('imperialSoul', 'Ac_10.png', [
{ type: 'hp', valCoefficient: 1 }, { type: 'hp', valCoefficient: 1 },
{ type: 'atk', valCoefficient: 0.5 }, { type: 'atk', valCoefficient: 0.5 },
]), ]),
new Categorys('furryRing', 'Ac_11.png', [ new RingCategory('furryRing', 'Ac_11.png', [
{ type: 'hp', valCoefficient: 0.9 }, { type: 'hp', valCoefficient: 0.9 },
{ type: 'atk', valCoefficient: 0.3 }, { type: 'atk', valCoefficient: 0.3 },
{ type: 'crit', valCoefficient: 0.8 }, { type: 'crit', valCoefficient: 0.8 },
@ -107,10 +111,9 @@ export const initialRing = () => {
return new Equip(type, 1, qualityBean, base, extraEntry); return new Equip(type, 1, qualityBean, base, extraEntry);
}; };
export const createRing = (quality, lv) => { export const createring = (quality, lv, category) => {
const type = 'ring'; const type = 'ring';
const qualityBean = new Quality(quality, coefficient[quality]); const qualityBean = new Quality(quality, coefficient[quality]);
const category = getCategory(quality, ringCategorys, ringUniqueCategorys, ringColorfulCategorys);
const base = createBase(quality, lv, category, coefficient); const base = createBase(quality, lv, category, coefficient);
const extraEntry = new Array(); const extraEntry = new Array();
const extraEntryNum = extra_entry_num[quality]; const extraEntryNum = extra_entry_num[quality];

36
src/config/equips/shoes.ts

@ -1,63 +1,68 @@
import { getCategory, createExtraEntry, createBase, createSamples } from './base'; import { createExtraEntry, createBase, createSamples } from './base';
import { Entry, Quality, EquipBase, Equip, Categorys } from './bean'; import { Entry, Quality, EquipBase, Equip, Categorys } from './bean';
import { qualitys, extra_entry_num } from './constant'; import { qualitys, extra_entry_num } from './constant';
const extraEntrys = ['atk', 'hp', 'def', 'moveSpeed', 'dmgReduc']; const extraEntrys = ['atk', 'hp', 'def', 'moveSpeed', 'dmgReduc'];
const coefficient = { shabby: 0.7, ordinary: 1, artifact: 1.3, epic: 1.5, unique: 1.8, colorful: 1.8 }; const coefficient = { shabby: 0.7, ordinary: 1, artifact: 1.3, epic: 1.5, unique: 1.8, colorful: 1.8 };
class ShoesCategory extends Categorys {
type: string = 'shoes';
}
export const shoesColorfulCategorys: Categorys[] = [ export const shoesColorfulCategorys: Categorys[] = [
new Categorys('lingyun', 'shoes/灵韵集能器.png', [ new ShoesCategory('lingyun', 'shoes/灵韵集能器.png', [
{ type: 'moveSpeed', valCoefficient: 1.2 }, { type: 'moveSpeed', valCoefficient: 1.2 },
{ type: 'atk', valCoefficient: 1.8 }, { type: 'atk', valCoefficient: 1.8 },
{ type: 'hp', valCoefficient: 2.2 }, { type: 'hp', valCoefficient: 2.2 },
]), ]),
new Categorys('siben', 'shoes/私奔.png', [ new ShoesCategory('siben', 'shoes/私奔.png', [
{ type: 'moveSpeed', valCoefficient: 2 }, { type: 'moveSpeed', valCoefficient: 2 },
{ type: 'def', valCoefficient: 1.6 }, { type: 'def', valCoefficient: 1.6 },
{ type: 'hp', valCoefficient: 2.4 }, { type: 'hp', valCoefficient: 2.4 },
]), ]),
new Categorys('qxzl', 'shoes/浅夏紫灵.png', [ new ShoesCategory('qxzl', 'shoes/浅夏紫灵.png', [
{ type: 'moveSpeed', valCoefficient: 1.5 }, { type: 'moveSpeed', valCoefficient: 1.5 },
{ type: 'atk', valCoefficient: 1.2 }, { type: 'atk', valCoefficient: 1.2 },
{ type: 'hp', valCoefficient: 2.8 }, { type: 'hp', valCoefficient: 2.8 },
]), ]),
new Categorys('xuedun', 'shoes/血遁靴.png', [ new ShoesCategory('xuedun', 'shoes/血遁靴.png', [
{ type: 'moveSpeed', valCoefficient: 2.8 }, { type: 'moveSpeed', valCoefficient: 2.8 },
{ type: 'hp', valCoefficient: 4 }, { type: 'hp', valCoefficient: 4 },
]), ]),
new Categorys('wajiang', 'shoes/蛙将足.png', [ new ShoesCategory('wajiang', 'shoes/蛙将足.png', [
{ type: 'moveSpeed', valCoefficient: 1.4 }, { type: 'moveSpeed', valCoefficient: 1.4 },
{ type: 'atk', valCoefficient: 1.5 }, { type: 'atk', valCoefficient: 1.5 },
{ type: 'def', valCoefficient: 2.5 }, { type: 'def', valCoefficient: 2.5 },
]), ]),
]; ];
export const shoesUniqueCategorys: Categorys[] = [ export const shoesUniqueCategorys: ShoesCategory[] = [
new Categorys('talang', 'shoes/踏浪.png', [ new ShoesCategory('talang', 'shoes/踏浪.png', [
{ type: 'moveSpeed', valCoefficient: 1.8 }, { type: 'moveSpeed', valCoefficient: 1.8 },
{ type: 'hp', valCoefficient: 1 }, { type: 'hp', valCoefficient: 1 },
{ type: 'atk', valCoefficient: 1.2 }, { type: 'atk', valCoefficient: 1.2 },
]), ]),
new Categorys('jiuwanli', 'shoes/九万里.png', [ new ShoesCategory('jiuwanli', 'shoes/九万里.png', [
{ type: 'moveSpeed', valCoefficient: 1.9 }, { type: 'moveSpeed', valCoefficient: 1.9 },
{ type: 'def', valCoefficient: 1 }, { type: 'def', valCoefficient: 1 },
{ type: 'hp', valCoefficient: 1.2 }, { type: 'hp', valCoefficient: 1.2 },
]), ]),
new Categorys('hongchen', 'shoes/红尘.png', [ new ShoesCategory('hongchen', 'shoes/红尘.png', [
{ type: 'moveSpeed', valCoefficient: 1.2 }, { type: 'moveSpeed', valCoefficient: 1.2 },
{ type: 'def', valCoefficient: 1.5 }, { type: 'def', valCoefficient: 1.5 },
{ type: 'hp', valCoefficient: 1.4 }, { type: 'hp', valCoefficient: 1.4 },
]), ]),
]; ];
export const shoesCategorys: Categorys[] = [ export const shoesCategorys: ShoesCategory[] = [
new Categorys('lingguan', 'shoes/灵官靴.png', [ new ShoesCategory('lingguan', 'shoes/灵官靴.png', [
{ type: 'moveSpeed', valCoefficient: 0.8 }, { type: 'moveSpeed', valCoefficient: 0.8 },
{ type: 'def', valCoefficient: 1.8 }, { type: 'def', valCoefficient: 1.8 },
]), ]),
new Categorys('quanchi', 'shoes/犬齿鞋.png', [ new ShoesCategory('quanchi', 'shoes/犬齿鞋.png', [
{ type: 'moveSpeed', valCoefficient: 0.8 }, { type: 'moveSpeed', valCoefficient: 0.8 },
{ type: 'hp', valCoefficient: 1.8 }, { type: 'hp', valCoefficient: 1.8 },
]), ]),
new Categorys('kunlun', 'shoes/昆仑履.png', [ new ShoesCategory('kunlun', 'shoes/昆仑履.png', [
{ type: 'moveSpeed', valCoefficient: 0.8 }, { type: 'moveSpeed', valCoefficient: 0.8 },
{ type: 'def', valCoefficient: 0.8 }, { type: 'def', valCoefficient: 0.8 },
{ type: 'hp', valCoefficient: 0.8 }, { type: 'hp', valCoefficient: 0.8 },
@ -72,10 +77,9 @@ export const initialshoes = () => {
return new Equip(type, 1, qualityBean, base, extraEntry); return new Equip(type, 1, qualityBean, base, extraEntry);
}; };
export const createshoes = (quality, lv) => { export const createshoes = (quality, lv, category) => {
const type = 'shoes'; const type = 'shoes';
const qualityBean = new Quality(quality, coefficient[quality]); const qualityBean = new Quality(quality, coefficient[quality]);
const category = getCategory(quality, shoesCategorys, shoesUniqueCategorys, shoesColorfulCategorys);
const base = createBase(quality, lv, category, coefficient); const base = createBase(quality, lv, category, coefficient);
const extraEntry = new Array(); const extraEntry = new Array();
const extraEntryNum = extra_entry_num[quality]; const extraEntryNum = extra_entry_num[quality];

49
src/config/equips/weapon.ts

@ -1,12 +1,16 @@
import { getCategory, createExtraEntry, createBase, createSamples } from './base'; import { createExtraEntry, createBase, createSamples } from './base';
import { Entry, Quality, EquipBase, Equip, Categorys } from './bean'; import { Entry, Quality, EquipBase, Equip, Categorys } from './bean';
import { qualitys, extra_entry_num } from './constant'; import { qualitys, extra_entry_num } from './constant';
const extraEntrys = ['atk', 'crit', 'critDmg', 'hp', 'def', 'atkPercent', 'defPercent', 'hpPercent', 'dmgPercent']; const extraEntrys = ['atk', 'crit', 'critDmg', 'hp', 'def', 'atkPercent', 'defPercent', 'hpPercent', 'dmgPercent'];
const coefficient = { shabby: 0.7, ordinary: 1, artifact: 1.5, epic: 1.8, unique: 2, colorful: 2 }; const coefficient = { shabby: 0.7, ordinary: 1, artifact: 1.5, epic: 1.8, unique: 2, colorful: 2 };
class WeaponCategory extends Categorys {
type: string = 'weapon';
}
export const weaponColorfulCategorys: Categorys[] = [ export const weaponColorfulCategorys: Categorys[] = [
new Categorys( new WeaponCategory(
'qiuai', 'qiuai',
'weapon/求爱.png', 'weapon/求爱.png',
[ [
@ -18,70 +22,70 @@ export const weaponColorfulCategorys: Categorys[] = [
), ),
]; ];
export const weaponUniqueCategorys: Categorys[] = [ export const weaponUniqueCategorys: WeaponCategory[] = [
new Categorys('creation', 'U_Sword01.png', [ new WeaponCategory('creation', 'U_Sword01.png', [
{ type: 'atk', valCoefficient: 1.8 }, { type: 'atk', valCoefficient: 1.8 },
{ type: 'crit', valCoefficient: 1.5 }, { type: 'crit', valCoefficient: 1.5 },
{ type: 'critDmg', valCoefficient: 1.3 }, { type: 'critDmg', valCoefficient: 1.3 },
]), ]),
new Categorys('nameless', 'U_Sword02.png', [ new WeaponCategory('nameless', 'U_Sword02.png', [
{ type: 'atk', valCoefficient: 2.7 }, { type: 'atk', valCoefficient: 2.7 },
{ type: 'crit', valCoefficient: 2.5 }, { type: 'crit', valCoefficient: 2.5 },
]), ]),
new Categorys('scarlet', 'U_Sword03.png', [ new WeaponCategory('scarlet', 'U_Sword03.png', [
{ type: 'atk', valCoefficient: 1.8 }, { type: 'atk', valCoefficient: 1.8 },
{ type: 'crit', valCoefficient: 1.5 }, { type: 'crit', valCoefficient: 1.5 },
{ type: 'critDmg', valCoefficient: 1.3 }, { type: 'critDmg', valCoefficient: 1.3 },
]), ]),
new Categorys('death', 'U_Sword04.png', [ new WeaponCategory('death', 'U_Sword04.png', [
{ type: 'atk', valCoefficient: 1.8 }, { type: 'atk', valCoefficient: 1.8 },
{ type: 'crit', valCoefficient: 1.5 }, { type: 'crit', valCoefficient: 1.5 },
{ type: 'critDmg', valCoefficient: 1.3 }, { type: 'critDmg', valCoefficient: 1.3 },
]), ]),
new Categorys('frostDragon', 'U_Sword05.png', [ new WeaponCategory('frostDragon', 'U_Sword05.png', [
{ type: 'atk', valCoefficient: 1.8 }, { type: 'atk', valCoefficient: 1.8 },
{ type: 'crit', valCoefficient: 1.5 }, { type: 'crit', valCoefficient: 1.5 },
{ type: 'critDmg', valCoefficient: 1.3 }, { type: 'critDmg', valCoefficient: 1.3 },
]), ]),
new Categorys('dragon', 'U_Sword06.png', [ new WeaponCategory('dragon', 'U_Sword06.png', [
{ type: 'atk', valCoefficient: 2.8 }, { type: 'atk', valCoefficient: 2.8 },
{ type: 'critDmg', valCoefficient: 2.2 }, { type: 'critDmg', valCoefficient: 2.2 },
]), ]),
new Categorys('adventurer', 'U_Sword07.png', [ new WeaponCategory('adventurer', 'U_Sword07.png', [
{ type: 'atk', valCoefficient: 2.4 }, { type: 'atk', valCoefficient: 2.4 },
{ type: 'hp', valCoefficient: 1.8 }, { type: 'hp', valCoefficient: 1.8 },
]), ]),
new Categorys('seraphim', 'U_Sword08.png', [ new WeaponCategory('seraphim', 'U_Sword08.png', [
{ type: 'atk', valCoefficient: 2.6 }, { type: 'atk', valCoefficient: 2.6 },
{ type: 'def', valCoefficient: 1.8 }, { type: 'def', valCoefficient: 1.8 },
]), ]),
new Categorys('shuzhuwan', 'U_Sword09.png', [{ type: 'atk', valCoefficient: 3.9 }]), new WeaponCategory('shuzhuwan', 'U_Sword09.png', [{ type: 'atk', valCoefficient: 3.9 }]),
new Categorys('leibse', 'U_Sword10.png', [ new WeaponCategory('leibse', 'U_Sword10.png', [
{ type: 'atk', valCoefficient: 1.9 }, { type: 'atk', valCoefficient: 1.9 },
{ type: 'def', valCoefficient: 1.2 }, { type: 'def', valCoefficient: 1.2 },
{ type: 'bloc', valCoefficient: 0.4 }, { type: 'bloc', valCoefficient: 0.4 },
]), ]),
]; ];
export const weaponCategorys: Categorys[] = [ export const weaponCategorys: WeaponCategory[] = [
new Categorys('hellrock', 'W_Sword016.png', [ new WeaponCategory('hellrock', 'W_Sword016.png', [
{ type: 'atk', valCoefficient: 1.2 }, { type: 'atk', valCoefficient: 1.2 },
{ type: 'crit', valCoefficient: 1.3 }, { type: 'crit', valCoefficient: 1.3 },
]), ]),
new Categorys('warrior', 'W_Sword007.png', [ new WeaponCategory('warrior', 'W_Sword007.png', [
{ type: 'atk', valCoefficient: 1.2 }, { type: 'atk', valCoefficient: 1.2 },
{ type: 'def', valCoefficient: 0.5 }, { type: 'def', valCoefficient: 0.5 },
]), ]),
new Categorys('redWillow', 'W_Sword019.png', [ new WeaponCategory('redWillow', 'W_Sword019.png', [
{ type: 'atk', valCoefficient: 1.3 }, { type: 'atk', valCoefficient: 1.3 },
{ type: 'hp', valCoefficient: 1.1 }, { type: 'hp', valCoefficient: 1.1 },
]), ]),
new Categorys('sword', 'W_Sword001.png', [{ type: 'atk', valCoefficient: 1.7 }]), new WeaponCategory('sword', 'W_Sword001.png', [{ type: 'atk', valCoefficient: 1.7 }]),
new Categorys('waveBlade', 'W_Sword021.png', [{ type: 'atk', valCoefficient: 1.7 }]), new WeaponCategory('waveBlade', 'W_Sword021.png', [{ type: 'atk', valCoefficient: 1.7 }]),
new Categorys('furryPaw', 'W_Fist003.png', [ new WeaponCategory('furryPaw', 'W_Fist003.png', [
{ type: 'atk', valCoefficient: 2 }, { type: 'atk', valCoefficient: 2 },
{ type: 'crit', valCoefficient: 0.7 }, { type: 'crit', valCoefficient: 0.7 },
]), ]),
new Categorys('iceCrystals', 'W_Sword018.png', [ new WeaponCategory('iceCrystals', 'W_Sword018.png', [
{ type: 'atk', valCoefficient: 1.4 }, { type: 'atk', valCoefficient: 1.4 },
{ type: 'critDmg', valCoefficient: 1.3 }, { type: 'critDmg', valCoefficient: 1.3 },
]), ]),
@ -95,10 +99,9 @@ export const initialWeapon = () => {
return new Equip(type, 1, qualityBean, base, extraEntry); return new Equip(type, 1, qualityBean, base, extraEntry);
}; };
export const createWeapon = (quality, lv) => { export const createweapon = (quality, lv, category) => {
const type = 'weapon'; const type = 'weapon';
const qualityBean = new Quality(quality, coefficient[quality]); const qualityBean = new Quality(quality, coefficient[quality]);
const category = getCategory(quality, weaponCategorys, weaponUniqueCategorys, weaponColorfulCategorys);
const base = createBase(quality, lv, category, coefficient); const base = createBase(quality, lv, category, coefficient);
const extraEntry = new Array(); const extraEntry = new Array();
const extraEntryNum = extra_entry_num[quality]; const extraEntryNum = extra_entry_num[quality];

Loading…
Cancel
Save