Sweet! I've been using a workaround script to get this effect, but it was just an ugly hack so I could start balancing numbers.
This looks like something I can build on :)
Maybe you can look into this issue:
I've exposed the current end-phase which can be accessed using
Code:BattleManager.end_phase
It will return :win, :lose, or :abort
The idea is that you can use the extended page condition to say
Code:if BattleManager.end_phase == :win
# do this
Which will cause the event to always run when you win***
Now the problem is it goes into an infinite loop because something is happening where the event runs...and then the battle manager checks the phase...and then the event runs again, and repeat.
of course, if you just say
Code:$game_troop.all_dead?
That is logically equivalent (based on the default engine anyways), but if there are other ways to get a "victory" end phase then it'd be nice to fix the bug.
I haven't found a solution, though that is because I haven't figured out where the problem is coming from. I guess you could always set a self-switch or something.
***well, when I say "always" that's only if the event actually gets to that page. If another page returns true then only that page will be run I think and nothing else...