function init(hero) {
    hero.setName("Ultron");
    hero.setVersion("item.superhero_armor.version.comics");
    hero.setTier(9);

    hero.setHelmet("Cybernetic Body");

    hero.addPowers("skarlet:cybernetic_adamantium_body");
    hero.addAttribute("PUNCH_DAMAGE", 11.5, 0);
    hero.addAttribute("WEAPON_DAMAGE", 2.0, 0);
    hero.addAttribute("SPRINT_SPEED", 0.1, 1);
    hero.addAttribute("JUMP_HEIGHT", 1.5, 0);
    hero.addAttribute("IMPACT_DAMAGE", 0.3, 1);
    hero.addAttribute("FALL_RESISTANCE", 1.0, 1);

    hero.addKeyBind("AIM", "key.aim", 1);
    hero.addKeyBind("CHARGED_BEAM", "Encephalo-Beam", 2);
    hero.addKeyBind("SHIELD", "key.forcefield", 4);

    hero.addSoundOverrides("CAPE", {
		"powers": {
            "skarlet:cybernetic_adamantium_body": {
                "fiskheroes:controlled_flight": {
                    "ENABLE": ["fiskheroes:atom_flight_enable", "fiskheroes:atom_flight_loop", "fiskheroes:flight_cape_loop"]
                }
            }
		}
    });

    hero.setKeyBindEnabled(isKeyBindEnabled);
    hero.setHasProperty(hasProperty);
    hero.supplyFunction("canAim", canAim);

    hero.addSoundEvent("AIM_START", "skarlet:ultron_aim_start");
    hero.addSoundEvent("AIM_STOP", "skarlet:ultron_aim_end");
    hero.addSoundEvent("STEP", "skarlet:ultron_step");

    hero.setDefaultScale(1.2);

    hero.setTickHandler((entity, manager) => {
        manager.incrementData(entity, "fiskheroes:dyn/booster_timer", 2, entity.getData("fiskheroes:flying"));
    });
}

function isKeyBindEnabled(entity, keyBind) {
	switch (keyBind) {
        case "CHARGED_BEAM":
            return !(entity.isSprinting() && entity.getData("fiskheroes:flying"));
		case "SHIELD":
			return !(entity.isSprinting() && entity.getData("fiskheroes:flying"));
		default:
			return true;
	}
}

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

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