0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-22 03:07:51 +00:00

Just... put the whole table in.

This commit is contained in:
Trevor Buckner
2023-08-04 01:19:33 -04:00
parent 0da5de494e
commit 0869f6b29b

View File

@@ -11,160 +11,128 @@ const features = [
'Plasma Gunslinger', 'Police Necromancer', 'Ritual Astronomy', 'Plasma Gunslinger', 'Police Necromancer', 'Ritual Astronomy',
'Sixgun Poisoner', 'Seismological Alchemy', 'Spiritual Illusionism', 'Sixgun Poisoner', 'Seismological Alchemy', 'Spiritual Illusionism',
'Statistical Occultism', 'Spell Analyst', 'Torque Interfacer' 'Statistical Occultism', 'Spell Analyst', 'Torque Interfacer'
].map((f)=>_.padEnd(f, 21)); // Pad to equal length of 21 chars long
const classnames = [
'Ackerman', 'Berserker-Typist', 'Concierge', 'Fishmonger',
'Haberdasher', 'Manicurist', 'Netrunner', 'Weirkeeper'
]; ];
const classnames = ['Ackerman', 'Berserker-Typist', 'Concierge', 'Fishmonger',
'Haberdasher', 'Manicurist', 'Netrunner', 'Weirkeeper'];
const levels = ['1st', '2nd', '3rd', '4th', '5th',
'6th', '7th', '8th', '9th', '10th',
'11th', '12th', '13th', '14th', '15th',
'16th', '17th', '18th', '19th', '20th'];
const profBonus = [2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6];
module.exports = { module.exports = {
non : function(snippetClasses){ non : function(snippetClasses){
const classname = _.sample(classnames);
return dedent` return dedent`
{{${snippetClasses} {{${snippetClasses}
##### The ${classname} ##### The ${_.sample(classnames)}
| Level | Proficiency | Features | | Level | Proficiency Bonus | Features | ${_.sample(features)} |
| ^| Bonus ^| ^| |:-----:|:-----------------:|:---------|:---------------------:|
|:-----:|:-----------:|:-------------| | 1st | +2 | ${_.sample(features)} | 2 |
${ | 2nd | +2 | ${_.sample(features)} | 2 |
_.map(levels, function(levelName, level){ | 3rd | +2 | ${_.sample(features)} | 3 |
const res = [ | 4th | +2 | ${_.sample(features)} | 3 |
_.pad(levelName, 5), | 5th | +3 | ${_.sample(features)} | 3 |
_.pad(`+${profBonus[level]}`, 2), | 6th | +3 | ${_.sample(features)} | 4 |
_.padEnd(_.sample(features), 21), | 7th | +3 | ${_.sample(features)} | 4 |
].join(' | '); | 8th | +3 | ${_.sample(features)} | 4 |
return `| ${res} |`; | 9th | +4 | ${_.sample(features)} | 4 |
}).join('\n') | 10th | +4 | ${_.sample(features)} | 4 |
} | 11th | +4 | ${_.sample(features)} | 4 |
| 12th | +4 | ${_.sample(features)} | 5 |
| 13th | +5 | ${_.sample(features)} | 5 |
| 14th | +5 | ${_.sample(features)} | 5 |
| 15th | +5 | ${_.sample(features)} | 5 |
| 16th | +5 | ${_.sample(features)} | 5 |
| 17th | +6 | ${_.sample(features)} | 6 |
| 18th | +6 | ${_.sample(features)} | 6 |
| 19th | +6 | ${_.sample(features)} | 6 |
| 20th | +6 | ${_.sample(features)} | unlimited |
}}\n\n`; }}\n\n`;
}, },
full : function(snippetClasses){ full : function(snippetClasses){
const classname = _.sample(classnames);
const cantripsKnown = [2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
const spells = [
'2 | — | — | — | — | — | — | — | — ',
'3 | — | — | — | — | — | — | — | — ',
'4 | 2 | — | — | — | — | — | — | — ',
'4 | 3 | — | — | — | — | — | — | — ',
'4 | 3 | 2 | — | — | — | — | — | — ',
'4 | 3 | 3 | — | — | — | — | — | — ',
'4 | 3 | 3 | 1 | — | — | — | — | — ',
'4 | 3 | 3 | 2 | — | — | — | — | — ',
'4 | 3 | 3 | 2 | 1 | — | — | — | — ',
'4 | 3 | 3 | 2 | 1 | — | — | — | — ',
'4 | 3 | 3 | 2 | 1 | 1 | — | — | — ',
'4 | 3 | 3 | 2 | 1 | 1 | — | — | — ',
'4 | 3 | 3 | 2 | 1 | 1 | 1 | — | — ',
'4 | 3 | 3 | 2 | 1 | 1 | 1 | — | — ',
'4 | 3 | 3 | 2 | 1 | 1 | 1 | 1 | — ',
'4 | 3 | 3 | 2 | 1 | 1 | 1 | 1 | — ',
'4 | 3 | 3 | 2 | 1 | 1 | 1 | 1 | 1 ',
'4 | 3 | 3 | 3 | 1 | 1 | 1 | 1 | 1 ',
'4 | 3 | 3 | 3 | 2 | 2 | 1 | 1 | 1 ',
'4 | 3 | 3 | 3 | 2 | 2 | 2 | 1 | 1 '
];
return dedent` return dedent`
{{${snippetClasses} {{${snippetClasses}
##### The ${classname} ##### The ${_.sample(classnames)}
| Level | Proficiency | Features | Cantrips | --- Spell Slots Per Spell Level ---||||||||| | Level | Proficiency | Features | Cantrips | --- Spell Slots Per Spell Level ---|||||||||
| ^| Bonus ^| ^| Known ^|1st |2nd |3rd |4th |5th |6th |7th |8th |9th | | ^| Bonus ^| ^| Known ^|1st |2nd |3rd |4th |5th |6th |7th |8th |9th |
|:-----:|:-----------:|:-------------|:--------:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:| |:-----:|:-----------:|:-------------|:--------:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
${ | 1st | +2 | ${_.sample(features)} | 2 | 2 | — | — | — | — | — | — | — | — |
_.map(levels, function(level, idx){ | 2nd | +2 | ${_.sample(features)} | 2 | 3 | — | — | — | — | — | — | — | — |
return `| ${_.pad(level, 5)} | +${profBonus[idx]} | ${_.padEnd(_.sample(features), 21)} | ${_.pad(cantripsKnown[idx], 8)} | ${spells[idx]} |`; | 3rd | +2 | ${_.sample(features)} | 2 | 4 | 2 | — | — | — | — | — | — | — |
}).join('\n') | 4th | +2 | ${_.sample(features)} | 3 | 4 | 3 | — | — | — | — | — | — | — |
} | 5th | +3 | ${_.sample(features)} | 3 | 4 | 3 | 2 | — | — | — | — | — | — |
| 6th | +3 | ${_.sample(features)} | 3 | 4 | 3 | 3 | — | — | — | — | — | — |
| 7th | +3 | ${_.sample(features)} | 3 | 4 | 3 | 3 | 1 | — | — | — | — | — |
| 8th | +3 | ${_.sample(features)} | 3 | 4 | 3 | 3 | 2 | — | — | — | — | — |
| 9th | +4 | ${_.sample(features)} | 3 | 4 | 3 | 3 | 2 | 1 | — | — | — | — |
| 10th | +4 | ${_.sample(features)} | 3 | 4 | 3 | 3 | 2 | 1 | — | — | — | — |
| 11th | +4 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | — | — | — |
| 12th | +4 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | — | — | — |
| 13th | +5 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | 1 | — | — |
| 14th | +5 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | 1 | — | — |
| 15th | +5 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | 1 | 1 | — |
| 16th | +5 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | 1 | 1 | — |
| 17th | +6 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | 1 | 1 | 1 |
| 18th | +6 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 3 | 1 | 1 | 1 | 1 | 1 |
| 19th | +6 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 3 | 2 | 2 | 1 | 1 | 1 |
| 20th | +6 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 3 | 2 | 2 | 2 | 1 | 1 |
}}\n\n`; }}\n\n`;
}, },
half : function(snippetClasses){ half : function(snippetClasses){
const classname = _.sample(classnames);
const spellsKnown = ['—', 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11];
const spells = [
' — | — | — | — | — ',
' 2 | — | — | — | — ',
' 3 | — | — | — | — ',
' 3 | — | — | — | — ',
' 4 | 2 | — | — | — ',
' 4 | 2 | — | — | — ',
' 4 | 3 | — | — | — ',
' 4 | 3 | — | — | — ',
' 4 | 3 | 2 | — | — ',
' 4 | 3 | 2 | — | — ',
' 4 | 3 | 3 | — | — ',
' 4 | 3 | 3 | — | — ',
' 4 | 3 | 3 | 1 | — ',
' 4 | 3 | 3 | 1 | — ',
' 4 | 3 | 3 | 2 | — ',
' 4 | 3 | 3 | 2 | — ',
' 4 | 3 | 3 | 3 | 1 ',
' 4 | 3 | 3 | 3 | 1 ',
' 4 | 3 | 3 | 3 | 2 ',
' 4 | 3 | 3 | 3 | 2 '
];
return dedent` return dedent`
{{${snippetClasses} {{${snippetClasses}
##### The ${classname} ##### The ${_.sample(classnames)}
| Level | Proficiency | Features | Spells |--- Spell Slots Per Spell Level ---||||| | Level | Proficiency | Features | Spells |--- Spell Slots Per Spell Level ---|||||
| ^| Bonus ^| ^| Known ^| 1st | 2nd | 3rd | 4th | 5th | | ^| Bonus ^| ^| Known ^| 1st | 2nd | 3rd | 4th | 5th |
|:-----:|:-----------:|:-------------|:------:|:-----:|:-----:|:-----:|:-----:|:-----:| |:-----:|:-----------:|:-------------|:------:|:-----:|:-----:|:-----:|:-----:|:-----:|
${ | 1st | +2 | ${_.sample(features)} | — | — | — | — | — | — |
_.map(levels, function(level, idx){ | 2nd | +2 | ${_.sample(features)} | 2 | 2 | — | — | — | — |
return `| ${_.pad(level, 5)} | +${profBonus[idx]} | ${_.padEnd(_.sample(features), 21)} | ${_.pad(spellsKnown[idx], 6)} | ${spells[idx]} |`; | 3rd | +2 | ${_.sample(features)} | 3 | 3 | — | — | — | — |
}).join('\n') | 4th | +2 | ${_.sample(features)} | 3 | 3 | — | — | — | — |
} | 5th | +3 | ${_.sample(features)} | 4 | 4 | 2 | — | — | — |
| 6th | +3 | ${_.sample(features)} | 4 | 4 | 2 | — | — | — |
| 7th | +3 | ${_.sample(features)} | 5 | 4 | 3 | — | — | — |
| 8th | +3 | ${_.sample(features)} | 5 | 4 | 3 | — | — | — |
| 9th | +4 | ${_.sample(features)} | 6 | 4 | 3 | 2 | — | — |
| 10th | +4 | ${_.sample(features)} | 6 | 4 | 3 | 2 | — | — |
| 11th | +4 | ${_.sample(features)} | 7 | 4 | 3 | 3 | — | — |
| 12th | +4 | ${_.sample(features)} | 7 | 4 | 3 | 3 | — | — |
| 13th | +5 | ${_.sample(features)} | 8 | 4 | 3 | 3 | 1 | — |
| 14th | +5 | ${_.sample(features)} | 8 | 4 | 3 | 3 | 1 | — |
| 15th | +5 | ${_.sample(features)} | 9 | 4 | 3 | 3 | 2 | — |
| 16th | +5 | ${_.sample(features)} | 9 | 4 | 3 | 3 | 2 | — |
| 17th | +6 | ${_.sample(features)} | 10 | 4 | 3 | 3 | 3 | 1 |
| 18th | +6 | ${_.sample(features)} | 10 | 4 | 3 | 3 | 3 | 1 |
| 19th | +6 | ${_.sample(features)} | 11 | 4 | 3 | 3 | 3 | 2 |
| 20th | +6 | ${_.sample(features)} | 11 | 4 | 3 | 3 | 3 | 2 |
}}\n\n`; }}\n\n`;
}, },
third : function(snippetClasses){ third : function(snippetClasses){
const classname = _.sample(classnames);
const cantripsKnown = [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
const spellsKnown = [3, 4, 4, 4, 5, 6, 6, 7, 8, 8, 9, 10, 10, 11, 11, 11, 12, 13];
const spells = [
' 2 | — | — | — ',
' 3 | — | — | — ',
' 3 | — | — | — ',
' 3 | — | — | — ',
' 4 | 2 | — | — ',
' 4 | 2 | — | — ',
' 4 | 2 | — | — ',
' 4 | 3 | — | — ',
' 4 | 3 | — | — ',
' 4 | 3 | — | — ',
' 4 | 3 | 2 | — ',
' 4 | 3 | 2 | — ',
' 4 | 3 | 2 | — ',
' 4 | 3 | 3 | — ',
' 4 | 3 | 3 | — ',
' 4 | 3 | 3 | — ',
' 4 | 3 | 3 | 1 ',
' 4 | 3 | 3 | 1 '
];
return dedent` return dedent`
{{${snippetClasses} {{${snippetClasses}
##### ${classname} Spellcasting ##### ${_.sample(classnames)} Spellcasting
| Level | Cantrips | Spells |--- Spells Slots per Spell Level ---|||| | Level | Cantrips | Spells |--- Spells Slots per Spell Level ---||||
| ^| Known ^| Known ^| 1st | 2nd | 3rd | 4th | | ^| Known ^| Known ^| 1st | 2nd | 3rd | 4th |
|:-----:|:--------:|:------:|:-------:|:-------:|:-------:|:-------:| |:-----:|:--------:|:------:|:-------:|:-------:|:-------:|:-------:|
${ | 3rd | 2 | 3 | 2 | — | — | — |
_.map(levels.slice(2), function(level, idx){ | 4th | 2 | 4 | 3 | — | — | — |
return `| ${_.pad(level, 5)} | ${_.pad(cantripsKnown[idx], 8)} | ${_.pad(spellsKnown[idx], 6)} | ${spells[idx]} |`; | 5th | 2 | 4 | 3 | — | — | — |
}).join('\n') | 6th | 2 | 4 | 3 | — | — | — |
} | 7th | 2 | 5 | 4 | 2 | — | — |
| 8th | 2 | 6 | 4 | 2 | — | — |
| 9th | 2 | 6 | 4 | 2 | — | — |
| 10th | 3 | 7 | 4 | 3 | — | — |
| 11th | 3 | 8 | 4 | 3 | — | — |
| 12th | 3 | 8 | 4 | 3 | — | — |
| 13th | 3 | 9 | 4 | 3 | 2 | — |
| 14th | 3 | 10 | 4 | 3 | 2 | — |
| 15th | 3 | 10 | 4 | 3 | 2 | — |
| 16th | 3 | 11 | 4 | 3 | 3 | — |
| 17th | 3 | 11 | 4 | 3 | 3 | — |
| 18th | 3 | 11 | 4 | 3 | 3 | — |
| 19th | 3 | 12 | 4 | 3 | 3 | 1 |
| 20th | 3 | 13 | 4 | 3 | 3 | 1 |
}}\n\n`; }}\n\n`;
} }
}; };