I'd like to make a small contribution, Mr President. David's examples (X) and (Y) (and the great explanations he provides for them) are in line with this definition of DocV's which I find particularly useful to decide whether the unreal past (subjunctive) or "would" should be used with "wish":
12d': She wishes (that) it would stop raining!
She is wishing for a situation that is contrary to current fact.
In his book "English Grammar in Use," Raymond Murphy explains that, when expressing wishes, the past will be used for situations and states, while the conditional will be used for changes and actions.
If it is raining, her wish can be expressed by using the past continuous:
- She wishes it wasn't raining (this wish refers to the current situation).
If it often rains there, her wish can be expressed by using the past simple:
- She wishes it didn't rain so often there (this wish refers to the habitual situation in that place).
In sentences 12d and 12d', the conditional is needed to refer to a change from the current situation, thus pointing to the future. The situation contrary to fact that DocV mentions is a situation that the person wants to take place in the near future.