function init(hero) {
    hero.setName("Soul Stone");
    hero.setTier(4);
    
    hero.setChestplate("Gem");

    hero.addPowers("jmctheroes:soul_stone");

    hero.addKeyBind("TELEKINESIS", "\u00A76Grab an Entities Soul", 1);
    hero.addKeyBind("SOUL_STONE", "Toggle Soul Stone", 5);

    hero.addAttributeProfile("SOUL", soulProfile);
    hero.setModifierEnabled(isModifierEnabled);
    hero.setKeyBindEnabled(isKeyBindEnabled);
    hero.setTierOverride(getTierOverride);
}

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

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

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

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


function isModifierEnabled(entity, modifier) {
    if (modifier.name() == "fiskheroes:healing_factor") {
        return (entity.getData("jmctheroes:dyn/soul"));
    }
    else if (modifier.name() == "fiskheroes:fire_immunity") {
        return (entity.getData("jmctheroes:dyn/soul"));
    }
    else if (modifier.name() == "fiskheroes:projectile_immunity") {
        return (entity.getData("jmctheroes:dyn/soul"));
    }
    else if (modifier.name() == "fiskheroes:damage_immunity") {
        return (entity.getData("jmctheroes:dyn/soul"));
    }
    else if (modifier.name() == "fiskheroes:telekinesis") {
        return (entity.getData("jmctheroes:dyn/soul"));
    }
    return true;
}