function init(hero) {
    hero.setName("Robot");
	hero.setVersion("Serie V1")
    hero.setTier(5);
    
    hero.setHelmet("item.superhero_armor.piece.helmet");
    hero.setChestplate("item.superhero_armor.piece.chestpiece");
    hero.setLeggings("item.superhero_armor.piece.leggings");
    hero.setBoots("item.superhero_armor.piece.boots");
	hero.setPrimaryEquipment("fiskheroes:grappling_gun");
    
    hero.addPowers("vhp:robot_technology");
    hero.addAttribute("PUNCH_DAMAGE", 5.0, 0);
	hero.addAttribute("WEAPON_DAMAGE", 3.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 4.0, 0);
    hero.addAttribute("FALL_RESISTANCE", 5.0, 1);
    hero.addAttribute("SPRINT_SPEED", 0.20, 1);
	hero.addAttribute("IMPACT_DAMAGE", 0.20, 1);
    
    hero.addKeyBind("AIM", "Aim", 1);
	hero.addKeyBind("SONIC_WAVES", "Sonic Waves", 2);

	hero.supplyFunction("canAim", canAim);
    hero.setHasPermission(hasPermission);
	hero.setHasProperty(hasProperty);
	hero.setModifierEnabled(isModifierEnabled);
    hero.setKeyBindEnabled(isKeyBindEnabled);
}

function canAim(entity) {
    return entity.getHeldItem().isEmpty();
}

function isModifierEnabled(entity, modifier) {
    switch (modifier.name()) {
    case "fiskheroes:sonic_waves":
        return entity.getData("fiskheroes:aimed_timer") >= 1;
    default:
        return true;
    }
}

function isKeyBindEnabled(entity, keyBind) {
    switch (keyBind) {
    case "SONIC_WAVES":
        return entity.getData("fiskheroes:aimed_timer") >= 1;
    default:
        return true;
    }
}

function hasPermission(entity, permission) {
    return permission == "USE_GRAPPLING_GUN";
}

function hasProperty(entity, property) {
    return property == "BREATHE_SPACE";
}