From ea9ba84dc2709c5fa9a66e5dce29ee231fd2bf90 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Sun, 4 Apr 2021 12:50:12 -0400 Subject: [PATCH] Snippet for unframed monster block. --- .../snippetbar/snippets/monsterblock.gen.js | 27 +++++++++++++++++++ .../editor/snippetbar/snippets/snippets.js | 5 ++++ client/homebrew/phbStyle/phb.style.less | 1 + 3 files changed, 33 insertions(+) diff --git a/client/homebrew/editor/snippetbar/snippets/monsterblock.gen.js b/client/homebrew/editor/snippetbar/snippets/monsterblock.gen.js index 3b8c20bb8..dcd8b379a 100644 --- a/client/homebrew/editor/snippetbar/snippets/monsterblock.gen.js +++ b/client/homebrew/editor/snippetbar/snippets/monsterblock.gen.js @@ -192,5 +192,32 @@ module.exports = { ### Actions ${_.times(_.random(2, 3), function(){return genAction();}).join('\n\t\t\t\n\t\t\t')} }}`; + }, + + unframed : function(){ + return dedent` + {{monster + ## ${getMonsterName()} + *${getType()}, ${getAlignment()}* + ___ + : **Armor Class** : ${_.random(10, 20)} (chain mail, shield) + : **Hit Points** : ${_.random(1, 150)}(1d4 + 5) + : **Speed** : ${_.random(0, 50)}ft. + ___ + | STR | DEX | CON | INT | WIS | CHA | + |:-----:|:-----:|:-----:|:-----:|:-----:|:-----:| + ${getStats()} + ___ + : **Condition Immunities** : ${genList(['groggy', 'swagged', 'weak-kneed', 'buzzed', 'groovy', 'melancholy', 'drunk'], 3)} + : **Senses** : darkvision 60 ft., passive Perception ${_.random(3, 20)} + : **Languages** : ${genList(['Common', 'Pottymouth', 'Gibberish', 'Latin', 'Jive'], 2)} + : **Challenge** : ${_.random(0, 15)} (${_.random(10, 10000)} XP) + ___ + : + ${_.times(_.random(2, 3), function(){return genAbilities();}).join('\n\t\t\t\n\t\t\t')} + : + ### Actions + ${_.times(_.random(2, 3), function(){return genAction();}).join('\n\t\t\t\n\t\t\t')} + }}`; } }; diff --git a/client/homebrew/editor/snippetbar/snippets/snippets.js b/client/homebrew/editor/snippetbar/snippets/snippets.js index a4ff6d96a..9e577a8a3 100644 --- a/client/homebrew/editor/snippetbar/snippets/snippets.js +++ b/client/homebrew/editor/snippetbar/snippets/snippets.js @@ -151,6 +151,11 @@ module.exports = [ ].join('\n'); }, }, + { + name : 'Monster Stat Block (unframed)', + icon : 'fas fa-paw', + gen : MonsterBlockGen.unframed, + }, { name : 'Monster Stat Block', icon : 'fas fa-spider', diff --git a/client/homebrew/phbStyle/phb.style.less b/client/homebrew/phbStyle/phb.style.less index 12a76d977..ed9f754b9 100644 --- a/client/homebrew/phbStyle/phb.style.less +++ b/client/homebrew/phbStyle/phb.style.less @@ -234,6 +234,7 @@ body { .useSansSerif(); position : relative; padding : 0px; + margin-bottom : 1em; p{ margin-bottom : 0;