function init(hero) {
    hero.setName("Hulkbuster/\u00A7cMark 44");
    hero.setTier(5);
    
    hero.setHelmet("item.superhero_armor.piece.helmet");
    hero.setChestplate("item.superhero_armor.piece.chestplate");
    hero.setLeggings("item.superhero_armor.piece.leggings");
    hero.setBoots("item.superhero_armor.piece.boots");
    
    hero.addPowers("legacyheroes:hulkbuster");
    hero.addAttribute("PUNCH_DAMAGE", 12.0, 0);
	hero.addAttribute("WEAPON_DAMAGE", -1.0, 0);
    hero.addAttribute("FALL_RESISTANCE", 20.0, 0);
    hero.addAttribute("MAX_HEALTH", 10.0, 0);
    
    hero.addKeyBind("AIM", "key.aim", 1);
    hero.addKeyBind("HOVER", "key.hover", 2);
    hero.addKeyBind("CHARGED_BEAM", "Unibeam", 3);
    hero.addKeyBind("CHARGED_PUNCH", "key.punchToggle", 4);
    hero.addKeyBind("SENTRY_MODE", "key.sentryMode", 5);

    hero.setDefaultScale(2.0);
    hero.setModifierEnabled(isModifierEnabled);
    hero.setHasProperty(hasProperty);
    hero.supplyFunction("canAim", canAim);
    hero.addAttributeProfile("PUNCH", punchProfile);
    hero.addAttributeProfile("BLUNT", bluntProfile);
    hero.setAttributeProfile(getAttributeProfile);
}

function isModifierEnabled(entity, modifier) {
    return modifier.name() != "fiskheroes:water_breathing" || !entity.getData("fiskheroes:mask_open");
}

function hasProperty(entity, property) {
    return property == "MASK_TOGGLE" || property == "BREATHE_SPACE" && !entity.getData("fiskheroes:mask_open");
}

function canAim(entity) {
    return entity.getHeldItem().isEmpty() && !entity.getData("fiskheroes:jetpacking");
}

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

function bluntProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 11.5, 0);
    profile.addAttribute("FALL_RESISTANCE", 3.5, 0);
    profile.addAttribute("BASE_SPEED", -0.5, 1);
}

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