function init(hero) {
    hero.setName("Mind Stone");
    hero.setTier(2);
    
    hero.setChestplate("Scepter");

    hero.addPowers("jmctheroes:mind_stone");

    hero.addKeyBind("ENERGY_PROJECTION", "\u00A7eEnergy Blast", 1);
    hero.addKeyBind("MIND_STONE", "Toggle Mind Stone", 5);

    hero.addAttributeProfile("MIND", mindProfile);
    hero.setModifierEnabled(isModifierEnabled);
    hero.setKeyBindEnabled(isKeyBindEnabled);
    hero.setAttributeProfile(getProfile);
    hero.setTierOverride(getTierOverride);
}

function getTierOverride(entity) {
    return entity.getData("jmctheroes:dyn/mind") ? 2 : 1;
}

function mindProfile(profile) {
    profile.addAttribute("PUNCH_DAMAGE", 7.5, 0);
    profile.addAttribute("WEAPON_DAMAGE", -2.5, 0);
    profile.addAttribute("JUMP_HEIGHT", 1.0, 0);
    profile.addAttribute("FALL_RESISTANCE", 12.0, 0);
}

function getProfile(entity) {
    if (entity.getData("jmctheroes:dyn/mind")) {
        return "MIND";
    }
}

function isKeyBindEnabled(entity, keyBind) {
    
    switch (keyBind) {
    case "ENERGY_PROJECTION":
        return (entity.getData("jmctheroes:dyn/mind"));
    default:
        return true;
    }    
}


function isModifierEnabled(entity, modifier) {
    if (modifier.name() == "fiskheroes:energy_projection") {
        return (entity.getData("jmctheroes:dyn/mind"));
    }
    return true;
}