function init(hero) {
    hero.setName("Psylocke");
    hero.setTier(6);
    
    hero.setChestplate("item.superhero_armor.piece.chestpiece");
    hero.setLeggings("item.superhero_armor.piece.pants");
    hero.setBoots("item.superhero_armor.piece.boots");
    hero.addPrimaryEquipment("fiskheroes:chokuto", true, item => !item.nbt().getBoolean("Dual"));
    
    hero.addPowers("fiskheroes:leaping","pack:adamantium","fiskheroes:invisibility", "pack:tk");
   
	  hero.addAttribute("WEAPON_DAMAGE", 6, 0);
   hero.addAttribute("PUNCH_DAMAGE", 9, 0);
    hero.addAttribute("FALL_RESISTANCE", 15.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 1.5, 1);
    hero.addAttribute("SPRINT_SPEED", 0.7, 1);	
    hero.addAttribute("STEP_HEIGHT", 0.85, 1);	
	
	
	
	
	
	
	
   hero.addKeyBind("BLADE", "Telekinetic Dagger", 1);
       hero.addKeyBind("SLOW_MOTION", "Telepathic Freeze", 3);
    hero.addKeyBind("SPELL_MENU", "TK Menu", 4);
    hero.addKeyBind("TELEKINESIS", "Telekinesis", 5);
	  hero.addKeyBind("INVISIBILITY", "Telepathic Invisibility", 2); 
   
   
   
   
   
	
    hero.addAttributeProfile("CLAWS", clawsProfile);
    hero.setAttributeProfile(getProfile);
    hero.setDamageProfile(getProfile);
   hero.addDamageProfile("CLAWS", {
        "types": {
            "ENERGY": 1.0,
			"BLUNT": 1.0
        },
        "properties": {
            "EFFECTS": [
                {
                    "id": "minecraft:weakness",
                    "duration": 80,
                    "amplifier": 3,
                    "chance": 1.05
                }
            ]
        }
    });
	
	
    hero.supplyFunction("canAim", canAim);

	
  hero.setModifierEnabled(isModifierEnabled);
    hero.setKeyBindEnabled(isKeyBindEnabled);
}

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: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;
}


function clawsProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 14, 0);
}

function getProfile(entity) {
    return entity.getData("fiskheroes:blade") ? "CLAWS" : null;
}

