[RPG] Can a Horizon Walker ranger use the Distant Strike feature to teleport out of the Forcecage spell

attackclass-featurednd-5erangerteleportation

Distant Strike is a Horizon Walker ranger feature which states (XGtE, p. 43):

At 11th level, you gain the ability to pass between the planes in a
blink of an eye. When you use the Attack action, you can teleport up
to 10 feet before each attack to an unoccupied space you can see.

The forcecage spell description states, in part:

A prison in the shape of a box can be up to 10 feet on a side,
creating a solid barrier that prevents any matter from passing through
it and blocking any spells cast into or out from the area.

When you cast the spell, any creature that is completely inside the
cage’s area is trapped. Creatures only partially within the area, or
those too large to fit inside the area, are pushed away from the
center of the area until they are completely outside the area.

A creature inside the cage can’t leave it by nonmagical means. If the
creature tries to use teleportation or interplanar travel to leave the
cage, it must first make a Charisma saving throw. On a success, the
creature can use that magic to exit the cage. On a failure, the
creature can’t exit the cage and wastes the use of the spell or
effect. The cage also extends into the Ethereal Plane, blocking
ethereal travel.

Can the ranger attack a location and thus teleport 10 feet outside the forcecage?

Best Answer

Yes, but you need to make a Charisma saving throw

Distant Strike states that you:

gain the ability to pass between the planes in a blink of an eye. When you use the Attack action, you can teleport up to 10 feet before each attack to an unoccupied space you can see.

Forcecage states that:

If the creature tries to use teleportation or interplanar travel to leave the cage, it must first make a Charisma saving throw

Since the Ranger is attempting both teleportation and interplanar travel, so they must make a Charisma saving throw as per the rules for Forcecage.

Note that this is congruent with the general idea of the rules that the specific overrules the general. In most cases Distant Strike allows travel without a check, but the specific language of Forcecage adds this additional requirement.