well... a wasted spy mission would be a 'complete failure' mission.. changing the DEFCON randomly, be it 1 up or 1 down from where it was, would just be a chance. Just like it doing anything at all is a chance.
Also, as most people here I'd assume, I know nothing of coding but couldn't you just add a clause that would say something like if the new defcon is the same as the old, redo it, and if you don't want the defcon to go just by 1, set it so that it the new defcon is equal to the old defcon + or - 1 redo the function.