function init(hero) {
    hero.setName("The Signal/\u00A76\u00A7lUHP\u00A7r");
    hero.setVersion("Comics");
    hero.setTier(3);
    
    hero.setHelmet("item.superhero_armor.piece.helmet");
    hero.setChestplate("item.superhero_armor.piece.chestpiece");
    hero.setLeggings("item.superhero_armor.piece.pants");
    hero.setBoots("item.superhero_armor.piece.boots");
    hero.addEquipment("fiskheroes:black_canarys_tonfas");
    hero.addEquipment("fiskheroes:grappling_gun");
    
    hero.addPowers("uhp:signal_armor", "uhp:signal_umbrakinesis");
	
    hero.addAttribute("FALL_RESISTANCE", 5.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 1.0, 0);
    hero.addAttribute("PUNCH_DAMAGE", 4.0, 0);
    hero.addAttribute("WEAPON_DAMAGE", 3.0, 0);
    hero.addAttribute("SPRINT_SPEED", 0.25, 1);
    
	hero.addKeyBind("AIM", "key.aim", -1);
    hero.addKeyBind("UTILITY_BELT", "Toggle Utility Belt", 1);
    hero.addKeyBind("INVISIBILITY", "key.invisibility", 2);
    hero.addKeyBind("SHADOWDOME", "key.shadowDome", 3);
    hero.addKeyBind("SHADOWFORM", "key.shadowForm", 3);

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

function isModifierEnabled(entity, modifier) {
    switch (modifier.name()) {
    case "fiskheroes:invisibility":
        return !entity.getData("fiskheroes:shadowform");
    default:
        return true;
    }
}

function isKeyBindEnabled(entity, keyBind) {
    switch (keyBind) {
	case "SHADOWDOME":
        return !entity.isSneaking();
	case "SHADOWFORM":
        return entity.isSneaking() || entity.getData("fiskheroes:shadowform");
    case "INVISIBILITY":
        return !entity.getData("fiskheroes:shadowform");
    case "UTILITY_BELT":
        return !entity.getData("fiskheroes:shadowform");

    default:
        return true;
    }
}

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

function canAim(entity) {
    return entity.getHeldItem().name() == "fiskheroes:grappling_gun";
}