function useMove(moveName, character, target, id) {
    removeMoveElements();
    let move = findMove(moveName);
    if (checkforMP(character, move)) {
        changeCurrentMP(character, move.mp);
        characterDamaged(calculateDamage(character, move), target, id);
    } else {
        alert("You do not have enough MP left!");
    }
    currentUnitTurn++;
    nextUnitsTurn(combatantsSorted);
}
/**
 * Uses the selected move on selected target.
 * @param {String} moveName name of the selected move.
 * @param {Character} character the character using the move.
 * @param {Character/Monster} target the selected moves target.
 */
Uses the selected move on selected target.
@param {String} moveName name of the selected move.
@param {Character} character the character using the move.
@param {Character/Monster} target the selected moves target.
Uses the selected move on selected target . @param { String } moveName name of the selected move . @param { Character } character the character using the move . @param { Character / Monster } target the selected moves target .
function useMove(moveName, character, target, id) {
    removeMoveElements();
    let move = findMove(moveName);
    if (checkforMP(character, move)) {
        changeCurrentMP(character, move.mp);
        characterDamaged(calculateDamage(character, move), target, id);
    } else {
        alert("You do not have enough MP left!");
    }
    currentUnitTurn++;
    nextUnitsTurn(combatantsSorted);
}
function useMove ( moveName , character , target , id ) { removeMoveElements ( ) ; let move = findMove ( moveName ) ; if ( checkforMP ( character , move ) ) { changeCurrentMP ( character , move . mp ) ; characterDamaged ( calculateDamage ( character , move ) , target , id ) ; } else { alert ( "You do not have enough MP left!" ) ; } currentUnitTurn ++ ; nextUnitsTurn ( combatantsSorted ) ; }
Uses the selected move on selected target.
Uses the selected move on selected target .