(As an excuse to promote my script)Maybe my targeting ai script combined with some battle events can help here:
http://forums.rpgmakerweb.com/index.php?/topic/24892-doublex-rmvxa-targeting-ai/
Talk about battle events first. Their aim is to check if any enemy died as it's pointless for enemies to cast revive to their allies when they're all alive.
First use a game switch with id x used for checking this only. It's true if and only if as least 1 enemy died. Enemies need this switch to be true to cast revive.
Then use a battle event page with the below code or something like that(conditional branches also work):
$game_switches[x] = $game_troop.dead_members.size > 0 ? true : falseFor the default RMVXA battle system, setting its span as turn should be enough. If it's to be checked right after each action though, you can use the below trick:
1. Set its condition as Switch [y:] is ON
2. Set its Span as moment
3. Add "Call Common Event: Event B" at the bottom of this battle event page
4. Set game switch y as off in Event B
5. Add "Common Event [Event A]" to the effects of all skills reviving or killing enemies
6. Set game switch y as on in Event A
Now right after those skills are used, Event A will be called which flips game switch y on, thus calling the above battle event page. When that battle event page calls Event B, game switch y will be flipped off and thus stopping that battle event page. This causes that battle event page to be called once right after every use of those skills.
Now talk about my targeting ai script. Here its purpose is to cause enemies to only target the dead when they cast revive if there's any and the revive targets a single ally. Details can be found in my scripts
Casting revive to an alive ally is still pointless even when there's at least 1 dead ally. It seems to me that it's nearly impossible to control how enemies pick targets without create significant side effects if no custom scripts are used XD
Combining the above should cause enemies to cast revive only if there's at least one dead enemy(checked by that battle event page) and when that's the case, they only cast revive on their dead allies(done by my script).
I think such revive behaviour is smart enough as at least the revives aren't wasted
