QUOTE(dra6o0n @ Jun 16 2008, 01:35 AM)

Quite hard to make a formula for every enemies' stats to be referenced... Maybe it can only be cast on one enemy, and until the effect wears off, it cannot be used on any other enemy.
When the script occurs, the enemy takes drained attributes, set accordingly to half (and rounded by 1) to their stats.
But then this might mean for 1 enemy, 8 stats needs to be referenced and calculated, and 8 drain attributes will have to be used.
Actually it's fairly easy to do since the script will run separately on each target. And it doesn't have to affect everything, maybe just the core 8 stats. Each "drain" is done by: set drain to ((target.getbaseav stat / 2) - target.getav stat).
Example: if the target's base stat is 50, and the current stat is 40 (due to magic damage/drain) the half-way point is 25, and the drain is -15: 40 - 15 = 25. Using a doonce and allowing the if condition to run on update means no enemies get missed (maybe 1-3 frames for all enemies to be drained, depending on radius and enemy concentration). Very low FPS hit if this is just done on one enemy.