It's something that no one here can answer but what is IS's gameplan? How does the IS leadership intend to make up for all the recent reverses suffered? Or has IS reached a point where it's merely responding to moves undertaken by its enemies? They only things IS has going for it is that its enemies remain undivided, that in Iraq there remains unresolved sectarian issues and that it's still able to attract volunteers to its cause but overall; things don't look good.
In a way it has already set out its game plan in its own published materials; even if it would regard events at the moment as a setback. It just goes back a step in its gameplan.
In the end it is to exhaust its enemies. Play off the sectarian divisions in the ME to escalate the level of violence until it once again creates an opportunity for itself, wear down the providers of foreign intervention until they become sick of the whole enterprise and just want out.
It's a policy the US has already felt the burden of and one Russia is probably going to become familiar with.
At the same time direct attacks on the "far enemy" in their own countries will create an environment of fear and uncertainty, creating a sense of isolation and rejection in the Muslim populations there to garner more recruits and escalate the violence there as well. And to be clear, the objective of this violence is simply to kill the infidel in accordance with their own distorted principles of jihad.
The Australian historian Robert Manne has recently released an excellent book where he works through the development of IS underpinning philosophy from its origin to the present day [The Mind of the Islamic State]