function init(hero) {
    hero.setName("Thanos");
    hero.setTier(10);
	
    hero.setChestplate("Infinity Gauntlet");
	
	hero.addPowers("pjhp:infinity_stones");
    hero.addAttribute("FALL_RESISTANCE", 1.0, 1);
    hero.addAttribute("PUNCH_DAMAGE", 13.5, 0);
    hero.addAttribute("MAX_HEALTH", 20.0, 0);
	
    hero.addKeyBind("CHARGED_BEAM", "Power Stone", 1);
    hero.addKeyBind("TELEKINESIS", "Mind Stone", 2);
    hero.addKeyBind("SPELL_MENU", "Reality Stone", 3);
    hero.addKeyBind("TELEPORT", "Space Stone", 4);
    hero.addKeyBind("SLOW_MOTION", "Time Stone", 5);
    
    hero.setKeyBindEnabled(isKeyBindEnabled);
    hero.supplyFunction("canAim", canAim);
    
    hero.addSoundEvent("AIM_START", "fiskheroes:mysterio_beam_aim");
}

function isKeyBindEnabled(entity, keyBind) {
    return keyBind != "ENERGY_PROJECTION" || entity.getData("fiskheroes:beam_charge") == 0 && entity.getData("fiskheroes:aimed_timer") == 1;
}

function canAim(entity) {
    return entity.getHeldItem().isEmpty() && entity.getData("fiskheroes:beam_charge") == 0 && entity.getData('fiskheroes:time_since_damaged') > 10;
}
    function hasProperty(entity, property) {
        return property == "BREATHE_SPACE";
    }
        
    
