Is it possible to make an attack drain energy equal to the damage it makes, and then convert that amount into life for the attacker?
For example:
"Spell breaker" attacks an enemy unit with energy.
It deals 15 damage every attack.
15 energy is drained from the target.
The spell breake" gains 15 life.
Is it possible to make weapon and armor upgrades affect this?
Or if the caster has no energy left? (The attack would give 0 life to the spell breaker.)
In data, this would be hard to impossible. Life steal based on dealt damage is supported in the damage effect, but draining energy based on damage is not, and many dynamic interactions like these are impossible to realize in data. So unless someone finds some fancy workaround, I would suggest using triggers for this, which should be pretty easy.
I assume, you are referring to the Leech Fraction field? I am pretty sure, this restores caster's energy based on damage dealt, and does not burn energy based on damage dealt. So unfortunately, this won't help here.
For example the unit ALWAYS drain 15 energy and gain 15 life?
The life gain should only happen if it attacks a unit with energy. (No matter if it has 0 energy or 100 energy.)
What would be the smoothest way of making this?
A flat value would be easy to do in data. Just execute Modify Unit effects on the caster and the target alongside your damage effect. Add a validator checking, if the target unit has max energy > 0
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Is it possible to make an attack drain energy equal to the damage it makes, and then convert that amount into life for the attacker?
For example: "Spell breaker" attacks an enemy unit with energy. It deals 15 damage every attack. 15 energy is drained from the target. The spell breake" gains 15 life.
Is it possible to make weapon and armor upgrades affect this? Or if the caster has no energy left? (The attack would give 0 life to the spell breaker.)
In data, this would be hard to impossible. Life steal based on dealt damage is supported in the damage effect, but draining energy based on damage is not, and many dynamic interactions like these are impossible to realize in data. So unless someone finds some fancy workaround, I would suggest using triggers for this, which should be pretty easy.
Effects+
Leech Effect.
Then Mana Drain.
I mean Energy Field.
Would it be easier to just have a flat value?
For example the unit ALWAYS drain 15 energy and gain 15 life?
The life gain should only happen if it attacks a unit with energy. (No matter if it has 0 energy or 100 energy.)
What would be the smoothest way of making this?
I assume, you are referring to the Leech Fraction field? I am pretty sure, this restores caster's energy based on damage dealt, and does not burn energy based on damage dealt. So unfortunately, this won't help here.
A flat value would be easy to do in data. Just execute Modify Unit effects on the caster and the target alongside your damage effect. Add a validator checking, if the target unit has max energy > 0