- Joined
- Jun 17, 2014
- Messages
- 236
when i was creating a spell, and i triggered it. the spell doesnt work, i dont know what's the problem.
here is the trigger
the spell description : hero creates shield that protecting him from 70/105/135/165 +(15% Missing Health) damage.
thank you
here is the trigger
-
conf kyo
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


Set Kyo_ShieldAmount[1] = 75.00
-


Set Kyo_ShieldAmount[2] = 105.00
-


Set Kyo_ShieldAmount[3] = 135.00
-


Set Kyo_ShieldAmount[4] = 165.00
-
-
-
Kyo execute
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Kiyomori
-
-

Actions
-


Set Kyo_Caster = (Triggering unit)
-


Set Kyo_Value = (Custom value of Kyo_Caster)
-


Set Kyo_Level = (Level of Kiyomori for Kyo_Caster)
-


Set Kyo_ShieldLeft[Kyo_Value] = (Kyo_ShieldAmount[Kyo_Level] + (0.15 x ((Max life of Kyo_Caster) - (Life of Kyo_Caster))))
-


Game - Display to (All players) the text: (String(Kyo_ShieldLeft[Kyo_Value]))
-
-
-
kyo takes
-

Events
-


Game - DamageModifierEvent becomes Equal to 1.00
-
-

Conditions
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(DamageEventTarget has buff Kiyomori ) Equal to True
-
-



Then - Actions
-




Set Kyo_Value = (Custom value of DamageEventTarget)
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






Kyo_ShieldLeft[Kyo_Value] Greater than 0.00
-
-





Then - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








Kyo_ShieldLeft[Kyo_Value] Greater than DamageEventAmount
-
-







Then - Actions
-








Game - Display to (All players) the text: (String(Kyo_ShieldLeft[Kyo_Value]))
-








Set Kyo_ShieldLeft[Kyo_Value] = (Kyo_ShieldLeft[Kyo_Value] - DamageEventAmount)
-








Set DamageEventAmount = 0.00
-
-







Else - Actions
-








Game - Display to (All players) the text: (String(Kyo_ShieldLeft[Kyo_Value]))
-








Set Kyo_ShieldLeft[Kyo_Value] = 0.00
-








Set DamageEventAmount = (DamageEventAmount - Kyo_ShieldLeft[Kyo_Value])
-
-
-
-





Else - Actions
-






Unit - Remove Kiyomori buff from Kyo_Caster
-






Set Kyo_ShieldLeft[Kyo_Value] = 0.00
-
-
-
-



Else - Actions
-
-
-
thank you




