-
Are you planning to upload your awesome spell or system to Hive? Please review the rules here.Dismiss Notice
-
Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.Dismiss Notice
-
A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!Dismiss Notice
-
Check out the Staff job openings thread.Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.
Genetic Shield v. 1.1
Submitted by
tjordell
- Tags:
- Target Object, GUI / Triggers
- Filesize:
- 29.1 KB
- Rating:
-
(0 votes)
- Downloads:
- 482
- Uploaded:
- Jun 23, 2010
- Updated:
- Dec 12, 2015
- Resources:
- 1
- Author(s):
- tjordell
- State:
- Substandard

This bundle is marked as substandard. It may contain bugs, not perform optimally or otherwise be in violation of the submission rules.
Hey everyone!
This spell may be known already but i wanted to test my knowledge in hashtables. Just to get ya to know that this is my first spell using hashtables =)
Here you have the tooltip below:
![[IMG]](proxy.php?image=http%3A%2F%2Fimg256.imageshack.us%2Fimg256%2F8718%2Fgeneticshieldtooltip.png&hash=28ccb3212980b27373ba2f0c9bd5fe36)
and here you have the Code =)
Hopes you like this spell and tell me if you find it Non-MUI, leaks or lags.
Keywords:
Shield, Genetic, Green, tjordell, svenskunganka, block, damage, less damage, armor,
This spell may be known already but i wanted to test my knowledge in hashtables. Just to get ya to know that this is my first spell using hashtables =)
Here you have the tooltip below:
![[IMG]](proxy.php?image=http%3A%2F%2Fimg256.imageshack.us%2Fimg256%2F8718%2Fgeneticshieldtooltip.png&hash=28ccb3212980b27373ba2f0c9bd5fe36)
Changelog
v. 1.1 - [Fixed mayor bug reported by Anachron] - [Added some small new SFX]
v. 1.0 - [Created and Uploaded!]
v. 1.0 - [Created and Uploaded!]
and here you have the Code =)
Code
GS Start
-
GS Start
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Genetic Shield
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Target unit of ability being cast) is in GS_EventGroup) Equal to False
-
-
Then - Actions
-
Trigger - Add to GS Less Damage <gen> the event (Unit - (Target unit of ability being cast) Takes damage)
-
Unit Group - Add (Target unit of ability being cast) to GS_EventGroup
-
-
Else - Actions
-
-
Hashtable - Save 0.00 as (Key shield_damage) of (Key (Target unit of ability being cast)) in GS_Hashtable
-
Hashtable - Save 0 as (Key timer) of (Key (Target unit of ability being cast)) in GS_Hashtable
-
Hashtable - Save Handle Of(Target unit of ability being cast) as (Key hero) of (Key (Target unit of ability being cast)) in GS_Hashtable
-
Unit Group - Add (Target unit of ability being cast) to GS_Units
-
Trigger - Turn on GS Less Damage <gen>
-
Trigger - Turn on GS Timer <gen>
-
-
GS Less Damage
-
GS Less Damage
-
Events
-
Conditions
-
((Triggering unit) has buff Genetic Shield ) Equal to True
-
-
Actions
-
Set GS_CurrentDamage = (Load (Key shield_damage) of (Key (Triggering unit)) from GS_Hashtable)
-
Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + ((Damage taken) / (Real(2))))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
GS_CurrentDamage Greater than or equal to 250.00
-
-
Then - Actions
-
Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Undead\ReplenishMana\ReplenishManaCasterOverhead.mdl
-
Special Effect - Destroy (Last created special effect)
-
Set GS_Loc[1] = (Position of (Triggering unit))
-
Set GS_VictimGroup[1] = (Units within 500.00 of GS_Loc[1] matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is
-
Unit Group - Pick every unit in GS_VictimGroup[1] and do (Actions)
-
Loop - Actions
-
Unit - Cause (Picked unit) to damage (Picked unit), dealing GS_CurrentDamage damage of attack type Spells and damage type Normal
-
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
-
Special Effect - Destroy (Last created special effect)
-
Set GS_Loc[2] = (Position of (Picked unit))
-
Set GS_Angle = (Angle from GS_Loc[1] to GS_Loc[2])
-
Hashtable - Save GS_Angle as (Key angle) of (Key (Picked unit)) in GS_Hashtable
-
Hashtable - Save 0.00 as (Key current_range) of (Key (Picked unit)) in GS_Hashtable
-
Custom script: call RemoveLocation (udg_GS_Loc[2])
-
-
-
Unit - Remove Genetic Shield buff from (Triggering unit)
-
Custom script: call RemoveLocation (udg_GS_Loc[1])
-
Unit Group - Remove (Triggering unit) from GS_Units
-
Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in GS_Hashtable
-
Trigger - Turn on GS PushBack <gen>
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(GS_Units is empty) Equal to True
-
-
Then - Actions
-
Trigger - Turn off GS Timer <gen>
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Else - Actions
-
Set GS_CurrentDamage = (GS_CurrentDamage + (Damage taken))
-
Hashtable - Save GS_CurrentDamage as (Key shield_damage) of (Key (Triggering unit)) in GS_Hashtable
-
-
-
-
GS PushBack
-
GS PushBack
-
Events
-
Time - Every 0.02 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in GS_VictimGroup[1] and do (Actions)
-
Loop - Actions
-
Set GS_CurrentRange = (Load (Key current_range) of (Key (Picked unit)) from GS_Hashtable)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
GS_CurrentRange Less than 100.00
-
-
Then - Actions
-
Set GS_Loc[3] = (Position of (Picked unit))
-
Set GS_Angle = (Load (Key angle) of (Key (Picked unit)) from GS_Hashtable)
-
Set GS_Loc[4] = (GS_Loc[3] offset by 10.00 towards GS_Angle degrees)
-
Unit - Move (Picked unit) instantly to GS_Loc[4]
-
Custom script: call RemoveLocation (udg_GS_Loc[3])
-
Custom script: call RemoveLocation (udg_GS_Loc[4])
-
Set GS_CurrentRange = (GS_CurrentRange + 10.00)
-
Hashtable - Save GS_CurrentRange as (Key current_range) of (Key (Picked unit)) in GS_Hashtable
-
-
Else - Actions
-
Unit Group - Remove (Picked unit) from GS_VictimGroup[1]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is A Hero) Equal to False
-
(Percentage life of (Picked unit)) Less than or equal to 15.00
-
-
Then - Actions
-
Set GS_Loc[5] = (Position of (Picked unit))
-
Set GS_VictimGroup[2] = (Units within 200.00 of GS_Loc[5] matching ((((Matching unit) belongs to an enemy of (Owner of (Load (Key hero) of (Key (Picked unit)) in GS_Hashtable))) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Eq
-
Set GS_Damage = ((Percentage life of (Picked unit)) / (Real(2)))
-
Unit Group - Pick every unit in GS_VictimGroup[2] and do (Actions)
-
Loop - Actions
-
Unit - Cause (Picked unit) to damage (Picked unit), dealing GS_Damage damage of attack type Spells and damage type Normal
-
Special Effect - Create a special effect attached to the head of (Picked unit) using Abilities\Spells\Other\ImmolationRed\ImmolationRedDamage.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
-
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Doom\DoomDeath.mdl
-
Special Effect - Destroy (Last created special effect)
-
Unit - Kill (Picked unit)
-
Custom script: call RemoveLocation (udg_GS_Loc[5])
-
Custom script: call DestroyGroup (udg_GS_VictimGroup[2])
-
-
Else - Actions
-
-
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in GS_Hashtable
-
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(GS_VictimGroup[1] is empty) Equal to True
-
-
Then - Actions
-
Hashtable - Clear all child hashtables of child (Key (Target unit of ability being cast)) in GS_Hashtable
-
Custom script: call DestroyGroup (udg_GS_VictimGroup[1])
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
GS Timer
-
GS Timer
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in GS_Units and do (Actions)
-
Loop - Actions
-
Set GS_Timer = (Load (Key timer) of (Key (Picked unit)) from GS_Hashtable)
-
Set GS_CurrentDamage = (Load (Key shield_damage) of (Key (Picked unit)) from GS_Hashtable)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
GS_Timer Equal to 14
-
-
Then - Actions
-
Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Undead\ReplenishMana\ReplenishManaCasterOverhead.mdl
-
Special Effect - Destroy (Last created special effect)
-
Set GS_Loc[6] = (Position of (Picked unit))
-
Set GS_VictimGroup[1] = (Units within 500.00 of GS_Loc[6] matching ((((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is A gr
-
Unit Group - Pick every unit in GS_VictimGroup[1] and do (Actions)
-
Loop - Actions
-
Unit - Cause (Picked unit) to damage (Picked unit), dealing GS_CurrentDamage damage of attack type Spells and damage type Normal
-
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
-
Special Effect - Destroy (Last created special effect)
-
Set GS_Loc[7] = (Position of (Picked unit))
-
Set GS_Angle = (Angle from GS_Loc[6] to GS_Loc[7])
-
Hashtable - Save GS_Angle as (Key angle) of (Key (Picked unit)) in GS_Hashtable
-
Hashtable - Save 0.00 as (Key current_range) of (Key (Picked unit)) in GS_Hashtable
-
Custom script: call RemoveLocation (udg_GS_Loc[7])
-
-
-
Unit - Remove Genetic Shield buff from (Picked unit)
-
Custom script: call RemoveLocation (udg_GS_Loc[6])
-
Unit Group - Remove (Picked unit) from GS_Units
-
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in GS_Hashtable
-
Trigger - Turn on GS PushBack <gen>
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(GS_Units is empty) Equal to True
-
-
Then - Actions
-
Trigger - Turn off GS Less Damage <gen>
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Else - Actions
-
Set GS_Timer = (GS_Timer + 1)
-
Hashtable - Save GS_Timer as (Key timer) of (Key (Picked unit)) in GS_Hashtable
-
-
-
-
-
-
Hopes you like this spell and tell me if you find it Non-MUI, leaks or lags.
Keywords:
Shield, Genetic, Green, tjordell, svenskunganka, block, damage, less damage, armor,
Contents