1.新增装备属性:伤害加成,伤害减免,暴击避免,爆伤减免,移动速度,转生属性副本行进速度更改为移动速度 2.新增装备类型:饰品,裤子,鞋子,护腕 3.新增装备品质:多彩,多彩品质装备拥有独特的主被动技能 4.新增部分多彩品质装备(暂无产出途径) 5.调整战斗逻辑,适配新增属性和技能 6.调整护甲减伤比例(调低) 7.调整格挡属性数值(调低) 8.调整暴击率和暴击伤害数值随装备等级线性增长(1级为原来一半,100级与原来相等) 9.调整转生点对移动速度的加成(调低) 10.新增装备图标资源 11.装备图鉴显示方式调整v1.0
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.1 KiB |
@ -0,0 +1,131 @@ |
|||||||
|
import { initialWeapon, initialArmor, initialNeck, initialRing, initialJewelry, initialpants, initialshoes, initialbracers, Equip } from '@/config'; |
||||||
|
const monster_attr_factor = [0.9, 1, 1.15, 1.4]; |
||||||
|
export const type_monster = 'monster'; |
||||||
|
export const type_boss = 'boss'; |
||||||
|
|
||||||
|
export class Attribute { |
||||||
|
lv: number = 1; |
||||||
|
coins: number = 0; |
||||||
|
curHp: number = 200; |
||||||
|
hp: number = 200; |
||||||
|
hpPercent: number = 0; |
||||||
|
baseAtk: number = 0; |
||||||
|
atk: number = 0; |
||||||
|
atkPercent: number = 0; |
||||||
|
def: number = 0; |
||||||
|
defPercent: number = 0; |
||||||
|
reducPercent: number = 0; |
||||||
|
bloc: number = 0; |
||||||
|
blocPercent: number = 0; |
||||||
|
eva: number = 0; |
||||||
|
crit: number = 0; //暴击率
|
||||||
|
critDmg: number = 150; // 初始暴击伤害150%
|
||||||
|
dmgPercent: number = 0; //伤害加成
|
||||||
|
dmgReduc: number = 0; //伤害减免
|
||||||
|
critAvoid: number = 0; //暴击避免
|
||||||
|
critDmgReduc: number = 0; //暴击伤害减免
|
||||||
|
moveSpeed: number = 0; //移动速度
|
||||||
|
dps: number = 0; |
||||||
|
skill: string = 'Attack'; |
||||||
|
|
||||||
|
constructor(ra?: RebornAttribute) { |
||||||
|
if (ra) { |
||||||
|
this.hp += ra.hp; |
||||||
|
this.atk += ra.atk; |
||||||
|
this.def += ra.def; |
||||||
|
this.bloc += ra.bloc; |
||||||
|
this.crit += ra.crit; |
||||||
|
this.critDmg += ra.critDmg; |
||||||
|
this.moveSpeed += ra.moveSpeed; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
export class Player { |
||||||
|
lv: number = 1; |
||||||
|
coins: number = 0; |
||||||
|
weapon: Equip = initialWeapon(); |
||||||
|
armor: Equip = initialArmor(); |
||||||
|
neck: Equip = initialNeck(); |
||||||
|
ring: Equip = initialRing(); |
||||||
|
jewelry: Equip = initialJewelry(); |
||||||
|
pants: Equip = initialpants(); |
||||||
|
shoes: Equip = initialshoes(); |
||||||
|
bracers: Equip = initialbracers(); |
||||||
|
attribute: Attribute = new Attribute(); |
||||||
|
} |
||||||
|
|
||||||
|
export class RebornAttribute { |
||||||
|
hp: number = 0; |
||||||
|
atk: number = 0; |
||||||
|
crit: number = 0; |
||||||
|
critDmg: number = 0; |
||||||
|
def: number = 0; |
||||||
|
bloc: number = 0; |
||||||
|
recoverSpeed: number = 0; |
||||||
|
moveSpeed: number = 0; |
||||||
|
battleSpeed: number = 0; |
||||||
|
} |
||||||
|
|
||||||
|
export class RebornPoints extends RebornAttribute { |
||||||
|
count: number = 0; |
||||||
|
points: number = 0; |
||||||
|
} |
||||||
|
|
||||||
|
export class Monster extends Attribute { |
||||||
|
difficulty: number; |
||||||
|
type: string = type_monster; |
||||||
|
equipRates: number[]; |
||||||
|
extraRate: number; |
||||||
|
|
||||||
|
constructor(lv, difficulty) { |
||||||
|
super(); |
||||||
|
this.lv = lv; |
||||||
|
this.difficulty = difficulty; |
||||||
|
const df = monster_attr_factor[this.difficulty]; |
||||||
|
this.baseAtk = Math.ceil(lv * lv ** 1.1 * (Math.random() * 1 + 2) * df); |
||||||
|
this.atk = this.baseAtk; |
||||||
|
this.hp = Math.ceil(lv * lv ** 1.1 * (Math.random() * 5 + 16) * df); |
||||||
|
this.coins = Math.ceil(lv ** 1.16 * (Math.random() * 5 + 11) * df); |
||||||
|
this.equipRates = [0.2 * df, 0.08 * df, 0.03 * df]; |
||||||
|
this.extraRate = 0; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
export class BossMonster extends Monster { |
||||||
|
type: string = type_boss; |
||||||
|
constructor(lv, difficulty) { |
||||||
|
super(lv, difficulty); |
||||||
|
const df = monster_attr_factor[this.difficulty]; |
||||||
|
this.baseAtk = Math.ceil(lv * lv ** 1.1 * (Math.random() * 1 + 3) * df); |
||||||
|
this.atk = this.baseAtk; |
||||||
|
this.hp = Math.ceil(lv * lv ** 1.1 * (Math.random() * 5 + 30) * df); |
||||||
|
this.coins = Math.ceil(lv ** 1.16 * (Math.random() * 10 + 28) * df); |
||||||
|
this.equipRates = [0.25 - 0.05 * df, 0.55 - 0.15 * df, 0.15 + 0.15 * df, 0.05 + 0.05 * df]; |
||||||
|
this.extraRate = 0.02 * ((this.difficulty - 1) * 5 + 1); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
export class Dungeon { |
||||||
|
lv: number; |
||||||
|
difficulty?: number; |
||||||
|
monsters?: Monster[] = new Array(); |
||||||
|
needDps?: number; |
||||||
|
|
||||||
|
constructor(lv, difficulty) { |
||||||
|
this.lv = lv; |
||||||
|
this.setDifficulty(difficulty); |
||||||
|
} |
||||||
|
setDifficulty(difficulty) { |
||||||
|
const lv = this.lv; |
||||||
|
this.difficulty = difficulty; |
||||||
|
this.monsters = new Array(); |
||||||
|
for (let i = 0; i < 4; i++) { |
||||||
|
this.monsters.push(new Monster(lv, difficulty)); |
||||||
|
} |
||||||
|
this.monsters.push(new BossMonster(lv, difficulty)); |
||||||
|
this.needDps = lv * lv ** 1.3 * 2 * difficulty; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
export const createdDungeons = () => {}; |
@ -1,64 +0,0 @@ |
|||||||
const monster_attr_factor = [0.9, 1, 1.15, 1.4]; |
|
||||||
export class Monster { |
|
||||||
lv: number; |
|
||||||
difficulty: number; |
|
||||||
type: string = 'monster'; |
|
||||||
atk?: number; |
|
||||||
hp?: number; |
|
||||||
coins?: number; |
|
||||||
equipRates?: number[]; |
|
||||||
extraRate?: number; |
|
||||||
|
|
||||||
constructor(lv, difficulty) { |
|
||||||
this.lv = lv; |
|
||||||
this.difficulty = difficulty; |
|
||||||
this.init(); |
|
||||||
} |
|
||||||
|
|
||||||
init() { |
|
||||||
const lv = this.lv; |
|
||||||
const df = monster_attr_factor[this.difficulty]; |
|
||||||
this.atk = Math.ceil(lv * lv ** 1.1 * (Math.random() * 1 + 2) * df); |
|
||||||
this.hp = Math.ceil(lv * lv ** 1.1 * (Math.random() * 5 + 16) * df); |
|
||||||
this.coins = Math.ceil(lv ** 1.16 * (Math.random() * 5 + 11) * df); |
|
||||||
this.equipRates = [0.2 * df, 0.08 * df, 0.03 * df]; |
|
||||||
this.extraRate = 0; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
export class BossMonster extends Monster { |
|
||||||
type: string = 'boss'; |
|
||||||
init() { |
|
||||||
const lv = this.lv; |
|
||||||
const df = monster_attr_factor[this.difficulty]; |
|
||||||
this.atk = Math.ceil(lv * lv ** 1.1 * (Math.random() * 1 + 3) * df); |
|
||||||
this.hp = Math.ceil(lv * lv ** 1.1 * (Math.random() * 5 + 30) * df); |
|
||||||
this.coins = Math.ceil(lv ** 1.16 * (Math.random() * 10 + 28) * df); |
|
||||||
this.equipRates = [0.25 - 0.05 * df, 0.55 - 0.15 * df, 0.15 + 0.15 * df, 0.05 + 0.05 * df]; |
|
||||||
this.extraRate = 0.02 * ((this.difficulty - 1) * 2 + 1); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
export class Dungeon { |
|
||||||
lv: number; |
|
||||||
difficulty?: number; |
|
||||||
monsters?: Monster[] = new Array(); |
|
||||||
needDps?: number; |
|
||||||
|
|
||||||
constructor(lv, difficulty) { |
|
||||||
this.lv = lv; |
|
||||||
this.setDifficulty(difficulty); |
|
||||||
} |
|
||||||
setDifficulty(difficulty) { |
|
||||||
const lv = this.lv; |
|
||||||
this.difficulty = difficulty; |
|
||||||
this.monsters = new Array(); |
|
||||||
for (let i = 0; i < 4; i++) { |
|
||||||
this.monsters.push(new Monster(lv, difficulty)); |
|
||||||
} |
|
||||||
this.monsters.push(new BossMonster(lv, difficulty)); |
|
||||||
this.needDps = lv * lv ** 1.3 * 2 * difficulty; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
export const createdDungeons = () => {}; |
|
@ -0,0 +1,229 @@ |
|||||||
|
import { Entry, Quality, EquipBase, Equip } from './bean'; |
||||||
|
import { qualitys, entry_initor, 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 = [ |
||||||
|
{ |
||||||
|
name: 'shuzhuang', |
||||||
|
icon: 'bracers/梳妆镜.png', |
||||||
|
entry: [ |
||||||
|
{ type: 'atk', valCoefficient: 1 }, |
||||||
|
{ type: 'hp', valCoefficient: 0.7 }, |
||||||
|
{ type: 'def', valCoefficient: 0.4 }, |
||||||
|
], |
||||||
|
skill: 'JHSY', |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: 'liulipan', |
||||||
|
icon: 'bracers/琉璃盘.png', |
||||||
|
entry: [ |
||||||
|
{ type: 'atk', valCoefficient: 0.6 }, |
||||||
|
{ type: 'hp', valCoefficient: 1.5 }, |
||||||
|
], |
||||||
|
skill: 'Liulipan', |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: 'ghdp', |
||||||
|
icon: 'bracers/勾魂夺魂.png', |
||||||
|
entry: [ |
||||||
|
{ type: 'critDmg', valCoefficient: 1 }, |
||||||
|
{ type: 'crit', valCoefficient: 0.4 }, |
||||||
|
{ type: 'atk', valCoefficient: 0.5 }, |
||||||
|
], |
||||||
|
skill: 'CritFear', |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: 'youerhuan', |
||||||
|
icon: 'bracers/白骨夫人的右耳环.png', |
||||||
|
entry: [ |
||||||
|
{ type: 'critDmg', valCoefficient: 1.5 }, |
||||||
|
{ type: 'atk', valCoefficient: 0.8 }, |
||||||
|
], |
||||||
|
skill: 'Vampire1', |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: 'jingboyu', |
||||||
|
icon: 'bracers/金钵盂.png', |
||||||
|
entry: [ |
||||||
|
{ type: 'atk', valCoefficient: 0.8 }, |
||||||
|
{ type: 'hp', valCoefficient: 0.6 }, |
||||||
|
{ type: 'def', valCoefficient: 0.6 }, |
||||||
|
], |
||||||
|
skill: 'Prototype', |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: 'zijingboyu', |
||||||
|
icon: 'bracers/紫金钵盂.png', |
||||||
|
entry: [ |
||||||
|
{ type: 'atk', valCoefficient: 0.8 }, |
||||||
|
{ type: 'hp', valCoefficient: 0.6 }, |
||||||
|
{ type: 'def', valCoefficient: 0.6 }, |
||||||
|
], |
||||||
|
skill: 'Fate', |
||||||
|
}, |
||||||
|
]; |
||||||
|
export const bracersUniqueCategorys = [ |
||||||
|
{ |
||||||
|
name: 'duoqing', |
||||||
|
icon: 'bracers/多情腕.png', |
||||||
|
entry: [ |
||||||
|
{ type: 'atk', valCoefficient: 1 }, |
||||||
|
{ type: 'hp', valCoefficient: 0.8 }, |
||||||
|
{ type: 'def', valCoefficient: 0.9 }, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: 'wano', |
||||||
|
icon: 'bracers/玩藕.png', |
||||||
|
entry: [ |
||||||
|
{ type: 'critDmg', valCoefficient: 1.5 }, |
||||||
|
{ type: 'crit', valCoefficient: 0.5 }, |
||||||
|
{ type: 'atk', valCoefficient: 0.8 }, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: 'rsggu', |
||||||
|
icon: 'bracers/人参果裹布.png', |
||||||
|
entry: [ |
||||||
|
{ type: 'critDmg', valCoefficient: 1.2 }, |
||||||
|
{ type: 'dmgPercent', valCoefficient: 1.0 }, |
||||||
|
{ type: 'atk', valCoefficient: 0.7 }, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: 'yingwu', |
||||||
|
icon: 'bracers/鹦鹉杯.png', |
||||||
|
entry: [ |
||||||
|
{ type: 'critDmg', valCoefficient: 1.6 }, |
||||||
|
{ type: 'atk', valCoefficient: 1.6 }, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: 'meipusa', |
||||||
|
icon: 'bracers/美菩萨.png', |
||||||
|
entry: [ |
||||||
|
{ type: 'dmgPercent', valCoefficient: 1.2 }, |
||||||
|
{ type: 'def', valCoefficient: 0.9 }, |
||||||
|
{ type: 'hp', valCoefficient: 1.2 }, |
||||||
|
], |
||||||
|
}, |
||||||
|
]; |
||||||
|
export const bracersCategorys = [ |
||||||
|
{ |
||||||
|
name: 'guoshi', |
||||||
|
icon: 'bracers/裹尸布.png', |
||||||
|
entry: [ |
||||||
|
{ type: 'def', valCoefficient: 0.9 }, |
||||||
|
{ type: 'hp', valCoefficient: 0.6 }, |
||||||
|
{ type: 'atk', valCoefficient: 0.5 }, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: 'xiuyugu', |
||||||
|
icon: 'bracers/绣与骨.png', |
||||||
|
entry: [ |
||||||
|
{ type: 'crit', valCoefficient: 1.1 }, |
||||||
|
{ type: 'hp', valCoefficient: 0.5 }, |
||||||
|
{ type: 'atk', valCoefficient: 0.6 }, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: 'huoshen', |
||||||
|
icon: 'bracers/火神腕.png', |
||||||
|
entry: [ |
||||||
|
{ type: 'crit', valCoefficient: 1.1 }, |
||||||
|
{ type: 'hp', valCoefficient: 0.6 }, |
||||||
|
{ type: 'atk', valCoefficient: 0.5 }, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: 'heishou', |
||||||
|
icon: 'bracers/黑手.png', |
||||||
|
entry: [ |
||||||
|
{ 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('hp', 20, '+20', 20, 20)]); |
||||||
|
const extraEntry = [new Entry('crit', 10, '+10%', 10, 10)]; |
||||||
|
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); |
||||||
|
const base = createBase(quality, lv, category); |
||||||
|
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) => { |
||||||
|
const type = extraEntrys[Math.floor(Math.random() * extraEntrys.length)]; |
||||||
|
const initor = entry_initor[type]; |
||||||
|
const qualityCoefficient = coefficient[quality]; |
||||||
|
const entry = initor(lv, qualityCoefficient); |
||||||
|
return entry; |
||||||
|
}; |
||||||
|
|
||||||
|
const createBase = (quality, lv, category) => { |
||||||
|
const entry = new Array(); |
||||||
|
category.entry.forEach((item) => { |
||||||
|
const initor = entry_initor[item.type]; |
||||||
|
const qualityCoefficient = coefficient[quality]; |
||||||
|
entry.push(initor(lv, qualityCoefficient, item.valCoefficient)); |
||||||
|
}); |
||||||
|
return new EquipBase(category.name, category.icon, entry, category.skill); |
||||||
|
}; |
||||||
|
const getCategory = (quality) => { |
||||||
|
let categorys = bracersCategorys; |
||||||
|
switch (quality) { |
||||||
|
case qualitys[4]: |
||||||
|
categorys = bracersUniqueCategorys; |
||||||
|
break; |
||||||
|
case qualitys[5]: |
||||||
|
categorys = bracersColorfulCategorys; |
||||||
|
break; |
||||||
|
} |
||||||
|
return categorys[Math.floor(Math.random() * categorys.length)]; |
||||||
|
}; |
||||||
|
|
||||||
|
const bracersSample = (quality, category): Equip => { |
||||||
|
const type = 'bracers'; |
||||||
|
const lv = 100; |
||||||
|
const qualityBean = new Quality(quality, coefficient[quality]); |
||||||
|
const base = createBase(quality, lv, category); |
||||||
|
const extraEntry = new Array(); |
||||||
|
return new Equip(type, lv, qualityBean, base, extraEntry); |
||||||
|
}; |
||||||
|
|
||||||
|
const bracersSamples = { |
||||||
|
colorful: new Array(), |
||||||
|
unique: new Array(), |
||||||
|
epic: new Array(), |
||||||
|
artifact: new Array(), |
||||||
|
}; |
||||||
|
bracersColorfulCategorys.forEach((item) => { |
||||||
|
bracersSamples.colorful.push(bracersSample('colorful', item)); |
||||||
|
}); |
||||||
|
bracersUniqueCategorys.forEach((item) => { |
||||||
|
bracersSamples.unique.push(bracersSample('unique', item)); |
||||||
|
}); |
||||||
|
bracersCategorys.forEach((item) => { |
||||||
|
bracersSamples.epic.push(bracersSample('epic', item)); |
||||||
|
bracersSamples.artifact.push(bracersSample('artifact', item)); |
||||||
|
}); |
||||||
|
export { bracersSamples }; |