Skip to content

Commit

Permalink
Implementing magic item snippet from Issue 671.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbrickhouse committed Mar 12, 2019
1 parent 2839846 commit 9335608
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
17 changes: 17 additions & 0 deletions client/homebrew/editor/snippetbar/snippets/magicitem.gen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const _ = require('lodash');

const itemNames = [
'Doorknob of Niceness'
];

module.exports = {

return [
`#### ${_.sample(itemNames)}`,
`*${_.sample(['Wondrous item', 'Armor', 'Weapon'])}, ${_.sample(['Common', 'Uncommon', 'Rare', 'Very Rare', 'Legendary', 'Artifact'])} (requires attunement)*`,
`<div style='margin-top:-2px'></div>`,
`This knob is pretty nice. It opens the door you put it on.`
`*${_.sample(level)}-level ${_.sample(spellSchools)}*`
].join('\n');
}
};
6 changes: 6 additions & 0 deletions client/homebrew/editor/snippetbar/snippets/snippets.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const MonsterBlockGen = require('./monsterblock.gen.js');
const ClassFeatureGen = require('./classfeature.gen.js');
const CoverPageGen = require('./coverpage.gen.js');
const TableOfContentsGen = require('./tableOfContents.gen.js');
const MagicItemGen = require('./magicitem.gen.js');


module.exports = [
Expand Down Expand Up @@ -145,6 +146,11 @@ module.exports = [
icon : 'fa-file-word-o',
gen : CoverPageGen,
},
{
name : 'Magic Item',
icon : 'fa-key',
gen : MagicItemGen,
},
]
},

Expand Down

0 comments on commit 9335608

Please sign in to comment.