Browse Source

装备随机方式变更

同品质所有部位随机
v1.0
许孟阳 1 week 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 @@ @@ -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 { qualitys, entry_initor, 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 };
class ArmorCategory extends Categorys {
type: string = 'armor';
}
export const armorColorfulCategorys: Categorys[] = [
new Categorys(
new ArmorCategory(
'baihua',
'armor/百花内甲.png',
[
@ -16,7 +20,7 @@ export const armorColorfulCategorys: Categorys[] = [ @@ -16,7 +20,7 @@ export const armorColorfulCategorys: Categorys[] = [
'BHXDJC',
0.9
),
new Categorys(
new ArmorCategory(
'heixi',
'armor/黑犀.png',
[
@ -26,7 +30,7 @@ export const armorColorfulCategorys: Categorys[] = [ @@ -26,7 +30,7 @@ export const armorColorfulCategorys: Categorys[] = [
],
'TieBi'
),
new Categorys(
new ArmorCategory(
'guiwen',
'armor/龟纹铠.png',
[
@ -36,7 +40,7 @@ export const armorColorfulCategorys: Categorys[] = [ @@ -36,7 +40,7 @@ export const armorColorfulCategorys: Categorys[] = [
],
'DuJunQianNeng'
),
new Categorys(
new ArmorCategory(
'wuxing',
'armor/五行压贴.png',
[
@ -46,7 +50,7 @@ export const armorColorfulCategorys: Categorys[] = [ @@ -46,7 +50,7 @@ export const armorColorfulCategorys: Categorys[] = [
],
'JinGuangHuShen'
),
new Categorys(
new ArmorCategory(
'guimen',
'armor/鬼门甲.png',
[
@ -57,61 +61,61 @@ export const armorColorfulCategorys: Categorys[] = [ @@ -57,61 +61,61 @@ export const armorColorfulCategorys: Categorys[] = [
),
];
export const armorUniqueCategorys: Categorys[] = [
new Categorys('dispute', 'U_Armor01.png', [
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 Categorys('jianHao', 'U_Armor02.png', [
new ArmorCategory('jianHao', 'U_Armor02.png', [
{ type: 'def', valCoefficient: 2.1 },
{ type: 'hp', valCoefficient: 2.6 },
]),
new Categorys('samurai', 'U_Armor03.png', [
new ArmorCategory('samurai', 'U_Armor03.png', [
{ type: 'def', valCoefficient: 1.3 },
{ type: 'hp', valCoefficient: 1.7 },
{ type: 'atk', valCoefficient: 0.9 },
]),
new Categorys('trackers', 'U_Armor04.png', [
new ArmorCategory('trackers', 'U_Armor04.png', [
{ type: 'def', valCoefficient: 0.9 },
{ type: 'critDmg', 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: 'atk', valCoefficient: 2.4 },
{ type: 'bloc', valCoefficient: 1.2 },
]),
new Categorys('nightwear', 'U_Armor06.png', [
new ArmorCategory('nightwear', 'U_Armor06.png', [
{ type: 'def', valCoefficient: 1.2 },
{ type: 'hp', valCoefficient: 1.5 },
{ type: 'atk', valCoefficient: 1.2 },
]),
new Categorys('wildDragon', 'U_Armor07.png', [
new ArmorCategory('wildDragon', 'U_Armor07.png', [
{ type: 'def', valCoefficient: 1.5 },
{ type: 'bloc', valCoefficient: 1.2 },
{ type: 'hp', valCoefficient: 1.4 },
]),
];
export const armorCategorys: Categorys[] = [
new Categorys('guard', 'A_A2.png', [
export const armorCategorys: ArmorCategory[] = [
new ArmorCategory('guard', 'A_A2.png', [
{ type: 'def', valCoefficient: 2 },
{ type: 'hp', valCoefficient: 0.6 },
]),
new Categorys('redWillow', 'A_A3.png', [
new ArmorCategory('redWillow', 'A_A3.png', [
{ type: 'def', valCoefficient: 0.9 },
{ type: 'hp', valCoefficient: 1.2 },
]),
new Categorys('warrior', 'A_A5.png', [
new ArmorCategory('warrior', 'A_A5.png', [
{ type: 'def', valCoefficient: 1.1 },
{ type: 'hp', valCoefficient: 0.8 },
]),
new Categorys('lightArmor', 'A_A7.png', [
new ArmorCategory('lightArmor', 'A_A7.png', [
{ type: 'def', valCoefficient: 0.7 },
{ type: 'hp', 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: 'hp', valCoefficient: 0.8 },
{ type: 'atk', valCoefficient: 0.4 },
@ -126,10 +130,9 @@ export const initialArmor = () => { @@ -126,10 +130,9 @@ export const initialArmor = () => {
return new Equip(type, 1, qualityBean, base, extraEntry);
};
export const createArmor = (quality, lv) => {
export const createarmor = (quality, lv, category) => {
const type = 'armor';
const qualityBean = new Quality(quality, coefficient[quality]);
const category = getCategory(quality, armorCategorys, armorUniqueCategorys, armorColorfulCategorys);
const base = createBase(quality, lv, category, coefficient);
const extraEntry = new Array();
const extraEntryNum = extra_entry_num[quality];

20
src/config/equips/base.ts

@ -1,23 +1,5 @@ @@ -1,23 +1,5 @@
import { Categorys, Equip, EquipBase, Quality } from './bean';
import { entry_initor, 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;
}
};
import { entry_initor, extra_entry_num, qualitys } from './constant';
export const createBase = (quality, lv, category, coefficient) => {
const entry = new Array();

3
src/config/equips/bean.ts

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

40
src/config/equips/bracers.ts

@ -1,4 +1,4 @@ @@ -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 { qualitys, extra_entry_num } from './constant';
@ -6,8 +6,11 @@ const extraEntrys = ['atk', 'crit', 'critDmg', 'hp', 'def', 'atkPercent', 'defPe @@ -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 };
class BracersCategory extends Categorys {
type: string = 'bracers';
}
export const bracersColorfulCategorys: Categorys[] = [
new Categorys(
new BracersCategory(
'limao',
'bracers/狸猫足印.png',
[
@ -18,7 +21,7 @@ export const bracersColorfulCategorys: Categorys[] = [ @@ -18,7 +21,7 @@ export const bracersColorfulCategorys: Categorys[] = [
'LiZhao',
0.8
),
new Categorys(
new BracersCategory(
'dushe',
'bracers/毒蛇.png',
[
@ -29,7 +32,7 @@ export const bracersColorfulCategorys: Categorys[] = [ @@ -29,7 +32,7 @@ export const bracersColorfulCategorys: Categorys[] = [
'JuDu',
0.5
),
new Categorys(
new BracersCategory(
'xianglong',
'bracers/降龙.png',
[
@ -40,7 +43,7 @@ export const bracersColorfulCategorys: Categorys[] = [ @@ -40,7 +43,7 @@ export const bracersColorfulCategorys: Categorys[] = [
'Xianglong',
0.1
),
new Categorys(
new BracersCategory(
'huojing',
'bracers/火晶环.png',
[
@ -49,7 +52,7 @@ export const bracersColorfulCategorys: Categorys[] = [ @@ -49,7 +52,7 @@ export const bracersColorfulCategorys: Categorys[] = [
],
'DaLiDan'
),
new Categorys('xingjia', 'bracers/刑枷.png', [
new BracersCategory('xingjia', 'bracers/刑枷.png', [
{ type: 'atkPercent', valCoefficient: 1 },
{ type: 'critDmg', valCoefficient: 1.2 },
{ type: 'crit', valCoefficient: 1.2 },
@ -58,49 +61,49 @@ export const bracersColorfulCategorys: Categorys[] = [ @@ -58,49 +61,49 @@ export const bracersColorfulCategorys: Categorys[] = [
{ type: 'def', valCoefficient: 1.2 },
]),
];
export const bracersUniqueCategorys: Categorys[] = [
new Categorys('duoqing', 'bracers/多情腕.png', [
export const bracersUniqueCategorys: BracersCategory[] = [
new BracersCategory('duoqing', 'bracers/多情腕.png', [
{ type: 'atk', valCoefficient: 1 },
{ type: 'hp', valCoefficient: 0.8 },
{ type: 'def', valCoefficient: 0.9 },
]),
new Categorys('wano', 'bracers/玩藕.png', [
new BracersCategory('wano', 'bracers/玩藕.png', [
{ type: 'critDmg', valCoefficient: 1.5 },
{ type: 'crit', valCoefficient: 0.5 },
{ type: 'atk', valCoefficient: 0.8 },
]),
new Categorys('rsggu', 'bracers/人参果裹布.png', [
new BracersCategory('rsggu', 'bracers/人参果裹布.png', [
{ type: 'critDmg', valCoefficient: 1.2 },
{ type: 'atkPercent', valCoefficient: 1 },
{ type: 'atk', valCoefficient: 0.7 },
]),
new Categorys('yingwu', 'bracers/鹦鹉杯.png', [
new BracersCategory('yingwu', 'bracers/鹦鹉杯.png', [
{ type: 'critDmg', valCoefficient: 1.6 },
{ type: 'atk', valCoefficient: 1.6 },
]),
new Categorys('meipusa', 'bracers/美菩萨.png', [
new BracersCategory('meipusa', 'bracers/美菩萨.png', [
{ type: 'atkPercent', valCoefficient: 1 },
{ type: 'def', valCoefficient: 0.9 },
{ type: 'hp', valCoefficient: 1.2 },
]),
];
export const bracersCategorys: Categorys[] = [
new Categorys('guoshi', 'bracers/裹尸布.png', [
export const bracersCategorys: BracersCategory[] = [
new BracersCategory('guoshi', 'bracers/裹尸布.png', [
{ type: 'def', valCoefficient: 0.9 },
{ type: 'hp', valCoefficient: 0.6 },
{ type: 'atk', valCoefficient: 0.5 },
]),
new Categorys('xiuyugu', 'bracers/绣与骨.png', [
new BracersCategory('xiuyugu', 'bracers/绣与骨.png', [
{ type: 'crit', valCoefficient: 1.1 },
{ type: 'hp', valCoefficient: 0.5 },
{ type: 'atk', valCoefficient: 0.6 },
]),
new Categorys('huoshen', 'bracers/火神腕.png', [
new BracersCategory('huoshen', 'bracers/火神腕.png', [
{ type: 'crit', valCoefficient: 1.1 },
{ type: 'hp', valCoefficient: 0.6 },
{ type: 'atk', valCoefficient: 0.5 },
]),
new Categorys('heishou', 'bracers/黑手.png', [
new BracersCategory('heishou', 'bracers/黑手.png', [
{ type: 'crit', valCoefficient: 0.75 },
{ type: 'critDmg', valCoefficient: 0.5 },
{ type: 'hp', valCoefficient: 0.5 },
@ -115,10 +118,9 @@ export const initialbracers = () => { @@ -115,10 +118,9 @@ export const initialbracers = () => {
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 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];

43
src/config/equips/jewelry.ts

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

39
src/config/equips/neck.ts

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

39
src/config/equips/pants.ts

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

37
src/config/equips/ring.ts

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

36
src/config/equips/shoes.ts

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

49
src/config/equips/weapon.ts

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

Loading…
Cancel
Save