0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-06 16:32:40 +00:00

fix some indentation issues for circleCI

This commit is contained in:
Gazook89
2021-08-10 09:11:14 -05:00
parent 9f519b469d
commit 2a428100c5

View File

@@ -116,40 +116,40 @@ module.exports = {
third : function(classes){ third : function(classes){
const classname = _.sample(classnames); const classname = _.sample(classnames);
const maxes = [4, 3, 3, 3, 3, 2, 2, 1, 1]; const maxes = [4, 3, 3, 3, 3, 2, 2, 1, 1];
const drawSlots = function(Slots){ const drawSlots = function(Slots){
let slots = Number(Slots); let slots = Number(Slots);
return _.times(4, function(i){ return _.times(4, function(i){
const max = maxes[i]; const max = maxes[i];
if(slots < 1) return '—'; if(slots < 1) return '—';
const res = _.min([max, slots]); const res = _.min([max, slots]);
slots -= res; slots -= res;
return res; return res;
}).join(' | '); }).join(' | ');
}; };
let cantrips = 3; let cantrips = 3;
let spells = 1; let spells = 1;
let slots = 2; let slots = 2;
return `{{${classes}\n##### ${classname} Spellcasting\n` + return `{{${classes}\n##### ${classname} Spellcasting\n` +
`| Class | Cantrips | Spells | --- Spells Slots per Spell Level --- ||||\n` + `| Class | Cantrips | Spells | --- Spells Slots per Spell Level --- ||||\n` +
`| Level ^| Known ^| Known ^| 1st | 2nd | 3rd | 4th |\n` + `| Level ^| Known ^| Known ^| 1st | 2nd | 3rd | 4th |\n` +
`|:---:|:---:|:---:|:---:|:---:|:---:|:---:|\n${ `|:---:|:---:|:---:|:---:|:---:|:---:|:---:|\n${
_.map(levels, function(levelName, level){ _.map(levels, function(levelName, level){
const res = [ const res = [
levelName, levelName,
cantrips, cantrips,
spells, spells,
drawSlots(slots) drawSlots(slots)
].join(' | '); ].join(' | ');
cantrips += _.random(0, 1); cantrips += _.random(0, 1);
spells += _.random(0, 1); spells += _.random(0, 1);
slots += _.random(0, 2); slots += _.random(0, 2);
return `| ${res} |`; return `| ${res} |`;
}).join('\n')}\n}}\n\n`; }).join('\n')}\n}}\n\n`;
} }
}; };