- Joined
- May 7, 2011
- Messages
- 13
Hi guys
I try to make a hero based on mana-drain... and i´ve got a question... the first skill is that you target a hero and always when this hero loses mana he will lose HP instead... and the spell only works (at the moment) and that´s the problem when you cast the spell on the hero that casts the spell... (you cast it on the caster)... when i target an enemy hero nothing happens... here are the trigger
Would be nice if somebody could help me with this
SharDamaKa
I try to make a hero based on mana-drain... and i´ve got a question... the first skill is that you target a hero and always when this hero loses mana he will lose HP instead... and the spell only works (at the moment) and that´s the problem when you cast the spell on the hero that casts the spell... (you cast it on the caster)... when i target an enemy hero nothing happens... here are the trigger
-
Cast Reserval
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Reversal
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- R_freeIndexes_count Equal to 0
-
Then - Actions
- Set R_TempIndex = R_Index_count
- Set R_Index_count = (R_Index_count + 1)
-
Else - Actions
- Set R_freeIndexes_count = (R_freeIndexes_count - 1)
- Set R_TempIndex = R_freeIndexes[R_freeIndexes_count]
-
If - Conditions
- Set R_active[R_active_count] = R_TempIndex
- Set R_active_count = (R_active_count + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- R_active_count Equal to 1
-
Then - Actions
- Trigger - Turn on Damage Reserval <gen>
- Else - Actions
-
If - Conditions
- Set R_data_caster[R_TempIndex] = (Triggering unit)
- Set R_data_target[R_TempIndex] = (Target unit of ability being cast)
- Set R_data_tmana[R_TempIndex] = (Mana of R_data_target[R_TempIndex])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Damage Reserval
-
Events
- Time - Every 0.01 seconds of game time
- Conditions
-
Actions
- Set R_TempCount = R_active_count
-
For each (Integer R_TempIndexCount) from 1 to R_TempCount, do (Actions)
-
Loop - Actions
- Set R_TempIndex = R_active[(R_TempCount - R_TempIndexCount)]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (R_data_target[R_TempIndex] has buff Reserval ) Equal to True
-
Then - Actions
- Set R_data_tdiffmana[R_TempIndex] = (R_data_tmana[R_TempIndex] - (Mana of R_data_target[R_TempIndex]))
- Unit - Cause R_data_caster[R_TempIndex] to damage R_data_target[R_TempIndex], dealing (R_data_tdiffmana[R_TempIndex] / (5.00 - (1.00 x (Real((Level of Reversal for R_data_caster[R_TempIndex])))))) damage of attack type Magic and damage type Magic
- Unit - Set mana of R_data_target[R_TempIndex] to R_data_tmana[R_TempIndex]
-
Else - Actions
- Set R_freeIndexes[R_freeIndexes_count] = R_TempIndex
- Set R_freeIndexes_count = (R_freeIndexes_count + 1)
- Set R_active_count = (R_active_count - 1)
- Set R_active[(R_TempCount - R_TempIndexCount)] = R_active[R_active_count]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- R_active_count Equal to 0
-
Then - Actions
- Trigger - Turn off Damage Reserval <gen>
- Else - Actions
-
If - Conditions
-
If - Conditions
-
Loop - Actions
-
Events
Would be nice if somebody could help me with this
SharDamaKa