gammatools/web/assets/js/createAbilitiesSection.js

20 lines
893 B
JavaScript
Raw Permalink Normal View History

import {formatDiceMnemonic} from "./formatDiceMnemonic.js";
export function createAbilitiesSection(data) {
// Abilities section
let abilities = document.createElement('div');
abilities.className = 'creature_abilities';
abilities.innerHTML = `
<h3>Abilities</h3>
<table>
<tr><td><b>MS</b></td> <td>${formatDiceMnemonic(data.ms)}</td></tr>
<tr><td><b>IN</b></td> <td>${formatDiceMnemonic(data.in)}</td></tr>
<tr><td><b>DX</b></td> <td>${formatDiceMnemonic(data.dx)}</td></tr>
<tr><td><b>CH</b></td> <td>${formatDiceMnemonic(data.ch)}</td></tr>
<tr><td><b>CN</b></td> <td>${formatDiceMnemonic(data.cn)}</td></tr>
<tr><td><b>PS</b></td> <td>${formatDiceMnemonic(data.ps)}</td></tr>
</table>
`;
return abilities;
}