maybe it's possible for the system to recognize if last enemy card has modes. if this is true you can make the card like this:
If last enemy's played card had modes nullify its effects.
but still it's hard to implement 'cause there are card like merchant that works on stock, and cards like wishing lagoon that summon cards, so this misfire card should be able to know wich kind of card was played to counter it properly.