The wraith can take 3 legendary actions choosing from the options below. Only one legendary action option can be used at a time and only at the end of another creature's turn. The wraith regains spent legendary actions at the start of its turn.
Shadow Step. The wraith magically teleports up to 60 feet to an unoccupied space it can see that is in dim light or darkness. It then has advantage on the next melee attack before the end of its next turn.
Torment (Costs 2 Actions). The wraith targets on creatures with hym's indefinite madness that it can see within 60 feet of it. The target must succeed on a DC 17 Wisdom saving throw, taking 33 (6d10) psychic damage on a failed save
or half as much damage on a successful one.
Rip Shadow (Costs 3 Actions). The wraith targets one Medium or smaller creature that casts a shadow. The target's shadow must be visible to the wraith and within 30 feet of it. If the target fails a DC 17 Charisma saving throw (its shadow detaches from it and becomes a shadow that obeys the wraith's commands)
acting on the initiative count of the wraith. A greater restoration spell or a remove curse spell cast on the target restores its natural shadow ( but only if its undead shadow has been destroyed.; ; Incorporeal Movement. The wraith can move through other creatures and objects as if they were difficult terrain. It takes 5 (1d10) force damage if it ends its turn inside an object.
Shadow Being. While in dim light or darkness)
the wraith has advantage on Dexterity (Stealth) checks and can take the Hide action as a bonus action.