function createMonsterTargets(selectedMove) {
    for (let i = 0; i < currentMonsters.length; i++) {
        if (currentMonsters[i].hpLeft > 0) {
            let target = document.createElement("BUTTON");
            target.className = "targets";
            target.id = i;
            target.style.top = ((i * 200) + 100) + "px";
            target.style.right = 200 + "px";
            let text = document.createTextNode("TargetTest");
            target.onclick = function () {
                useMove(selectedMove, currentPlayer, currentMonsters[i], i);
            };
            target.appendChild(text);
            document.body.appendChild(target);
        }
    }
}
/**
 * Creates targets on monsters.
 * @param {Move} selectedMove move selected by current character.
 */
Creates targets on monsters.
@param {Move} selectedMove move selected by current character.
Creates targets on monsters . @param { Move } selectedMove move selected by current character .
function createMonsterTargets(selectedMove) {
    for (let i = 0; i < currentMonsters.length; i++) {
        if (currentMonsters[i].hpLeft > 0) {
            let target = document.createElement("BUTTON");
            target.className = "targets";
            target.id = i;
            target.style.top = ((i * 200) + 100) + "px";
            target.style.right = 200 + "px";
            let text = document.createTextNode("TargetTest");
            target.onclick = function () {
                useMove(selectedMove, currentPlayer, currentMonsters[i], i);
            };
            target.appendChild(text);
            document.body.appendChild(target);
        }
    }
}
function createMonsterTargets ( selectedMove ) { for ( let i = 0 ; i < currentMonsters . length ; i ++ ) { if ( currentMonsters [ i ] . hpLeft > 0 ) { let target = document . createElement ( "BUTTON" ) ; target . className = "targets" ; target . id = i ; target . style . top = ( ( i * 200 ) + 100 ) + "px" ; target . style . right = 200 + "px" ; let text = document . createTextNode ( "TargetTest" ) ; target . onclick = function ( ) { useMove ( selectedMove , currentPlayer , currentMonsters [ i ] , i ) ; } ; target . appendChild ( text ) ; document . body . appendChild ( target ) ; } } }
Creates targets on monsters.
Creates targets on monsters .