summaryrefslogtreecommitdiff
path: root/resources/js/classes/Item.js
blob: 8a12b9afc4a5511afcd6b5c135f542fcfd2bd4d0 (plain)
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
class Item {
  constructor (slug) {
    this.slug = slug;
  }

  get name () {
    return slugToName(this.slug);
  }

  get category () {
    return DB.items[this.slug].category;
  }

  get type () {
    return DB.items[this.slug].type;
  }

  get sprite () {
    return DB.items[this.slug].sprite;
  }

  get conditions () {
    return DB.items[this.slug].conditions;
  }

  get effects () {
    return DB.items[this.slug].effects;
  }
}