- Joined
- May 8, 2010
- Messages
- 150
Spell 1
Deals a % of the heroes hp onto a targeted unit, while damaging himself.
This is the trigger below.. not sure the problem.
Trigger 2 =
A hero casts a spell, which heals all allied units around him by a % of his hp. But it currently doesnt work.
I also want the spell to damage himself by a percentage like 5 when cast.
[/trigger]
Deals a % of the heroes hp onto a targeted unit, while damaging himself.
This is the trigger below.. not sure the problem.
[trigger=Punishment]Punishment
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Punishment 2
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of (Ability being cast) for (Triggering unit)) Equal to 1
Then - Actions
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (5.00 / (Life of (Triggering unit))) damage of attack type Spells and damage type Normal
Unit - Cause (Triggering unit) to damage (Triggering unit), dealing (20.00 / (Life of (Triggering unit))) damage of attack type Spells and damage type Normal
Floating Text - Create floating text that reads (String((Abs((Integer((20.00 / (Life of (Triggering unit))))))))) above (Target unit of ability being cast) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of (Ability being cast) for (Triggering unit)) Equal to 2
Then - Actions
Floating Text - Create floating text that reads (String((Abs((Integer((2.50 / (Life of (Triggering unit))))))))) above (Target unit of ability being cast) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (2.50 / (Life of (Triggering unit))) damage of attack type Spells and damage type Normal
Unit - Cause (Triggering unit) to damage (Triggering unit), dealing (9.00 / (Life of (Triggering unit))) 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 (Ability being cast) for (Triggering unit)) Equal to 3
Then - Actions
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (2.00 / (Life of (Triggering unit))) damage of attack type Spells and damage type Normal
Unit - Cause (Triggering unit) to damage (Triggering unit), dealing (5.50 / (Life of (Triggering unit))) damage of attack type Spells and damage type Normal
Floating Text - Create floating text that reads (String((Abs((Integer((50.00 / (Life of (Triggering unit))))))))) above (Target unit of ability being cast) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
Else - Actions
[/trigger]
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Punishment 2
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of (Ability being cast) for (Triggering unit)) Equal to 1
Then - Actions
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (5.00 / (Life of (Triggering unit))) damage of attack type Spells and damage type Normal
Unit - Cause (Triggering unit) to damage (Triggering unit), dealing (20.00 / (Life of (Triggering unit))) damage of attack type Spells and damage type Normal
Floating Text - Create floating text that reads (String((Abs((Integer((20.00 / (Life of (Triggering unit))))))))) above (Target unit of ability being cast) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of (Ability being cast) for (Triggering unit)) Equal to 2
Then - Actions
Floating Text - Create floating text that reads (String((Abs((Integer((2.50 / (Life of (Triggering unit))))))))) above (Target unit of ability being cast) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (2.50 / (Life of (Triggering unit))) damage of attack type Spells and damage type Normal
Unit - Cause (Triggering unit) to damage (Triggering unit), dealing (9.00 / (Life of (Triggering unit))) 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 (Ability being cast) for (Triggering unit)) Equal to 3
Then - Actions
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (2.00 / (Life of (Triggering unit))) damage of attack type Spells and damage type Normal
Unit - Cause (Triggering unit) to damage (Triggering unit), dealing (5.50 / (Life of (Triggering unit))) damage of attack type Spells and damage type Normal
Floating Text - Create floating text that reads (String((Abs((Integer((50.00 / (Life of (Triggering unit))))))))) above (Target unit of ability being cast) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
Else - Actions
[/trigger]
Trigger 2 =
A hero casts a spell, which heals all allied units around him by a % of his hp. But it currently doesnt work.
I also want the spell to damage himself by a percentage like 5 when cast.
[trigger=Sacrifice]
Sacrifice
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Sacrifice
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of (Ability being cast) for (Triggering unit)) Equal to 1
Then - Actions
Set SacrificeHeal[(Player number of (Owner of (Triggering unit)))] = (5 / (Integer((Life of (Triggering unit)))))
Unit Group - Pick every unit in (Units within 400.00 of (Position of (Casting unit)) matching (((Owner of (Matching unit)) is an ally of (Owner of (Triggering unit))) Equal to True)) and do (Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (Real(SacrificeHeal[(Player number of (Owner of (Triggering unit)))]))))
Floating Text - Create floating text that reads (String((Abs(SacrificeHeal[(Player number of (Owner of (Triggering unit)))])))) above (Picked unit) with Z offset 0.00, using font size 8.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of (Ability being cast) for (Triggering unit)) Equal to 2
Then - Actions
Set SacrificeHeal[(Player number of (Owner of (Triggering unit)))] = (3 / (Integer((Life of (Triggering unit)))))
Unit Group - Pick every unit in (Units within 400.00 of (Position of (Casting unit)) matching (((Owner of (Matching unit)) is an ally of (Owner of (Triggering unit))) Equal to True)) and do (Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (Real(SacrificeHeal[(Player number of (Owner of (Triggering unit)))]))))
Floating Text - Create floating text that reads (String((Abs(SacrificeHeal[(Player number of (Owner of (Triggering unit)))])))) above (Picked unit) with Z offset 0.00, using font size 8.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of (Ability being cast) for (Triggering unit)) Equal to 3
Then - Actions
Set SacrificeHeal[(Player number of (Owner of (Triggering unit)))] = (2 / (Integer((Life of (Triggering unit)))))
Unit Group - Pick every unit in (Units within 400.00 of (Position of (Casting unit)) matching (((Owner of (Matching unit)) is an ally of (Owner of (Triggering unit))) Equal to True)) and do (Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (Real(SacrificeHeal[(Player number of (Owner of (Triggering unit)))]))))
Floating Text - Create floating text that reads (String((Abs(SacrificeHeal[(Player number of (Owner of (Triggering unit)))])))) above (Picked unit) with Z offset 0.00, using font size 8.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
Else - Actions
Sacrifice
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Sacrifice
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of (Ability being cast) for (Triggering unit)) Equal to 1
Then - Actions
Set SacrificeHeal[(Player number of (Owner of (Triggering unit)))] = (5 / (Integer((Life of (Triggering unit)))))
Unit Group - Pick every unit in (Units within 400.00 of (Position of (Casting unit)) matching (((Owner of (Matching unit)) is an ally of (Owner of (Triggering unit))) Equal to True)) and do (Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (Real(SacrificeHeal[(Player number of (Owner of (Triggering unit)))]))))
Floating Text - Create floating text that reads (String((Abs(SacrificeHeal[(Player number of (Owner of (Triggering unit)))])))) above (Picked unit) with Z offset 0.00, using font size 8.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of (Ability being cast) for (Triggering unit)) Equal to 2
Then - Actions
Set SacrificeHeal[(Player number of (Owner of (Triggering unit)))] = (3 / (Integer((Life of (Triggering unit)))))
Unit Group - Pick every unit in (Units within 400.00 of (Position of (Casting unit)) matching (((Owner of (Matching unit)) is an ally of (Owner of (Triggering unit))) Equal to True)) and do (Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (Real(SacrificeHeal[(Player number of (Owner of (Triggering unit)))]))))
Floating Text - Create floating text that reads (String((Abs(SacrificeHeal[(Player number of (Owner of (Triggering unit)))])))) above (Picked unit) with Z offset 0.00, using font size 8.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of (Ability being cast) for (Triggering unit)) Equal to 3
Then - Actions
Set SacrificeHeal[(Player number of (Owner of (Triggering unit)))] = (2 / (Integer((Life of (Triggering unit)))))
Unit Group - Pick every unit in (Units within 400.00 of (Position of (Casting unit)) matching (((Owner of (Matching unit)) is an ally of (Owner of (Triggering unit))) Equal to True)) and do (Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (Real(SacrificeHeal[(Player number of (Owner of (Triggering unit)))]))))
Floating Text - Create floating text that reads (String((Abs(SacrificeHeal[(Player number of (Owner of (Triggering unit)))])))) above (Picked unit) with Z offset 0.00, using font size 8.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
Else - Actions