From b227fc9c2ef361f8aa5ee2f24aa1ade6bc972a73 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sun, 20 Aug 2023 14:32:40 +0200 Subject: area progress --- resources/js/classes/Area.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 resources/js/classes/Area.js (limited to 'resources/js/classes/Area.js') diff --git a/resources/js/classes/Area.js b/resources/js/classes/Area.js new file mode 100644 index 0000000..3451757 --- /dev/null +++ b/resources/js/classes/Area.js @@ -0,0 +1,37 @@ +class Area { + slug = ''; + + monsterProgress = 0; + trainerProgress = 0; + isCompleted = false; + + constructor (slug) { + this.slug = slug; + } + + async initialize () {} + + get encounters () { + return DB.areas[this.slug].encounters; + } + + get requiredEncounters () { + return DB.areas[this.slug].requiredEncounters; + } + + get trainers () { + return DB.areas[this.slug].trainers; + } + + get environment () { + return DB.areas[this.slug].environment; + } + + get previousArea () { + return DB.areas[this.slug].previousArea; + } + + get nextArea () { + return DB.areas[this.slug].nextArea; + } +} -- cgit v1.2.3