- Joined
- Dec 16, 2017
- Messages
- 343
Hello guys, i am making an talent for the unholy strike spell(it is a passive spell with a % to do instant damage and ministun a target) of the death knight unholy i have in my map, and i want for this talent to give a %(beside the instant dmg) to apply a debuff that damages the target for 8 seconds.
In what i struggle is how to add the debuff to the target just once and get it removed when the target dies or when the spell finishes. This is what i got so far.
In what i struggle is how to add the debuff to the target just once and get it removed when the target dies or when the spell finishes. This is what i got so far.
-
Rapid Decomposition Unholy Talent Research
-
Events
- Unit - A unit Finishes research
-
Conditions
- (Researched tech-type) Equal to Rapid Decomposition (Death Knight Talent)
-
Actions
- Trigger - Turn on Rapid Decomposition Unholy Talent Cast <gen>
-
Events
-
Rapid Decomposition Unholy Talent Cast
-
Events
- Unit - A unit Is attacked
-
Conditions
- (Level of Unholy Strike (Death Knight UNHOLY) for (Attacking unit)) Greater than 0
-
Actions
- Set US_Chance = (Random integer number between 1 and 100)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- US_Chance Less than or equal to 15
-
Then - Actions
- Set US_Index = (US_Index + 1)
- Set US_Caster[US_Index] = (Attacking unit)
- Set US_Target[US_Index] = (Attacked unit)
- Set US_Damage[US_Index] = (0.50 x (Real((Strength of US_Caster[US_Index] (Include bonuses)))))
- Set US_Duration[US_Index] = 8
- Set US_Buff[US_Index] = Virulent Plague (Death Knight UNHOLY)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- US_Index Equal to 1
-
Then - Actions
- Trigger - Turn on Rapid Decomposition Unholy Talent Loop <gen>
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
Events
-
Rapid Decomposition Unholy Talent Loop
-
Events
- Time - Every 1.00 seconds of game time
- Conditions
-
Actions
-
For each (Integer US_Loop) from 1 to US_Index, do (Actions)
-
Loop - Actions
- Set US_Duration[US_Loop] = (US_Duration[US_Loop] - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- US_Duration[US_Loop] Greater than or equal to 0
- (US_Target[US_Loop] is alive) Equal to True
-
Then - Actions
- Unit - Cause US_Caster[US_Loop] to damage US_Target[US_Loop], dealing US_Damage[US_Loop] damage of attack type Spells and damage type Normal
-
Else - Actions
- Set US_Caster[US_Loop] = US_Caster[US_Index]
- Set US_Target[US_Loop] = US_Target[US_Index]
- Set US_Damage[US_Loop] = US_Damage[US_Index]
- Set US_Duration[US_Loop] = US_Duration[US_Index]
- Set US_Index = (US_Index - 1)
- Set US_Loop = (US_Loop - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- US_Index Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
If - Conditions
-
Loop - Actions
-
For each (Integer US_Loop) from 1 to US_Index, do (Actions)
-
Events