I had a halfling druid Wild Shape into a bear while being grappled by a roper. Would this have broken the grapple? I could see it breaking the grapple if he was being grappled by another small creature before turning into a bear, but a roper is a large creature.
No, wild shape does not automatically break the grapple.
Grappling applies the 'grappled' condition and conditions are not automatically removed when you wild shape.
Further, once you have the grappled condition, the restrictions on grappling target size does not matter. Only the listed ways under the condition's description, the grappler releasing the grapple, or 'escaping the grapple' will remove the condition. (PHB pg. 195).
From PHB Appendix A (pg 290)
- A grappled creature's speed becomes 0, and it can't benefit from any bonus to its speed.
- The condition ends if the grappler is incapacitated (see the condition)
- The condition also ends if an effect removes the grappled creature from the reach of the grappler or grappling effect, such as when a creature is hurled away by the thunderwave spell.
For wild shaping into a larger creature than the grappler, unless the grappler has the 'grappler feat' (PHB pg 167), which tell us that creatures larger than you automatically succeed escape attempts, you can use an action and automatically escape from the grapple.
RAW doesn't directly address the interaction of wild shape and grapple, so it would be left to the DM's discretion.
Grapple is a condition and "A condition lasts either until it is countered or for a duration specified by the effect that imposed the condition." PHB, p. 290. However, what "counters" a condition is often up to DM interpretation. For example, the spells Gaseous Form (p. 244) and Wind Walk (p. 288) transform creatures into "misty clouds" or "wisps of clouds" and I think nearly all DMs would rule becoming a cloud breaks/counters a grapple. However, the spell descriptions do not reference grapple in any way, just like Wild Shape does not mention grapple.
Common DM responses to wild shaping while being grappled would likely be:
- Automatically break grapple (least likely imho)
- Instantly force a roll to escape the grapple
- Stop the shape-shift all together due to constriction of previous form (useful for small objects shifting in to large objects while heavily constrained)
- Gain advantage on next attempt to escape the grapple
- Nothing, it's still grappled, though possibly more intimidating
I would personally not rule that it automatically causes the character to break free, but allow a roll to escape immediately. I would also rule that if the creature's size category changes drastically enough that the rules for starting a grapple change, then those rules should be considered when rolling to break free based on the shape-shift. For example, "The target of a grapple must be no more than one size larger." PHB, p. 195.
It's worth noting that many things in 5e are intentionally left vague so DM's would be empowered to be able to make judgment calls without making house rules that break RAW.