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.
|
|
|
import { quality_collor, extra_entry_num } from './constant';
|
|
|
|
|
|
|
|
export class Entry {
|
|
|
|
type: string;
|
|
|
|
value: number;
|
|
|
|
showVal: string;
|
|
|
|
percent: number;
|
|
|
|
|
|
|
|
constructor(type: string, value: number, showVal: string, percent: number) {
|
|
|
|
this.type = type;
|
|
|
|
this.value = value;
|
|
|
|
this.showVal = showVal;
|
|
|
|
this.percent = percent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class Quality {
|
|
|
|
quality: string;
|
|
|
|
qualityCoefficient: number;
|
|
|
|
color: string;
|
|
|
|
extraEntryNum: number;
|
|
|
|
constructor(quality: string, coefficient: number) {
|
|
|
|
this.quality = quality;
|
|
|
|
this.qualityCoefficient = coefficient;
|
|
|
|
this.color = quality_collor[quality];
|
|
|
|
this.extraEntryNum = extra_entry_num[quality];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class EquipBase {
|
|
|
|
name: string;
|
|
|
|
icon: string;
|
|
|
|
entry: Entry[];
|
|
|
|
constructor(name: string, icon: string, entry: Entry[]) {
|
|
|
|
this.name = name;
|
|
|
|
this.icon = icon;
|
|
|
|
this.entry = entry;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class Equip {
|
|
|
|
type: string;
|
|
|
|
lv: number;
|
|
|
|
locked: boolean = false;
|
|
|
|
strengthenLv: number = 0;
|
|
|
|
quality: Quality;
|
|
|
|
base: EquipBase;
|
|
|
|
extraEntry: Entry[];
|
|
|
|
constructor(type: string, lv, quality: Quality, base: EquipBase, extraEntry: Entry[]) {
|
|
|
|
this.type = type;
|
|
|
|
this.lv = lv;
|
|
|
|
this.quality = quality;
|
|
|
|
this.base = base;
|
|
|
|
this.extraEntry = extraEntry;
|
|
|
|
}
|
|
|
|
}
|