function init(hero) {
    hero.setName("hero.fiskheroes.doctor_octopus.name");
    hero.setAliases("doc_ock", "ock");
    hero.setVersion("PS4");
    hero.setTier(4);

    hero.setHelmet("item.superhero_armor.piece.goggles");
    hero.setChestplate("item.superhero_armor.piece.jacket");
    hero.setLeggings("item.superhero_armor.piece.pants");
    hero.setBoots("item.superhero_armor.piece.shoes");

    hero.addPowers("nh:mechanical_arms_ps4");
    hero.addAttribute("FALL_RESISTANCE", 4.5, 0);
    hero.addAttribute("PUNCH_DAMAGE", -2.5, 0);
    hero.addAttribute("REACH_DISTANCE", 0.75, 0);

    hero.addKeyBind("TENTACLE_JAB", "key.tentacleJab", 1);
    hero.addKeyBind("TENTACLE_GRAB", "key.tentacleGrab", 2);
    hero.addKeyBind("TENTACLE_STRIKE", "key.tentacleStrike", 3);
    hero.addKeyBind("TENTACLES", "key.tentacles", 5);

    hero.setKeyBindEnabled(isKeyBindEnabled);
    hero.addAttributeProfile("SPEED", tentacleProfile);
    hero.setAttributeProfile(getProfile);
}

function isKeyBindEnabled(entity, keyBind) {
    return keyBind == "TENTACLES" || entity.getData("fiskheroes:tentacles") != null;
}

function tentacleProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("SPRINT_SPEED", -0.5, 0);
    profile.addAttribute("JUMP_HEIGHT", -5, 0);
}

function getProfile(entity) {
    var tentaclesDeactivated = entity.getData("fiskheroes:tentacles") == null && entity.isOnGround();
    var tentaclesActivated = entity.getData("fiskheroes:tentacles") != null && entity.isOnGround();
    return tentaclesDeactivated || tentaclesActivated ? "SPEED" : null;
}