mirror of
https://github.com/Kornstalx/5etools-mirror-2.github.io.git
synced 2025-10-28 20:45:35 -05:00
v1.198.1
This commit is contained in:
19
js/encounterbuilder/encounterbuilder-cache.js
Normal file
19
js/encounterbuilder/encounterbuilder-cache.js
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* A cache of XP value -> creature.
|
||||
*/
|
||||
export class EncounterBuilderCacheBase {
|
||||
reset () { throw new Error("Unimplemented!"); }
|
||||
getCreaturesByXp (xp) { throw new Error("Unimplemented!"); }
|
||||
getXpKeys () { throw new Error("Unimplemented!"); }
|
||||
|
||||
static _UNWANTED_CR_NUMS = new Set([VeCt.CR_UNKNOWN, VeCt.CR_CUSTOM]);
|
||||
|
||||
_isUnwantedCreature (mon) {
|
||||
if (mon.isNpc) return true;
|
||||
|
||||
const crNum = Parser.crToNumber(mon.cr);
|
||||
if (this.constructor._UNWANTED_CR_NUMS.has(crNum)) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user