function init(hero) {
    hero.setName("Mr Terrific CW");
    hero.setTier(4);
    
    hero.setHelmet("item.superhero_armor.piece.mask");
    hero.setChestplate("item.superhero_armor.piece.chestpiece");
    hero.setLeggings("item.superhero_armor.piece.pants");
    hero.setBoots("item.superhero_armor.piece.boots");
    hero.setPrimaryEquipment("fiskheroes:black_canarys_tonfas");

    hero.addPowers("cwheropack:esfera_t");
    hero.addAttribute("FALL_RESISTANCE", 0.45, 1);
    hero.addAttribute("PUNCH_DAMAGE", 5.23, 0);
    hero.addAttribute("SPRINT_SPEED", 0.3, 1);
    hero.addAttribute("WEAPON_DAMAGE", 2.0, 1);

    hero.addKeyBind("AIM", "key.aim", 1);
    hero.addKeyBind("BLADE", "T-esfer", 3);
    
    hero.setDefaultScale(0.99);
    hero.setAttributeProfile(getAttributeProfile);
    hero.setKeyBindEnabled(isKeyBindEnabled);
    hero.addAttributeProfile("ESFERAT", weaponProfile);
    hero.supplyFunction("canAim", canAim);

}
function weaponProfile(profile) {
    profile.addAttribute("PUNCH_DAMAGE", 6, 0);
    profile.addAttribute("WEAPON_DAMAGE", 2.1, 1);
}

function getAttributeProfile(entity) {
    return entity.getData("fiskheroes:blade") ? "ESFERAT" : null;
}

function isKeyBindEnabled(entity, keyBind) {
    switch (keyBind) {
    case "AIM":
        return entity.getData("fiskheroes:blade");
    default:
        return true;
    }
}

function canAim(entity) {
    return entity.getHeldItem().isEmpty() && !entity.getData("fiskheroes:jetpacking");
}
