function init(hero) {
    hero.setName("Omni-Man");
    hero.setTier(9);
	hero.setVersion("\u00A7e\u00A7l\I\u00A7b\u00A7l\N\u00A74\u00A7l\V\u00A7b\u00A7l\I\u00A7e\u00A7l\N\u00A74\u00A7l\C\u00A7e\u00A7l\I\u00A7b\u00A7l\B\u00A74\u00A7l\L\u00A7b\u00A7l\E\u00A7r")

    hero.setChestplate("Chestplate");
    hero.setLeggings("Leggings");
    hero.setBoots("Boots");

    hero.addPowers("mvh:inv_pureviltrumite", "mvh:inv_smartatoms");
    hero.addAttribute("FALL_RESISTANCE", 1, 1);
    hero.addAttribute("PUNCH_DAMAGE", 15, 0);
    hero.addAttribute("WEAPON_DAMAGE", 0.08, 1);
    hero.addAttribute("SPRINT_SPEED", 0.35, 1);
    hero.addAttribute("BASE_SPEED_LEVELS", 3.0, 0);
    hero.addAttribute("BASE_SPEED", 0.15, 1);
    hero.addAttribute("MAX_HEALTH", 4, 0);

    hero.addKeyBind("HOVER", "Hover", 1)
    hero.addKeyBind("TELEPORT", "Space/Earth", 1)
    hero.addKeyBind("FLIGHTSTYLETOGGLE", "Toggle Flight Style", 2)
    hero.addKeyBind("GROUND_SMASH", "Ground Smash", 3)
    hero.addKeyBind("SUPER_SPEED", "Super Speed", 4)
    hero.addKeyBind("BLOODLUST", "Bloodlust", 5)

    hero.setModifierEnabled(isModifierEnabled);
    hero.setKeyBindEnabled(isKeyBindEnabled);
    hero.setDamageProfile(getDamageProfile);
    hero.addAttributeProfile("BLOODLUST", rageProfile);
    hero.setHasProperty(hasProperty);
    hero.setAttributeProfile(getAttributeProfile);
    hero.setTierOverride(getTierOverride);
    hero.addDamageProfile("PUNCH", {
        "types": {
            "BLUNT": 2.0,
        }
    });
}

function getTierOverride(entity) {
    return entity.getData("mvh:dyn/bloodlust") ? 10 : 9;
}

function getDamageProfile(entity) {
    return !entity.getHeldItem().isWeapon() ? "PUNCH" : null;
}

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

function isModifierEnabled(entity, modifier) {
    if (modifier.name() == "fiskheroes:transformation|bloodlust") {
        var bloodlust = entity.getData("mvh:dyn/bloodlust");
        return (modifier.id() == "bloodlust" ? bloodlust : !bloodlust);
    }
    switch (modifier.name()) {
    case "fiskheroes:flight":
        return !entity.getData("mvh:dyn/flightstyletoggle");
    case "fiskheroes:gliding":
        return entity.getData("mvh:dyn/flightstyletoggle");
    case "fiskheroes:teleportation":
        return entity.posY() > 2000;
    case "fiskheroes:hover":
        return entity.posY() <= 2000;
    case "fiskheroes:healing_factor":
        return entity.getHealth() < 7;
    default:
        return true;
    }
}

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

function isKeyBindEnabled(entity, keyBind) {
    switch (keyBind) {
    case "HOVER":
        return !entity.getData("mvh:dyn/flightstyletoggle") && !entity.isOnGround();
    case "HOVER":
        return !entity.isOnGround();
    case "GROUND_SMASH":
        return entity.isOnGround();
    case "TELEPORT":
        return entity.posY() > 2000;
    case "HOVER":
        return entity.posY() <= 2000;
    default:
        return true;
    }
}

function rageProfile(profile) {
    profile.addAttribute("FALL_RESISTANCE", 1, 1);
    profile.addAttribute("PUNCH_DAMAGE", 18, 0);
    profile.addAttribute("WEAPON_DAMAGE", 0.12, 1);
    profile.addAttribute("SPRINT_SPEED", 0.35, 1);
    profile.addAttribute("BASE_SPEED_LEVELS", 5.0, 0);
    profile.addAttribute("BASE_SPEED", 0.15, 1);
    profile.addAttribute("MAX_HEALTH", 6, 0);

}

function getAttributeProfile(entity) {
    return entity.getData("mvh:dyn/bloodlust") ? "BLOODLUST" : null;
}