0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-08 18:22:40 +00:00

Clean up half caster gen.

This commit is contained in:
Trevor Buckner
2023-08-04 00:04:17 -04:00
parent e3e250255e
commit bc9dc8dee9

View File

@@ -92,31 +92,37 @@ module.exports = {
const spellsKnown = ['—', 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11]; const spellsKnown = ['—', 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11];
const spells = [ const spells = [
['—', 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], ' — | — | — | — | — ',
['—', '—', '—', '—', 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], ' 2 | — | — | — | — ',
['—', '—', '—', '—', '—', '—', '—', '—', 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], ' 3 | — | — | — | — ',
['—', '—', '—', '—', '—', '—', '—', '—', '—', '—', '—', '—', 1, 1, 2, 2, 3, 3, 3, 3], ' 3 | — | — | — | — ',
['—', '—', '—', '—', '—', '—', '—', '—', '—', '—', '—', '—', '—', '—', '—', '—', 1, 1, 2, 2], ' 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 ${classname}
| 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 |
|:-----:|:-----------:|:-------------|:------:|:--:|:--:|:--:|:--:|:--:| |:-----:|:-----------:|:-------------|:------:|:-----:|:-----:|:-----:|:-----:|:-----:|
${ ${
_.map(levels, function(levelName, level){ _.map(levels, function(level, idx){
const res = [ return `| ${_.pad(level, 5)} | +${profBonus[idx]} | ${_.padEnd(_.sample(features), 21)} | ${_.pad(spellsKnown[idx], 6)} | ${spells[idx]} |`;
_.pad(levelName, 5),
_.pad(`+${profBonus[level]}`, 2),
_.padEnd(_.sample(features), 21),
_.pad(spellsKnown[level].toString(), 6),
spells.map((spellList)=>{
return _.pad(spellList[level].toString(), 2);
}).join(' | '),
].join(' | ');
return `| ${res} |`;
}).join('\n') }).join('\n')
} }
}}\n\n`; }}\n\n`;