summaryrefslogtreecommitdiff
path: root/resources/js/classes/Area.js
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2023-09-02 22:55:55 +0200
committerDaniel Weipert <code@drogueronin.de>2023-09-02 22:55:55 +0200
commit32b19aa9504ce24fe0e98a5c9e2fa2be9612fa88 (patch)
treee0e9be8a056ba498f2998fcc85495e6641d34af6 /resources/js/classes/Area.js
parent2030caa0c85102b1cf6131dd9eefef4a347cda42 (diff)
item drops!
Diffstat (limited to 'resources/js/classes/Area.js')
-rw-r--r--resources/js/classes/Area.js18
1 files changed, 17 insertions, 1 deletions
diff --git a/resources/js/classes/Area.js b/resources/js/classes/Area.js
index 1b07e35..3a20d21 100644
--- a/resources/js/classes/Area.js
+++ b/resources/js/classes/Area.js
@@ -31,14 +31,30 @@ class Area {
return DB.areas[this.slug].encounter_percent_total;
}
- get requiredEncounters () {
+ get requiredEncountersBase () {
return DB.areas[this.slug].requiredEncounters;
}
+ get requiredEncounters () {
+ return this.requiredEncountersBase * (this.trainerProgress + 1);
+ }
+
get trainers () {
return DB.areas[this.slug].trainers;
}
+ /**
+ * @typedef {Object} AreaItem
+ * @property {ItemSlug} slug
+ * @property {number} dropRatio
+ * @inner
+ *
+ * @returns {AreaItem[]}
+ */
+ get items () {
+ return DB.areas[this.slug].items;
+ }
+
get environment () {
return DB.areas[this.slug].environment;
}