function init(hero) {
    hero.setName("Thanos");
    hero.setTier(10);

    hero.setHelmet("Head");
    hero.setChestplate("item.superhero_armor.piece.chestpiece");
    hero.setLeggings("item.superhero_armor.piece.pants");
    hero.setBoots("item.superhero_armor.piece.boots");

    hero.addPowers("burden:infinity_gauntlet");
    hero.addAttribute("PUNCH_DAMAGE", 10.0, 0);
    hero.addAttribute("WEAPON_DAMAGE", 2.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 1.5, 0);
    hero.addAttribute("FALL_RESISTANCE", 1.0, 1);

    hero.addKeyBind("ENERGY_PROJECTION", "Power Stone", 1);
    hero.addKeyBind("AIM", "Reality Stone", 2);
    hero.addKeyBind("GRAVITY_MANIPULATION", "Reality Stone", 2);
    hero.addKeyBind("TELEPORT", "Space Stone", 3);
    hero.addKeyBind("SLOW_MOTION", "Time Stone", 4);

    hero.setDefaultScale(1.2);

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

function isKeyBindEnabled(entity, keyBind) {
    switch (keyBind) {
    case "ENERGY_PROJECTION":
        return !entity.getData("fiskheroes:gravity_manip");
    case "GRAVITY_MANIPULATION":
        return !entity.getData("fiskheroes:energy_projection");
    case "AIM":
        return !entity.getData("fiskheroes:energy_projection");
    default:
        return true;
    }
}

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

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