From 2ebfd191692e3f5a6c56f85473d2e78ae5fe9d1a Mon Sep 17 00:00:00 2001 From: jlgraves <107768701+jlgraves@users.noreply.github.com> Date: Sat, 18 Jun 2022 11:30:35 -0700 Subject: [PATCH 1/4] Adding in spell-casting ability Re issue #2215 added spellcasting ability modifier --- .../editor/snippetbar/snippets/classfeature.gen.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client/homebrew/editor/snippetbar/snippets/classfeature.gen.js b/client/homebrew/editor/snippetbar/snippets/classfeature.gen.js index 7e2e7e858..48e8d60fd 100644 --- a/client/homebrew/editor/snippetbar/snippets/classfeature.gen.js +++ b/client/homebrew/editor/snippetbar/snippets/classfeature.gen.js @@ -9,6 +9,7 @@ module.exports = function(classname){ classname = classname.toLowerCase(); const hitDie = _.sample([4, 6, 8, 10, 12]); + const spellSkill = _.sample(['Wisdom', 'Charisma', 'Intelligence']); const abilityList = ['Strength', 'Dexerity', 'Constitution', 'Wisdom', 'Charisma', 'Intelligence']; const skillList = ['Acrobatics', 'Animal Handling', 'Arcana', 'Athletics', 'Deception', 'History', 'Insight', 'Intimidation', 'Investigation', 'Medicine', 'Nature', 'Perception', 'Performance', 'Persuasion', 'Religion', 'Sleight of Hand', 'Stealth', 'Survival']; @@ -32,6 +33,14 @@ module.exports = function(classname){ **Saving Throws:** :: ${_.sampleSize(abilityList, 2).join(', ')} **Skills:** :: Choose two from ${_.sampleSize(skillList, _.random(4, 6)).join(', ')} + #### Spellcasting Ability + + {{text-align:center + **Spell save DC** = ${_.sample([6, 8, 10])} + your proficiency bonus + your ${spellSkill} modifier + : + **Spell attack modifier** = your proficiency bonus + your ${spellSkill} modifier + }} + #### Equipment You start with the following equipment, in addition to the equipment granted by your background: - *(a)* a martial weapon and a shield or *(b)* two martial weapons From 01c16b4a1c58a346105dff657cb6f7364637f58b Mon Sep 17 00:00:00 2001 From: jlgraves <107768701+jlgraves@users.noreply.github.com> Date: Sat, 18 Jun 2022 12:26:07 -0700 Subject: [PATCH 2/4] Updating legacy class feature Separated into two commits - one for new, one for legacy --- .../editor/snippetbar/snippetsLegacy/classfeature.gen.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/homebrew/editor/snippetbar/snippetsLegacy/classfeature.gen.js b/client/homebrew/editor/snippetbar/snippetsLegacy/classfeature.gen.js index e6e18e754..4d63bf1fe 100644 --- a/client/homebrew/editor/snippetbar/snippetsLegacy/classfeature.gen.js +++ b/client/homebrew/editor/snippetbar/snippetsLegacy/classfeature.gen.js @@ -8,6 +8,7 @@ module.exports = function(classname){ classname = classname.toLowerCase(); const hitDie = _.sample([4, 6, 8, 10, 12]); + const spellSkill = _.sample(['Wisdom', 'Charisma', 'Intelligence']); const abilityList = ['Strength', 'Dexerity', 'Constitution', 'Wisdom', 'Charisma', 'Intelligence']; const skillList = ['Acrobatics ', 'Animal Handling', 'Arcana', 'Athletics', 'Deception', 'History', 'Insight', 'Intimidation', 'Investigation', 'Medicine', 'Nature', 'Perception', 'Performance', 'Persuasion', 'Religion', 'Sleight of Hand', 'Stealth', 'Survival']; @@ -32,6 +33,11 @@ module.exports = function(classname){ `- **Saving Throws:** ${_.sampleSize(abilityList, 2).join(', ')}`, `- **Skills:** Choose two from ${_.sampleSize(skillList, _.random(4, 6)).join(', ')}`, '', + '#### Spellcasting Ability', + `**Spell save DC** = ${_.sample([6, 8, 10])} + your proficiency bonus + your ${spellSkill} modifier`, + '', + `**Spell attack modifier** = your proficiency bonus + your ${spellSkill} modifier `, + '', '#### Equipment', 'You start with the following equipment, in addition to the equipment granted by your background:', '- *(a)* a martial weapon and a shield or *(b)* two martial weapons', From a4c80f2bbf8eb8a5bc94cac6165db27f387658c5 Mon Sep 17 00:00:00 2001 From: jlgraves <107768701+jlgraves@users.noreply.github.com> Date: Mon, 20 Jun 2022 15:33:51 -0700 Subject: [PATCH 3/4] added review changes requested - correctly centred the legacy snippet - fixed a couple small typos in both files --- .../editor/snippetbar/snippets/classfeature.gen.js | 4 ++-- .../editor/snippetbar/snippetsLegacy/classfeature.gen.js | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/client/homebrew/editor/snippetbar/snippets/classfeature.gen.js b/client/homebrew/editor/snippetbar/snippets/classfeature.gen.js index 48e8d60fd..846af8085 100644 --- a/client/homebrew/editor/snippetbar/snippets/classfeature.gen.js +++ b/client/homebrew/editor/snippetbar/snippets/classfeature.gen.js @@ -28,7 +28,7 @@ module.exports = function(classname){ **Armor:** :: ${_.sampleSize(['Light armor', 'Medium armor', 'Heavy armor', 'Shields'], _.random(0, 3)).join(', ') || 'None'} **Weapons:** :: ${_.sampleSize(['Squeegee', 'Rubber Chicken', 'Simple weapons', 'Martial weapons'], _.random(0, 2)).join(', ') || 'None'} - **Tools:** :: ${_.sampleSize(['Artian\'s tools', 'one musical instrument', 'Thieve\'s tools'], _.random(0, 2)).join(', ') || 'None'} + **Tools:** :: ${_.sampleSize(['Artisan\'s tools', 'one musical instrument', 'Thieves\' tools'], _.random(0, 2)).join(', ') || 'None'} **Saving Throws:** :: ${_.sampleSize(abilityList, 2).join(', ')} **Skills:** :: Choose two from ${_.sampleSize(skillList, _.random(4, 6)).join(', ')} @@ -38,7 +38,7 @@ module.exports = function(classname){ {{text-align:center **Spell save DC** = ${_.sample([6, 8, 10])} + your proficiency bonus + your ${spellSkill} modifier : - **Spell attack modifier** = your proficiency bonus + your ${spellSkill} modifier + **Spell attack modifier** = your proficiency bonus + your ${spellSkill} modifier }} #### Equipment diff --git a/client/homebrew/editor/snippetbar/snippetsLegacy/classfeature.gen.js b/client/homebrew/editor/snippetbar/snippetsLegacy/classfeature.gen.js index 4d63bf1fe..67ee0f8ac 100644 --- a/client/homebrew/editor/snippetbar/snippetsLegacy/classfeature.gen.js +++ b/client/homebrew/editor/snippetbar/snippetsLegacy/classfeature.gen.js @@ -27,16 +27,19 @@ module.exports = function(classname){ '___', `- **Armor:** ${_.sampleSize(['Light armor', 'Medium armor', 'Heavy armor', 'Shields'], _.random(0, 3)).join(', ') || 'None'}`, `- **Weapons:** ${_.sampleSize(['Squeegee', 'Rubber Chicken', 'Simple weapons', 'Martial weapons'], _.random(0, 2)).join(', ') || 'None'}`, - `- **Tools:** ${_.sampleSize(['Artian\'s tools', 'one musical instrument', 'Thieve\'s tools'], _.random(0, 2)).join(', ') || 'None'}`, + `- **Tools:** ${_.sampleSize(['Artisan\'s tools', 'one musical instrument', 'Thieves\' tools'], _.random(0, 2)).join(', ') || 'None'}`, '', '___', `- **Saving Throws:** ${_.sampleSize(abilityList, 2).join(', ')}`, `- **Skills:** Choose two from ${_.sampleSize(skillList, _.random(4, 6)).join(', ')}`, '', '#### Spellcasting Ability', - `**Spell save DC** = ${_.sample([6, 8, 10])} + your proficiency bonus + your ${spellSkill} modifier`, '', - `**Spell attack modifier** = your proficiency bonus + your ${spellSkill} modifier `, + `