mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-13 17:22:49 +00:00
Adding in notes and adding more to blocks
This commit is contained in:
@@ -1,2 +1,82 @@
|
||||
const _ = require('lodash');
|
||||
const Data = require('./random.data.js');
|
||||
const Data = require('./random.data.js');
|
||||
|
||||
const getFeature = (level)=>{
|
||||
let res = []
|
||||
if(_.includes([4,6,8,12,14,16,19], level+1)){
|
||||
res = ['Ability Score Improvement']
|
||||
}
|
||||
res = _.union(res, _.sampleSize(Data.abilities, _.sample([0,1,1,1,1,1])));
|
||||
if(!res.length) return '─';
|
||||
return res.join(', ');
|
||||
};
|
||||
|
||||
|
||||
module.exports = {
|
||||
|
||||
casterTable : ()=>{
|
||||
|
||||
let featureScore = 1
|
||||
const rows = _.map(Data.levels, (lvlText, level)=>{
|
||||
featureScore += _.random(0,1);
|
||||
return '| ' + [
|
||||
lvlText,
|
||||
'+'+Math.floor(level/4 + 2),
|
||||
getFeature(level),
|
||||
'+'+featureScore
|
||||
].join(' | ') + ' |';
|
||||
}).join('\n');
|
||||
|
||||
return `{{frame,wide
|
||||
##### ${Data.rand('classes')}
|
||||
| Level | Proficiency Bonus | Features | Cantrips Known | Spells Known | 1st | 2nd | 3rd | 4th | 5th | 6th | 7th | 8th | 9th |
|
||||
|:---:|:---:|:---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||
${rows}
|
||||
}}`;
|
||||
},
|
||||
|
||||
|
||||
halfcasterTable : ()=>{
|
||||
let featureScore = 1
|
||||
const rows = _.map(Data.levels, (lvlText, level)=>{
|
||||
featureScore += _.random(0,1);
|
||||
return '| ' + [
|
||||
lvlText,
|
||||
'+'+Math.floor(level/4 + 2),
|
||||
getFeature(level),
|
||||
'+'+featureScore
|
||||
].join(' | ') + ' |';
|
||||
}).join('\n');
|
||||
|
||||
|
||||
return `{{frame,wide
|
||||
##### ${Data.rand('classes')}
|
||||
| Level | Proficiency Bonus | Features | 1st | 2nd | 3rd | 4th | 5th |
|
||||
|:---:|:---:|:---|:---:|:---:|:---:|:---:|:---:|
|
||||
${rows}
|
||||
}}`;
|
||||
|
||||
},
|
||||
|
||||
noncasterTable : ()=>{
|
||||
let featureScore = 1
|
||||
const rows = _.map(Data.levels, (lvlText, level)=>{
|
||||
featureScore += _.random(0,1);
|
||||
return '| ' + [
|
||||
lvlText,
|
||||
'+'+Math.floor(level/4 + 2),
|
||||
getFeature(level),
|
||||
'+'+featureScore
|
||||
].join(' | ') + ' |';
|
||||
}).join('\n');
|
||||
|
||||
return `{{frame
|
||||
##### ${Data.rand('classes')}
|
||||
| Level | Proficiency Bonus | Features | ${Data.rand('abilities')} |
|
||||
|:---:|:---:|:---|:---:|
|
||||
${rows}
|
||||
}}`;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -2,7 +2,9 @@ const _ = require('lodash');
|
||||
|
||||
module.exports = _.merge(
|
||||
require('./spell.snippet.js'),
|
||||
require('./table.snippet.js')
|
||||
require('./table.snippet.js'),
|
||||
require('./classTable.snippet.js'),
|
||||
require('./note.snippet.js')
|
||||
|
||||
|
||||
//wide
|
||||
|
||||
22
shared/homebrewery/snippets/brew/note.snippet.js
Normal file
22
shared/homebrewery/snippets/brew/note.snippet.js
Normal file
@@ -0,0 +1,22 @@
|
||||
const _ = require('lodash');
|
||||
const Data = require('./random.data.js');
|
||||
|
||||
|
||||
module.exports = {
|
||||
note : ()=>{
|
||||
return `{{note
|
||||
##### ${Data.rand('abilities')}
|
||||
${Data.rand('sentences', 6, 4).join(' ')}
|
||||
}}`
|
||||
|
||||
},
|
||||
|
||||
altnote : ()=>{
|
||||
return `{{note,alt
|
||||
##### ${Data.rand('abilities')}
|
||||
${Data.rand('sentences', 6, 4).join(' ')}
|
||||
}}`
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -284,6 +284,39 @@ const Data = {
|
||||
`Yielding Throw of the Mills`,
|
||||
],
|
||||
|
||||
abilities : [
|
||||
"Astrological Botany",
|
||||
"Astrological Chemistry",
|
||||
"Biochemical Sorcery",
|
||||
"Civil Alchemy",
|
||||
"Consecrated Biochemistry",
|
||||
"Demonic Anthropology",
|
||||
"Divinatory Mineralogy",
|
||||
"Genetic Banishing",
|
||||
"Hermetic Geography",
|
||||
"Immunological Incantations",
|
||||
"Nuclear Illusionism",
|
||||
"Ritual Astronomy",
|
||||
"Seismological Divination",
|
||||
"Spiritual Biochemistry",
|
||||
"Statistical Occultism",
|
||||
"Police Necromancer",
|
||||
"Sixgun Poisoner",
|
||||
"Pharmaceutical Gunslinger",
|
||||
"Infernal Banker",
|
||||
"Spell Analyst",
|
||||
"Gunslinger Corruptor",
|
||||
"Torque Interfacer",
|
||||
"Exo Interfacer",
|
||||
"Gunpowder Torturer",
|
||||
"Orbital Gravedigger",
|
||||
"Phased Linguist",
|
||||
"Mathematical Pharmacist",
|
||||
"Plasma Outlaw",
|
||||
"Malefic Chemist",
|
||||
"Police Cultist"
|
||||
],
|
||||
|
||||
alignments : [
|
||||
"Annoying Evil",
|
||||
"Chaotic Gossipy",
|
||||
@@ -309,10 +342,21 @@ const Data = {
|
||||
],
|
||||
|
||||
sizes : ['Microscopic', 'Tiny', 'Small', 'Medium', 'Large', 'Gargantuan', 'Stupidly vast'],
|
||||
levels : ["1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th", "10th", "11th", "12th", "13th", "14th", "15th", "16th", "17th", "18th", "19th", "20th"],
|
||||
|
||||
|
||||
|
||||
|
||||
sentences : [
|
||||
`The suspicion arises the narrator of the tale is actually a demon.`,
|
||||
`There is a predicted hurricane - but it's not what was expected, and this complicates the plans of the protagonist.`,
|
||||
`The antagonist's believes their life has changed for the strange - this turns out to be this is due to being lied to by others`,
|
||||
`An accidental cuddle leads to complications.`,
|
||||
`It's revealed that everything that is happening is all a dream.`,
|
||||
`There is a sudden hurricane.`,
|
||||
`The alternate protagonist is revealed to be a different race/species than thought, which suddenly makes what's going on much clearer.`,
|
||||
`Thanks to alien forces, the characters end up in the earth's past.`,
|
||||
`Thanks to alien forces, the secondary protagonist ends up in a world after an apocalypse.`,
|
||||
`Due to a panic attack a character has to get psychological therapy.`,
|
||||
]
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ const columns = {
|
||||
return _.concat([`d${rows}`, ':---:'], _.times(rows, (i)=>i+1));
|
||||
},
|
||||
level : (rows)=>{
|
||||
return _.concat([`${_.sample(Data.classes)} Level`, ':---:'], _.times(rows, (i)=>`${i*2+3}th`));
|
||||
return _.concat([`${_.sample(Data.classes)} Level`, ':---:'], _.times(rows, (i)=>Data.levels[i*2]));
|
||||
},
|
||||
|
||||
spell : (rows)=>{
|
||||
|
||||
Reference in New Issue
Block a user