+export const getConfigValue = (config, name, fallback) =>
+ Object.prototype.hasOwnProperty.call(config, name) ? config[name] : fallback;
+
+export const configureDungeons = config => DUNGEONS.map(dungeon => {
+ const newDungeon = JSON.parse(JSON.stringify(dungeon));
+ if (config.wildMap && dungeon.map) {
+ ++newDungeon.items;
+ }
+ if (config.wildCompass && dungeon.compass) {
+ ++newDungeon.items;
+ }
+ if (config.wildSmall) {
+ newDungeon.items += dungeon.sk;
+ }
+ if (config.wildBig && dungeon.bk && !dungeon.dropBk) {
+ ++newDungeon.items;
+ }
+ if (dungeon.boss) {
+ newDungeon.bosses = config.bossShuffle ? BOSSES : [dungeon.boss];
+ }
+ return newDungeon;
+});
+