function init(hero) {
    hero.setName("Star-Lord");
    hero.setTier(6);
    
	hero.setHelmet("item.superhero_armor.piece.helmet");
    hero.setChestplate("item.superhero_armor.piece.torso");
    hero.setLeggings("item.superhero_armor.piece.legs");
    hero.setBoots("item.superhero_armor.piece.boots");
	hero.addEquipment("minecraft:iron_axe");
    
    hero.addPowers("pack:dagger","pack:blaster", "fiskheroes:hover");
    hero.addAttribute("WEAPON_DAMAGE", 1.5, 0);
    hero.addAttribute("PUNCH_DAMAGE", 6.5, 0);
    hero.addAttribute("FALL_RESISTANCE", 100.0, 0);
	 hero.addAttribute("SPRINT_SPEED", 0.25, 1);   
    hero.addAttribute("JUMP_HEIGHT", 0.3, 1);
    

    
    hero.setHasProperty(hasProperty);   
	    hero.supplyFunction("canAim", canAim);
	
hero.addKeyBind("BLADE", "Element Gun", 1);
	 hero.addKeyBind("AIM", "Flame Blast", 4);
	 
	 hero.addKeyBind("ENERGY_PROJECTION", "Wind Tunnel", 2);
	hero.addKeyBind("CHARGED_BEAM", "Lightning Strike", 3);
	hero.addKeyBind("HOVER", "Hover", 5);
	
	
	hero.addAttributeProfile("BLADE", bladeProfile);
    hero.setAttributeProfile(getProfile);

	hero.addAttributeProfile("BLADE", bladeProfile);
    hero.setAttributeProfile(getProfile);
    hero.setDamageProfile(getProfile);
    hero.addDamageProfile("BLADE", {"types": {"BLUNT": 1.0}});
	hero.setModifierEnabled(isModifierEnabled);
}

function hasProperty(entity, property) {
    switch (property) {
    case "MASK_TOGGLE":
        return true;
    case "BREATHE_UNDERWATER":
        return !entity.getData("fiskheroes:mask_open");
    case "BREATHE_SPACE":
        return !entity.getData("fiskheroes:mask_open");
    default:
        return false;    
    }
}
function canAim(entity) {
    return entity.getHeldItem().isEmpty() && !entity.getData("fiskheroes:jetpacking");
}

function bladeProfile(profile) {
    profile.inheritDefaults();        
}

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

function isModifierEnabled(entity, modifier) {
     if (modifier.name() == "fiskheroes:energy_projection") {
		return entity.getData("fiskheroes:blade");
	}
	else if (modifier.name() == "fiskheroes:charged_beam") {
		return entity.getData("fiskheroes:blade");
	}
	else if (modifier.name() == "fiskheroes:flame_blast") {
		return entity.getData("fiskheroes:blade");
	}
    return true;
}

