summaryrefslogtreecommitdiff
path: root/resources/js/classes/Npc.js
blob: c13b9b4c5e29d9b959fc7b2eeb29d89aab13d28c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class Npc {
  name = '';
  spriteName = '';

  constructor (slug) {
    this.slug = slug;

    this.name = translate(slug);
    this.spriteName = DB.npcs[slug]?.template[0].combat_front;
  }

  get sprite () {
    return `/modules/tuxemon/mods/tuxemon/gfx/sprites/player/${this.spriteName}.png`;
  }
}