function init(hero) {
    hero.setName("Marvel Girl");
    hero.setTier(6);

    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("pack:telekenesis", "fiskheroes:umbrakinesis");
       hero.addAttribute("WEAPON_DAMAGE", 2.5, 0);
   hero.addAttribute("PUNCH_DAMAGE", 7, 0);
    hero.addAttribute("FALL_RESISTANCE", 10.0, 0); 
    hero.addAttribute("JUMP_HEIGHT", 0.5, 1);  
    hero.addAttribute("SPRINT_SPEED", 0.35, 1);	
    hero.addAttribute("STEP_HEIGHT", 0.5, 1);	 
	       
	   hero.addKeyBind("SHIELD", "key.shield", 1);
    hero.addKeyBind("SLOW_MOTION", "Telepathic Freeze", 3);
    hero.addKeyBind("SPELL_MENU", "TK Menu", 2);
    hero.addKeyBind("CHARGED_BEAM", "TK Bolt", 4);
    hero.addKeyBind("TELEKINESIS", "Telekinesis", 5);
	
	
	
  hero.setModifierEnabled(isModifierEnabled);
    hero.setKeyBindEnabled(isKeyBindEnabled);
    hero.supplyFunction("canAim", canAim);
}

function isModifierEnabled(entity, modifier) {
    switch (modifier.name()) {
    case "fiskheroes:telekinesis":
        return entity.getHeldItem().isEmpty() && !entity.getData("fiskheroes:shadowform") && !entity.getData("fiskheroes:lightsout");
    default:
        return true;
    }
}

function isKeyBindEnabled(entity, keyBind) {
     if (entity.getData("fiskheroes:lightsout")) {
        return keyBind == "SHADOWDOME";
    }
    else if (entity.getData("fiskheroes:telekinesis")) {
        return keyBind == "TELEKINESIS" || keyBind == "AIM";
    }
    
    return keyBind != "TELEKINESIS" && keyBind != "AIM" || entity.getHeldItem().isEmpty();
}

function canAim(entity) {
    return entity.getHeldItem().isEmpty() && entity.getData("fiskheroes:grab_id") > -1;
}
