po-devs/pokemon-online — pull request #1156 by Fuzzysqurl (2014-05-23 05:07:23+00:00)
Title: Future Sight shouldn't fail on initial turn

https://github.com/po-devs/pokemon-online/pull/1155
But fixing the new bug it would create.

This is probably the easiest and quickest way to do it, I tried a few other ways and found moderate success, but they had many more lines changed making it more complicated, and weren't as effective as this.

Essentially, we make Future Sight + Doom Desire work on Flying/Digging/etc targets, but then turn the success into a fail at the last moment if they are invulnerable, allowing one to set up the move properly (which is the bug this fixes).