[RPG] spell, item, or other game feature that would give the character insight to an enethe’s weaknesses and resistance

damage-resistancednd-5evulnerability

When I first heard of True Strike, I originally thought it was quite a powerful cantrip that would allow the castor to sacrifice 1 attack in order to be granted insight into the target's elemental weaknesses and resistances. It reminded me of my first campaign when I walked into it at level 4 and felt lost hearing my DM state "your attack seems to have done nothing" even when I knew it was a hit.

However, I now realize that was a false understanding of the rules. As such, I was wondering:

Is there a spell, item, or other game feature that would give my character insight to an enemy's weaknesses and resistance?

I am curious about any possible solution that would let a group know why the arcane wizard is not taking any damage in the middle of a fight, for example.

Best Answer

It's not a spell, but the Monster Slayer Ranger's Hunter's Sense has the desired effect.

The Monster Slayer Conclave, featured in Xanathar's Guide to Everything, gains the Hunter's Sense ability at level 3. This ability lets you:

As an action, choose one creature you can see within 60 feet of you. You immediately learn whether the creature has any damage immunities, resistances, or vulnerabilities and what they are.

This ability is blocked by effects that block divination magic (as in the spell Nondetection) and can be used a number of times equal to your Wisdom modifier per long rest.