Mario the Magic Plumber was captured by a big dragon named Bowser one thousand years ago. He used Imprisonment on him and made him sleep for one thousand years. Only the kiss of a real princess could break the curse. How can my group learn about the condition (kiss of a real princess)? I am more familiar with "Das schwarze Auge" and there is a spell called "Analysis" which tells you what kind of spell is laying on a person and how to break it. Is there something like this in D&D? Would detect magic be enough?
During the casting of the spell, in any of its versions, you can specify a condition that will cause the spell to end and release the target. The condition can be as specific or as elaborate as you choose, but the DM must agree that the condition is reasonable and has a likelihood of coming to pass. The conditions can be based on a creature’s name, identity, or deity but otherwise must be based on observable actions or qualities and not based on intangibles such as level, class, or hit points.
Edit: Thank you for all the answers, all got an upvote :). The heros will find Mario sleeping and by accident in an old building. They have no idea of his backstory or that he even existed. They have a wizard and a cleric with them,and it is important that Mario helps them to defeat the evil Wario. So they need to find out why Mario is sleeping and how wake him up. Thank you for your advise, nobody know about Mario anymore and I think I will go with the "Identify" spell, which tells everything about the casted Imprisonment spell.