Perfect Wish (5e Spell)
From D&D Wiki
|Casting time:||1 Action|
(Hold Value 9)
This version of Wish can be cast by any that know Wish (Including on extremely rare conditions, Genies that can grant wishes), and is capable of anything a Wish can do.
However, it is capable of duplicating any spell of 9th level or lower without meeting any of the requirements of those spells, and cannot be taken away from you permanently like Wish can.
Additionally, it can create magic items (But only those with a Legendary or lesser rarity and that aren't Artifacts. You must have seen a magic item to create one with this spell, so no custom items allowed, except in appearance.), can make things up to 50000 GP in value, and can decide the outcome of a single event instead of undoing it. This might mean you can make a creature's successful save fail, make a critical hit completely miss, make a friendly creature succeed on a save or check instead. The DM still has control over the extent to which the change happens, you can only decide if you want the target to succeed or fail.
You might be able to achieve something beyond the scope of the above examples. State your wish to the DM as clearly as possible. The DM can't warp the wish like a normal Wish spell, but can decide the spell fails, wasting it as a result. However, the stress that occurs when casting a normal Wish spell never happens when casting this spell except if the spell fails or does something more than a normal Wish would allow for.