一个全随机的刷装备小游戏
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.9 KiB

import { getCategory, createExtraEntry, createBase, createSamples } from './base';
import { Entry, Quality, EquipBase, Equip, Categorys } from './bean';
import { qualitys, extra_entry_num } from './constant';
1 month ago
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 };
export const neckColorfulCategorys: Categorys[] = [];
export const neckUniqueCategorys: Categorys[] = [
new Categorys('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', [
{ type: 'critDmg', valCoefficient: 1.5 },
{ type: 'crit', valCoefficient: 0.5 },
{ type: 'hp', valCoefficient: 0.8 },
]),
new Categorys('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', [
{ type: 'critDmg', valCoefficient: 1.6 },
{ type: 'atk', valCoefficient: 1.6 },
]),
new Categorys('ipaya', 'U_neck05.png', [
{ type: 'bloc', valCoefficient: 0.9 },
{ type: 'def', valCoefficient: 0.9 },
{ type: 'hp', valCoefficient: 1.3 },
]),
1 month ago
];
export const neckCategorys: Categorys[] = [
new Categorys('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', [
{ type: 'crit', valCoefficient: 1.1 },
{ type: 'hp', valCoefficient: 0.5 },
{ type: 'atk', valCoefficient: 0.6 },
]),
new Categorys('iceDragon', 'Ac_7.png', [
{ type: 'crit', valCoefficient: 0.75 },
{ type: 'critDmg', valCoefficient: 0.5 },
{ type: 'hp', valCoefficient: 0.5 },
]),
1 month ago
];
export const initialNeck = () => {
const type = 'neck';
const qualityBean = new Quality(qualitys[0], coefficient[qualitys[0]]);
const base = new EquipBase('initial', 'Ac_3.png', [new Entry('atk', 1, '+1', 1, 1)]);
const extraEntry = [new Entry('crit', 10, '+10%', 10, 10)];
1 month ago
return new Equip(type, 1, qualityBean, base, extraEntry);
};
export const createNeck = (quality, lv) => {
const type = 'neck';
const qualityBean = new Quality(quality, coefficient[quality]);
const category = getCategory(quality, neckCategorys, neckUniqueCategorys, neckColorfulCategorys);
const base = createBase(quality, lv, category, coefficient);
1 month ago
const extraEntry = new Array();
const extraEntryNum = extra_entry_num[quality];
for (let i = 0; i < extraEntryNum; i++) {
extraEntry.push(createExtraEntry(quality, lv, extraEntrys, coefficient));
1 month ago
}
return new Equip(type, lv, qualityBean, base, extraEntry);
};
export const neckSamples = createSamples(neckCategorys, neckUniqueCategorys, neckColorfulCategorys, 'neck', coefficient);