Changing attack type (or damage type?) through triggers

Kangaxx

New Member
Reaction score
1
I'm always messed up with the two types above.
Basically, i want my skill to slow for X%, for X seconds and change the units next 1/1/2 attacks to pure (fire - is that the appropriate type?) damage.
How do i that through triggers?
 

Summoned

New Member
Reaction score
51
This is actually fairly complex, since you have no way to detect exactly how much damage your unit's attack does.

You'll need some kind of damage detection system, for starters, to register that your unit hits a target.

After that, you have to do some nifty calculation for the target's damage reduction. For this, you want to:

(EDIT: should work now, unless the target has under 100 health?)

1) Set the damage taken to a variable.

2) Set the current health of the target to a variable.

3) Set target's health to full.

4) Make your unit damage the target for exactly 100 hero (or whatever your unit uses) attack, normal damage.

5) Find the difference between the health of the target - 100 and the current health of the target.

6) Multiply the original damage taken (from variable) and the difference you found in step 5, divide result by 100.

7) Set the target's current health back to the variable. Deal the value found in 6 to the target as chaos attack, universal damage.
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top