I'm trying to make a Passive Ability on a unit, 'for every 10 health lost, it gains +5 damage'.
I honestly have no real idea how or where to start thou, my natural instinct would be to go with triggers, periodically checking or registering a drop in any health, adding or modifying a passive damage bonus as I see fit.
- How would you do this?
- Is the data editor capable of this?
In the data editor, you would use Validators and Behaviors.
Create 9 Validators of Unit Compare Vital (can also copy/paste them).
Set the Validator - Compare field to Less Than or Equal to.
Set the Validator - Type field to Fraction.
Set the Validator - Value field to 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, and 0.1.
Create 9 Behaviors of Buff (again, can copy/paste).
Set the Validator (Disable) for each of the 9 Behaviors to a different one of the Validators above.
Set the Modification - Combat tab's Damage Dealt (Scaled or Unscaled, I don't actually know which does what) to 5.
That is 10% of their health, he wants to do for each 10 points of health missing. The easiest way I could think of is triggers and Unit Takes Damage event.
But in that case, I guess you'd use the Unit Property Changes event. If you use the Takes Damage event, the unit would keep their massive attack bonus as long as they don't get hit, even if they heal to full.
EDIT: Changed slightly to use a While loop instead of If/Else.
I'm trying to make a Passive Ability on a unit, 'for every 10 health lost, it gains +5 damage'.
I honestly have no real idea how or where to start thou, my natural instinct would be to go with triggers, periodically checking or registering a drop in any health, adding or modifying a passive damage bonus as I see fit.
- How would you do this? - Is the data editor capable of this?
Thanks for any help.
EDIT: Ignore this post.
@Fullachain: Go
In the data editor, you would use Validators and Behaviors.
Create 9 Validators of Unit Compare Vital (can also copy/paste them). Set the Validator - Compare field to Less Than or Equal to. Set the Validator - Type field to Fraction. Set the Validator - Value field to 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, and 0.1.
Create 9 Behaviors of Buff (again, can copy/paste). Set the Validator (Disable) for each of the 9 Behaviors to a different one of the Validators above. Set the Modification - Combat tab's Damage Dealt (Scaled or Unscaled, I don't actually know which does what) to 5.
Give all 9 Behaviors to your unit. Done.
@ProxyTooMuch: Go
That is 10% of their health, he wants to do for each 10 points of health missing. The easiest way I could think of is triggers and Unit Takes Damage event.
@Kurodragon: Go
Ah, I thought it was 10%. ^_^
But in that case, I guess you'd use the Unit Property Changes event. If you use the Takes Damage event, the unit would keep their massive attack bonus as long as they don't get hit, even if they heal to full.
EDIT: Changed slightly to use a While loop instead of If/Else.
Thanks guys so much :)
@Proxy - where do I copy your custom buff from, I've searched every part of the object data, can't find it?
@Fullachain: Go
It's under Behaviors. Named "Damage 5", which basically adds a +5 damage buff to the unit.