function addStats() {
    for (let i = 1; i <= amountOfCharacters; i++) {
        document.getElementById("player" + i + "HPNumber").innerHTML = currentCharacters[i - 1].hpLeft + "/" + currentCharacters[i - 1].hp;
        document.getElementById("player" + i + "MPNumber").innerHTML = currentCharacters[i - 1].mpLeft + "/" + currentCharacters[i - 1].mp;
        document.getElementById("player" + i + "Name").innerHTML = currentCharacters[i - 1].name;
    }
    for (let j = 1; j <= amountOfMonsters; j++) {
        document.getElementById("enemy" + j + "HPNumber").innerHTML = currentMonsters[j - 1].hpLeft + "/" + currentMonsters[j - 1].hp;
        document.getElementById("enemy" + j + "MPNumber").innerHTML = currentMonsters[j - 1].mpLeft + "/" + currentMonsters[j - 1].mp;
        document.getElementById("enemy" + j + "Name").innerHTML = currentMonsters[j - 1].name;
    }
}
/**
 * Adds the combatants stats to the screen.
 */
Adds the combatants stats to the screen.
Adds the combatants stats to the screen .
function addStats() {
    for (let i = 1; i <= amountOfCharacters; i++) {
        document.getElementById("player" + i + "HPNumber").innerHTML = currentCharacters[i - 1].hpLeft + "/" + currentCharacters[i - 1].hp;
        document.getElementById("player" + i + "MPNumber").innerHTML = currentCharacters[i - 1].mpLeft + "/" + currentCharacters[i - 1].mp;
        document.getElementById("player" + i + "Name").innerHTML = currentCharacters[i - 1].name;
    }
    for (let j = 1; j <= amountOfMonsters; j++) {
        document.getElementById("enemy" + j + "HPNumber").innerHTML = currentMonsters[j - 1].hpLeft + "/" + currentMonsters[j - 1].hp;
        document.getElementById("enemy" + j + "MPNumber").innerHTML = currentMonsters[j - 1].mpLeft + "/" + currentMonsters[j - 1].mp;
        document.getElementById("enemy" + j + "Name").innerHTML = currentMonsters[j - 1].name;
    }
}
function addStats ( ) { for ( let i = 1 ; i <= amountOfCharacters ; i ++ ) { document . getElementById ( "player" + i + "HPNumber" ) . innerHTML = currentCharacters [ i - 1 ] . hpLeft + "/" + currentCharacters [ i - 1 ] . hp ; document . getElementById ( "player" + i + "MPNumber" ) . innerHTML = currentCharacters [ i - 1 ] . mpLeft + "/" + currentCharacters [ i - 1 ] . mp ; document . getElementById ( "player" + i + "Name" ) . innerHTML = currentCharacters [ i - 1 ] . name ; } for ( let j = 1 ; j <= amountOfMonsters ; j ++ ) { document . getElementById ( "enemy" + j + "HPNumber" ) . innerHTML = currentMonsters [ j - 1 ] . hpLeft + "/" + currentMonsters [ j - 1 ] . hp ; document . getElementById ( "enemy" + j + "MPNumber" ) . innerHTML = currentMonsters [ j - 1 ] . mpLeft + "/" + currentMonsters [ j - 1 ] . mp ; document . getElementById ( "enemy" + j + "Name" ) . innerHTML = currentMonsters [ j - 1 ] . name ; } }
Adds the combatants stats to the screen.
Adds the combatants stats to the screen .