-
Notifications
You must be signed in to change notification settings - Fork 0
/
Item.ts
33 lines (32 loc) · 882 Bytes
/
Item.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { Attributes } from '../../attributes/Attributes';
import { uncommon } from '../../rarity/rarities';
import type { Rarity } from '../../rarity/Rarity';
/**
* Creates item with the given parameters.
* @category Equipment
*/
export class Item {
/**
* Determines the rarity of the item.
*/
public rarity: Rarity;
/**
* Determines the name of the item.
*/
public name: string;
/**
* Determines the description of the item.
*/
public description: string;
/**
* Determines the attributes of the item.
* @see {@link Attributes | Attributes class} for more details.
*/
public attributes: Attributes;
public constructor(rarity = uncommon, name = 'Item', description = 'A item', attributes = new Attributes()) {
this.rarity = rarity;
this.name = name;
this.description = description;
this.attributes = attributes;
}
}