function init(hero) {
    hero.setName("Magneto")
    hero.setTier(6)
    hero.setVersion("\u00A7c\u00A7lX\u00A76\u00A7l-\u00A7e\u00A7lMEN\u00A7f")

    hero.setHelmet("Helmet")
    hero.setChestplate("Chestplate")
    hero.setLeggings("Leggings")
    hero.setBoots("Boots")

    hero.addPowers("mvh:xm_magneto")

    hero.addKeyBind("HOVER", "Hover", 1)
    hero.addKeyBind("TENTACLE_GRAB", "Grab", 2);
    hero.addKeyBind("TENTACLE_STRIKE", "Metal Strike", 3);
    hero.addKeyBind("TENTACLES", "Offensive Magnetokinesis", 4);
    hero.addKeyBind("SHIELD", "Electromagnetic Shield", 5);
    
    hero.setKeyBindEnabled(isKeyBindEnabled);
}

function isKeyBindEnabled(entity, keyBind) {
    var tentacles = entity.getData("fiskheroes:tentacle_extend_timer") == 1;
    switch (keyBind) {
    case "TENTACLE_GRAB":
        return (tentacles);
    case "TENTACLE_STRIKE":
        return (tentacles);
    default:
        return true;
    }    
}