twisterghost
New Member
- Reaction score
- 3
Alright, memory leaks aside, this should be okay, but it doesn't work.
It's supposed to remember the last unit you used a skill on and deal bonus damage if you use it on the same unit again.
It's supposed to remember the last unit you used a skill on and deal bonus damage if you use it on the same unit again.
Code:
Memory Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
MemoryCast Equal to (Target unit of ability being cast)
(Unit-type of (Triggering unit)) Equal to Castmaster
(Ability being cast) Equal to Lightning Strike
Actions
Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Orc\Voodoo\VoodooAuraTarget.mdl
Special Effect - Destroy (Last created special effect)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Memory Cast for (Triggering unit)) Equal to 1
Then - Actions
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 10.00 damage of attack type Spells and damage type Normal
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Memory Cast for (Triggering unit)) Equal to 2
Then - Actions
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 15.00 damage of attack type Spells and damage type Normal
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Memory Cast for (Triggering unit)) Equal to 3
Then - Actions
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 20.00 damage of attack type Spells and damage type Normal
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Memory Cast for (Triggering unit)) Equal to 4
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 10) Equal to 3
Then - Actions
Unit - Pause (Target unit of ability being cast)
Special Effect - Create a special effect attached to the overhead of (Target unit of ability being cast) using Abilities\Spells\Human\Thunderclap\ThunderclapTarget.mdl
Wait 1.00 seconds
Unit - Unpause (Target unit of ability being cast)
Special Effect - Destroy (Last created special effect)
Else - Actions
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 15.00 damage of attack type Spells and damage type Normal
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Memory Cast for (Triggering unit)) Equal to 5
Then - Actions
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 30.00 damage of attack type Spells and damage type Normal
Else - Actions
Set MemoryCast = (Target unit of ability being cast)