function init(hero) {
    hero.setName("Martian Man");
	hero.setVersion("Serie")
    hero.setTier(5);
    
    hero.setHelmet("Big Forehead");
    hero.setChestplate("item.superhero_armor.piece.chestpiece");
    hero.setLeggings("Shorts");
    hero.setBoots("item.superhero_armor.piece.boots");
    
    hero.addPowers("vhp:extraterrestial_physiology");
    hero.addAttribute("PUNCH_DAMAGE", 6.5, 0);
    hero.addAttribute("JUMP_HEIGHT", 2.0, 0);
    hero.addAttribute("FALL_RESISTANCE", 1.0, 1);
    hero.addAttribute("SPRINT_SPEED", 0.15, 1);
    
	hero.addKeyBind("AIM", "Grab", 1);
	hero.addKeyBind("TELEKINESIS", "Grab", 1);
	hero.addKeyBind("SHADOWFORM", "Puddle Form", 2);
	hero.addKeyBind("SHAPE_SHIFT", "key.shapeShift", 3);
    hero.addKeyBind("SHAPE_SHIFT_RESET", "key.shapeShiftReset", 4);

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

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

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

function isKeyBindEnabled(entity, keyBind) {
    if (entity.getData("fiskheroes:shadowform")) {
        return keyBind == "SHADOWFORM";
    }
    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;
}