function init(hero) {
    hero.setName("Ash Williams");
    hero.setVersion("The Evil Dead");
    hero.setAliases("groovy");
    hero.setTier(1);
    
    hero.setChestplate("Shirt");
    hero.setLeggings("Pants");
    hero.setBoots("Shoes");
    
    hero.addPowers("skarredheroes:homelite_chainsaw", "skarredheroes:boomstick");
    hero.addAttribute("PUNCH_DAMAGE", 6.0, 0);
    hero.addAttribute("WEAPON_DAMAGE", 3.0, 0);
    hero.addAttribute("FALL_RESISTANCE", 2.5, 0);
    
    hero.addKeyBind("AIM", "key.aim", 1);
    hero.addKeyBind("BLADE", "Equip/Unequip Chainsaw", 2);

    hero.supplyFunction("canAim", canAim);
    
    hero.addSoundEvent("AIM_START", ["fiskheroes:utility_belt_switch", "skarredheroes:shotgun_aim"]);
    hero.addSoundEvent("AIM_STOP", "fiskheroes:utility_belt_switch");
    hero.addSoundEvent("PUNCH", "skarredheroes:chainsaw_hit");
    hero.addSoundOverrides("1300", {
		"powers": {
			"skarredheroes:homelite_chainsaw": {
				"fiskheroes:blade": {
					"ENABLE": ["fiskheroes:utility_belt_switch", "skarredheroes:chainsaw_start", "skarredheroes:chainsaw_loop", "skarredheroes:groovy_aod"]
				}
			}
		}
    });
	hero.addSoundOverrides("S_MART", {
		"powers": {
			"skarredheroes:homelite_chainsaw": {
				"fiskheroes:blade": {
					"ENABLE": ["fiskheroes:utility_belt_switch", "skarredheroes:chainsaw_start", "skarredheroes:chainsaw_loop", "skarredheroes:ash_housewares"]
				}
			}
		}
    });
	
    hero.addAttributeProfile("BLADE", bladeProfile);
    hero.setAttributeProfile(getProfile);
    hero.setDamageProfile(getProfile);
    hero.addDamageProfile("BLADE", {
        "types": {
            "SHARP": 1.0
        }
    });
}

function bladeProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 8.0, 0);
    profile.addAttribute("REACH_DISTANCE", 1.0, 0);
}

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

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

