From 32b19aa9504ce24fe0e98a5c9e2fa2be9612fa88 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sat, 2 Sep 2023 22:55:55 +0200 Subject: item drops! --- resources/js/classes/Area.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'resources/js/classes') 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; } -- cgit v1.2.3