function init(hero) {
    hero.setName("Homelander");
    hero.setTier(8);
    
    hero.setChestplate("Chestplate");
    hero.setLeggings("Leggings");
    hero.setBoots("Boots");
    
    hero.addPowers("bfp:supe_physiology", "fiskheroes:hover", "bfp:super_strength", "bfp:unleashed_rage", "fiskheroes:explosion_immunity", "bfp:super_flight", "fiskheroes:hover");
    hero.addAttribute("FALL_RESISTANCE", 1, 1);
    hero.addAttribute("JUMP_HEIGHT", 2.5, 0);
    hero.addAttribute("PUNCH_DAMAGE", 25.0, 0);
    hero.addAttribute("SPRINT_SPEED", 0.5, 1);
    hero.addAttribute("STEP_HEIGHT", 0.5, 0);
    hero.addAttribute("BASE_SPEED_LEVELS", 3.0, 0);
    
    hero.addKeyBind("HEAT_VISION", "Heat Vision", 1);
    hero.addKeyBind("SUPER_SPEED", "key.superSpeed", 2);
    hero.addKeyBind("CHARGED_BEAM", "Laser Blast", 3);
    hero.addKeyBind("CHARGED_PUNCH", "Supersonic Punch", 4);
    hero.addKeyBind("HOVER", "Hover", 4);
    hero.addKeyBind("GROUND_SMASH", "Ground Smash", 5);
    hero.addKeyBind("TOGGLE_FLIGHT", "Toggle Flight", 5);

    hero.addAttributeProfile("PUNCH", punchProfile);
    hero.addAttributeProfile("BLUNT", bluntProfile);
    hero.setAttributeProfile(getAttributeProfile);
    hero.setKeyBindEnabled(isKeyBindEnabled);
    hero.setHasProperty(hasProperty);
    hero.setModifierEnabled(isModifierEnabled);
}

function punchProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 35, 0);
    profile.addAttribute("KNOCKBACK", 50.0, 0);
}

function isModifierEnabled(entity, modifier) {
	switch(modifier.name()) {
		case "fiskheroes:flight":
			return !entity.getData("bfp:dyn/flightenabled");
		case "fiskheroes:gliding":
			return !entity.getData("bfp:dyn/flightenabled");
		default:
		return true;
}
}

function isKeyBindEnabled(entity, keyBind) {
    switch (keyBind) {
        case "HOVER":
            return !entity.isOnGround() && entity.isSneaking();
	case "CHARGED_PUNCH":
            return !entity.isOnGround() && !entity.isSneaking() || entity.isOnGround();
        case "TOGGLE_FLIGHT":
            return entity.isSneaking();
	case "GROUND_SMASH":
            return !entity.isSneaking();
}
return true;
}

function bluntProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 25, 0);
    profile.addAttribute("BASE_SPEED", 0, 1);
}

function getAttributeProfile(entity) {
    return entity.getData("fiskheroes:punchmode") ? "PUNCH" : "BLUNT";
}

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