merge dev branch (more tests) (#47)
* more tests and bugfixes on spells * linting
This commit is contained in:
@ -7,22 +7,20 @@ const CreateResultTable = ({
|
||||
Throws: Throws,
|
||||
PointsUsed: PointsUsed,
|
||||
Bonus: Bonus = 0,
|
||||
}) => {
|
||||
return `
|
||||
}) => `
|
||||
\`\`\`
|
||||
${''.padEnd(15)} ${Attributes.map(attr => `${attr.Name}`.padStart(6)).join('\t|\t')}\t|
|
||||
${'Dein Wert'.padEnd(15)} ${Attributes.map(attr =>
|
||||
`${attr.Level}${Bonus ? `(${f(Bonus)})` : ``}`.padStart(6)
|
||||
).join('\t|\t')}\t|
|
||||
`${attr.Level}${Bonus ? `(${f(Bonus)})` : ``}`.padStart(6)
|
||||
).join('\t|\t')}\t|
|
||||
${'Dein Wurf'.padEnd(15)} ${Throws.map(Throw => `${Throw}`.padStart(6)).join('\t|\t')}\t|
|
||||
${'Abzüge'.padEnd(15)} ${PointsUsed.map(Points => `${Points}`.replace(0, '--').padStart(6)).join(
|
||||
'\t|\t'
|
||||
)}\t|
|
||||
'\t|\t'
|
||||
)}\t|
|
||||
${'Gesamt'.padEnd(15)} ${PointsUsed.reduce((acc, cur) => acc + cur)
|
||||
.toString()
|
||||
.padStart(6)}
|
||||
.toString()
|
||||
.padStart(6)}
|
||||
\`\`\`
|
||||
`;
|
||||
};
|
||||
|
||||
module.exports = { CreateResultTable, f };
|
||||
|
Reference in New Issue
Block a user