- Joined
- Apr 1, 2017
- Messages
- 47
So here is a simple Divine Shield spell not for caster but for friendly unit (Based on Rejuvenation)
Also for some reason this ability can be casted on enemies despite of allowed targets Friend, Ground, Not self, Organic, Vulnerable.
-
Hand of Protection Start
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Hand of Protection
-
-
Actions
-
Set triggeringHoProt = (Triggering unit)
-
Set IntegerHoProt = (Level of Hand of Protection for triggeringHoProt)
-
Set TargetHoProt = (Target unit of ability being cast)
-
Custom script: set udg_HoProtHashKey = GetHandleId(udg_TargetHoProt)
-
Unit - Make TargetHoProt Invulnerable
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
IntegerHoProt Equal to 1
-
-
Then - Actions
-
Hashtable - Save 15 as 0 of HoProtHashKey in ZHandOfProt
-
Unit Group - Add TargetHoProt to HandOfProtGroup
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
IntegerHoProt Equal to 2
-
-
Then - Actions
-
Hashtable - Save 30 as 0 of HoProtHashKey in ZHandOfProt
-
Unit Group - Add TargetHoProt to HandOfProtGroup
-
-
Else - Actions
-
Hashtable - Save 45 as 0 of HoProtHashKey in ZHandOfProt
-
Unit Group - Add TargetHoProt to HandOfProtGroup
-
-
-
-
-
-
-
Hand Of Protection
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in HandOfProtGroup and do (Actions)
-
Loop - Actions
-
Set PickedHoProt = (Picked unit)
-
Custom script: set udg_HoProtHashKey1 = GetHandleId(udg_PickedHoProt)
-
Set HandOfProtTimer = (Load 0 of HoProtHashKey1 from ZHandOfProt)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
HandOfProtTimer Greater than 0
-
-
Then - Actions
-
Game - Display to (All players) the text: (String(HandOfProtTimer))
-
Hashtable - Save (HandOfProtTimer - 1) as 0 of HoProtHashKey1 in ZHandOfProt
-
-
Else - Actions
-
Unit - Make PickedHoProt Vulnerable
-
Unit Group - Remove PickedHoProt from HandOfProtGroup
-
Hashtable - Clear all child hashtables of child HoProtHashKey1 in ZHandOfProt
-
-
-
-
-
-
Also for some reason this ability can be casted on enemies despite of allowed targets Friend, Ground, Not self, Organic, Vulnerable.