function parseTooltip(tooltip) {
    let value = [""]
    let abilityIndex = 0;
    for (let i = 0; i < tooltip.length; i++) { 
        if (tooltip.charAt(i) == '<') {

            //fail if <sc appears <scaleAP or <scaleAD
            //fail if <p appears <physicalDamage>
            //pass if sp appears
            //right now sp fails
            if ((tooltip.charAt(i+1) != 's'
                && tooltip.charAt(i+2) != 'c')
                && tooltip.charAt(i+1) != 'p' 
                || tooltip.charAt(i+1) == 's' 
                && tooltip.charAt(i+2) == 'p') {
                i++;
                continue;
            }

            let j = i; //index of 'd'

            //finds potential 'damage' candidate
            for (j; j < tooltip.length-5; j++) {
                if (tooltip.charAt(j) == 'd' 
                && tooltip.charAt(j-1) == ' ' //can't be part of a variable
                && tooltip.charAt(j+5) == 'e') {  //checks if 'd' string ends with 'e'
                    break;
                }
            }

            if (tooltip.charAt(j+5) != 'e') { //breaks loop if 'd...e' string not found
                break;
            }

            if (tooltip.charAt(i-2) == '}') { //{{var}} checker 
                for (i; i > 0; i--) {
                    if (tooltip.charAt(i) == '{') {
                        i--;
                        break;
                    }
                }
            }
            value[abilityIndex] = tooltip.substring(i, j+6)
            abilityIndex++;
            i = j+6;
        }
    }
    return value;
    
}
/**
 * parses the tooltip for important damage part
 * @param {*} tooltip string given by the ability of interes
 */
parses the tooltip for important damage part
@param {*} tooltip string given by the ability of interes
parses the tooltip for important damage part @param { * } tooltip string given by the ability of interes
function parseTooltip(tooltip) {
    let value = [""]
    let abilityIndex = 0;
    for (let i = 0; i < tooltip.length; i++) { 
        if (tooltip.charAt(i) == '<') {
            if ((tooltip.charAt(i+1) != 's'
                && tooltip.charAt(i+2) != 'c')
                && tooltip.charAt(i+1) != 'p' 
                || tooltip.charAt(i+1) == 's' 
                && tooltip.charAt(i+2) == 'p') {
                i++;
                continue;
            }
            let j = i; 
            for (j; j < tooltip.length-5; j++) {
                if (tooltip.charAt(j) == 'd' 
                && tooltip.charAt(j-1) == ' ' 
                && tooltip.charAt(j+5) == 'e') {  
                    break;
                }
            }
            if (tooltip.charAt(j+5) != 'e') { 
                break;
            }
            if (tooltip.charAt(i-2) == '}') { 
                for (i; i > 0; i--) {
                    if (tooltip.charAt(i) == '{') {
                        i--;
                        break;
                    }
                }
            }
            value[abilityIndex] = tooltip.substring(i, j+6)
            abilityIndex++;
            i = j+6;
        }
    }
    return value;
}
function parseTooltip ( tooltip ) { let value = [ "" ] let abilityIndex = 0 ; for ( let i = 0 ; i < tooltip . length ; i ++ ) { if ( tooltip . charAt ( i ) == '<' ) { if ( ( tooltip . charAt ( i + 1 ) != 's' && tooltip . charAt ( i + 2 ) != 'c' ) && tooltip . charAt ( i + 1 ) != 'p' || tooltip . charAt ( i + 1 ) == 's' && tooltip . charAt ( i + 2 ) == 'p' ) { i ++ ; continue ; } let j = i ; for ( j ; j < tooltip . length - 5 ; j ++ ) { if ( tooltip . charAt ( j ) == 'd' && tooltip . charAt ( j - 1 ) == ' ' && tooltip . charAt ( j + 5 ) == 'e' ) { break ; } } if ( tooltip . charAt ( j + 5 ) != 'e' ) { break ; } if ( tooltip . charAt ( i - 2 ) == '}' ) { for ( i ; i > 0 ; i -- ) { if ( tooltip . charAt ( i ) == '{' ) { i -- ; break ; } } } value [ abilityIndex ] = tooltip . substring ( i , j + 6 ) abilityIndex ++ ; i = j + 6 ; } } return value ; }
parses the tooltip for important damage part
 @param {*} tooltip string given by the ability of interes
parses the tooltip for important damage part @param { * } tooltip string given by the ability of interes
//fail if <sc appears <scaleAP or <scaleAD //fail if <p appears <physicalDamage> //pass if sp appears //right now sp fails //index of 'd' //finds potential 'damage' candidate //can't be part of a variable //checks if 'd' string ends with 'e' //breaks loop if 'd...e' string not found //{{var}} checker 