function init(hero) {
    hero.setName("Ash Williams");
    hero.setVersion("The Evil Dead");
    hero.setAliases("groovy", "ashy slashy");
    hero.setTier(1);
    
    hero.setChestplate("Shirt");
    hero.setLeggings("Pants");
    hero.setBoots("Shoes");
    hero.addPrimaryEquipment("fisktag:weapon{WeaponType:skarlet:kandarian_dagger}", true, item => item.nbt().getString("WeaponType") == 'skarlet:kandarian_dagger');
    
    hero.addPowers("skarlet:homelite_chainsaw", "skarlet: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", "Aim Boomstick", 1);
    hero.addKeyBind("BLADE", "Equip/Unequip Chainsaw", 2);

    hero.supplyFunction("canAim", canAim);
    
    hero.addSoundEvent("AIM_START", ["fiskheroes:utility_belt_switch", "skarlet:shotgun_aim"]);
    hero.addSoundEvent("AIM_STOP", "fiskheroes:utility_belt_switch");
    hero.addSoundEvent("PUNCH", "skarlet:chainsaw_hit");
    hero.addSoundEvent("STEP", "")

    hero.addSoundOverrides("DOOM", {"suit": {"STEP": "skarlet:doombot_walk"}});
	
    hero.addAttributeProfile("BLADE", bladeProfile);
    hero.setAttributeProfile(getProfile);
    hero.setDamageProfile(getProfile);
    hero.addDamageProfile("BLADE", {
        "types": {
            "SHARP": 1.0
        }
    });
    hero.addDamageProfile("DAGGER", {
        "types": {
            "HOLY": 1.0
        }
    });
}

function bladeProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 8.5, 0);
}

function getProfile(entity) {
    return entity.getData("fiskheroes:blade") ? "BLADE" : entity.getHeldItem().nbt().getString("WeaponType") == "skarlet:kandarian_dagger" ? "DAGGER" : null;
}

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

