Is there a way to make a unit steal energy from another unit? Example. I use the ability to steal 5% of the sentry's current energy. It has 300 energy currently which makes my hero take 15 energy from them (If my math is correct).
So I take a percentage of their energy and converts it into a flat amount for my unit.
EDIT: I am using a 'Modify Unit' Fraction and -0.05% energy. But I can't seem to steal it, any ideas?
I think this should be moved to the Data board but I'll help anyway, maybe a mod will move it. :)
There is no clean way to do this unfortunately. What I would do is set up validators the check to see how much energy the target has, and then move energy based on that. Only problem is that you could end up with hundreds of effects and validators. I personally would do it in chunks of 20 or 25 (so about 12 effects instead of hundreds) but it's up to you how painstaking (and therefore accurate) you want this ability to get. So it would be like:
Target has 21-40 energy = give caster 30 energy Target has 41-60 energy = give caster 50 energy Target has 61-80 energy = give caster 70 energy
EDIT: After thinking about this more, you could have a Create Persistent that keeps sucking energy and increasing caster energy at a very quick rate (say 1,000 energy per second, so it seems pretty instant), and deletes itself when the target has 0 energy.