How about a spell for DnD 5e?
Inoj’s Repeating Insanity
Casting Time: 1 action
Range: 30 feet
Component: V, S, M (a riddle whispered into a bottle)
A creature of your choice that you can see in range is instantly confused by its surroundings. The target must succeed on a Intelligence saving throw or lose its reaction and action each round.
At the end of each the creatures rounds, it makes another Intelligence saving throw. If the creature takes damage or is assisted by an ally, it gains advantage on the saving throw. If it succeeds on this saving throw, it is no longer affected by the spell.
At Higher Levels. When this spell is cast at 2nd level or higher, the creature must make an additional Intelligence saving throw at the start of its next turn if it succeeded on the first saving throw. Each additional level adds another round that the creature must succeed on an Intelligence saving throw or be affected by the spell. If the creature ever fails a saving throw, then any additional round that the creature would have to make saving throws because of casting this spell at a higher level are then lost.