import {formatDiceMnemonic} from "./formatDiceMnemonic.js"; import {formatSpeedMnemonic} from "./formatSpeedMnemonic.js"; export function createProfileSection(data) { let profile = document.createElement('div'); profile.className = 'creature_profile'; let profileHTML = `

Profile

`; if(data['land speed']){ profileHTML += ``; } if(data['water speed']){ profileHTML += ``; } if(data['air speed']){ profileHTML += ``; } profileHTML += '
NUMBER ${formatDiceMnemonic(data.number)}
MORALE ${formatDiceMnemonic(data.morale)}
HIT DICE ${formatDiceMnemonic(data['hit dice'])}
ARMOUR ${data.armour}
ENVIRON ${data.environ.join(', ')}
LAND SPEED ${formatSpeedMnemonic(data['land speed'])}
WATER SPEED ${formatSpeedMnemonic(data['water speed'])}
AIR SPEED ${formatSpeedMnemonic(data['air speed'])}
'; profile.innerHTML = profileHTML; return profile; }