drain resources equal to the damage dealt (multiplied by a factor)
Not really possible.
Well, it is possible..
But that would include that you create sets and validators for every vitality value the unit had before and every vitality value the unit had afterwards resulting in an effect. Basically you would branch out for each possible vitality value the unit had before, then deal damage effect and a set effect in each branch. That set effect would result in another branch for every possible vitality value.
In short: you create a graph/tree with every possible combination of outcomes and check each path, if it is the correct one.
That's a ton of data stuff just for 1 weapon (as this might result in thousands of entries for 1 weapon). This makes it possible with data, but it's just the worst solution you can imagine.
Not really possible.
Well, it is possible..
But that would include that you create sets and validators for every vitality value the unit had before and every vitality value the unit had afterwards resulting in an effect. Basically you would branch out for each possible vitality value the unit had before, then deal damage effect and a set effect in each branch. That set effect would result in another branch for every possible vitality value.
In short: you create a graph/tree with every possible combination of outcomes and check each path, if it is the correct one.
That's a ton of data stuff just for 1 weapon (as this might result in thousands of entries for 1 weapon). This makes it possible with data, but it's just the worst solution you can imagine.
-> Use triggers.