// Adds the Hollowcrown: The Rift Between Worlds campaign // (seed-data/hollowcrown.js) for the admin account. Not part of the default // seed — run it on its own: // // npm run seed:hollowcrown // // Like every seed it only adds (see seedCampaign.js): it never touches other // campaigns, and does nothing if the admin already has an active Hollowcrown. const { run, fromLibrary } = require('./seedCampaign'); const { WEAPON_LIBRARY, SPELL_LIBRARY, MONSTER_LIBRARY } = require('../src/game/data/library'); const hollowcrown = require('../seed-data/hollowcrown.js'); const startingSpells = new Set(hollowcrown.startingSpells); for (const key of startingSpells) fromLibrary(SPELL_LIBRARY, key); // fail early on a misspelt key run({ ...hollowcrown, // The book's starting picks come from the site library; its modern relics // and magic weapons are never starting options. weapons: [ ...hollowcrown.libraryWeapons.map((key) => fromLibrary(WEAPON_LIBRARY, key, { isStartingOption: true })), ...hollowcrown.weapons, ], // The whole spell library goes in, so a spell is there to hand out the // moment a character unlocks it; only the book's Session 0 list is offered // in the builder. spells: [ ...SPELL_LIBRARY.map(({ key }) => fromLibrary(SPELL_LIBRARY, key, { isStartingOption: startingSpells.has(key) })), ...hollowcrown.spells, ], monsters: [...hollowcrown.libraryMonsters.map((key) => fromLibrary(MONSTER_LIBRARY, key)), ...hollowcrown.monsters], });