Flare
Stops copies me!
- Reaction score
- 662
GUI/JASS? GUI and JASS (JASS version can now be found here)
MUI? GUI is MUI for 1000 instances, JASS is fully MUI
Leaks? None to my knowledge in GUI version
Lag? With spell-spam, yes
To implement:[/U][/B]
NOTE: If you are going to use the spell, please use the JASS version. It's more effecient, doesn't have a leak, doesn't use any imports and is MUCH easier to configure (hell, if you can't find the configurable stuff, you're blind!)
The relevant actions are highlighted within the code with red or blue text.
Default damage values are as follows:
-Ability Level X Intelligence in immediate damage/heal
-Each unit struck increases the end damage/heal (lets call it N) (depending on unit's alliance towards casting unit) by 10
-Damage/heal caused when the arrow explodes is N x Ability Level for casting hero
NOTICE!
If anyone wishes to use this spell in a map, PLEASE give me credit. I put alot of time and effort into making the spell work perfectly, and I don't want to see someone claiming that they created the spell from scratch.
Black Arrow
The Dark Rangers fires a dark arrow towards the target point. If an enemy is hit by the arrow, it will take damage and the arrow will store some damage. If an ally is hit, it will be healed and will store some healing. When the arrow reaches the target point, it explodes, healing allies for the accumulated healing and damaging enemies for the accumulated damage
The final damage/heal is 2 separate, independent values so if 50 enemies and 5 allies are hit, there is going to be much greater end damage than end heal
Code
Screenshots (taken from GUI version)
GUI version officially approved as of 9th Dec 2007.
MUI? GUI is MUI for 1000 instances, JASS is fully MUI
Leaks? None to my knowledge in GUI version
Lag? With spell-spam, yes
To implement:[/U][/B]
Code:
--GUI version--
Copy the base ability, Black Arrow into your map.
Copy the dummy units, Hidden Dummy, Black Arrow and Nova into your map
(If your Editor isn't set to create unknown variables when copying triggers, go to file -> preferences, and check "automatically create unknown variables")
Copy the 3 spell triggers, BA cast, BA movement and BA damage.
Add the Black Arrow spell to a hero and enjoy :D
NOTE: If you are going to use the spell, please use the JASS version. It's more effecient, doesn't have a leak, doesn't use any imports and is MUCH easier to configure (hell, if you can't find the configurable stuff, you're blind!)
The relevant actions are highlighted within the code with red or blue text.
Default damage values are as follows:
-Ability Level X Intelligence in immediate damage/heal
-Each unit struck increases the end damage/heal (lets call it N) (depending on unit's alliance towards casting unit) by 10
-Damage/heal caused when the arrow explodes is N x Ability Level for casting hero
NOTICE!
If anyone wishes to use this spell in a map, PLEASE give me credit. I put alot of time and effort into making the spell work perfectly, and I don't want to see someone claiming that they created the spell from scratch.
Black Arrow
The Dark Rangers fires a dark arrow towards the target point. If an enemy is hit by the arrow, it will take damage and the arrow will store some damage. If an ally is hit, it will be healed and will store some healing. When the arrow reaches the target point, it explodes, healing allies for the accumulated healing and damaging enemies for the accumulated damage
The final damage/heal is 2 separate, independent values so if 50 enemies and 5 allies are hit, there is going to be much greater end damage than end heal
Code
Code:
BA cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Black Arrow
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BACVal Less than or equal to 999
Then - Actions
Set BACVal = (BACVal + 1)
Else - Actions
Set BACVal = 1
Set BACaster[BACVal] = (Triggering unit)
[COLOR="SeaGreen"][B] Set BACasterLoc[BACVal] = (Position of BACaster[BACVal])[/B][/COLOR]
Set BATargetLoc[BACVal] = (Target point of ability being cast)
Set BAAngle[BACVal] = (Angle from BACasterLoc[BACVal] to BATargetLoc[BACVal])
Set BADummySpawn[BACVal] = (BACasterLoc[BACVal] offset by 100.00 towards BAAngle[BACVal] degrees)
Unit - Create 1 Black Arrow for (Owner of BACaster[BACVal]) at BADummySpawn[BACVal] facing BAAngle[BACVal] degrees
Unit - Turn collision for (Last created unit) Off
Set BADummy[BACVal] = (Last created unit)
Unit - Set the custom value of (Last created unit) to BACVal
Unit Group - Add (Last created unit) to BAArrowGroup
Custom script: call RemoveLocation (udg_BATargetLoc[GetUnitUserData(GetLastCreatedUnit())])
Custom script: call RemoveLocation (udg_BADummySpawn[GetUnitUserData(GetLastCreatedUnit())])
------------------------------------------------------------------------------------------------------------------------------------------------------------
BA movement
Events
Time - Every 0.02 seconds of game time
Conditions
(Number of units in BAArrowGroup) Greater than 0
Actions
[B][COLOR="DarkOrange"] Unit Group - Pick every unit in BAArrowGroup and do (Actions)
Loop - Actions
Set BADummyPt[(Custom value of (Picked unit))] = (Position of (Picked unit))
[COLOR="Sienna"] Set BAMovePt[(Custom value of (Picked unit))] = (BADummyPt[(Custom value of (Picked unit))] offset by 10.00 towards BAAngle[(Custom value of (Picked unit))] degrees)[/COLOR]
Unit - Move (Picked unit) instantly to BAMovePt[(Custom value of (Picked unit))]
Unit - Create 1 Hidden Dummy for (Owner of BADummy[(Custom value of (Picked unit))]) at BACasterLoc[Custom value of (Picked Unit))] facing Default building facing degrees
Unit - Set the custom value of (Last created unit) to (Custom value of BADummy[(Custom value of (Picked unit))])
Unit - Add a 0.05 second Generic expiration timer to (Last created unit)
[COLOR="SeaGreen"][B] Set BADist[(Custom value of (Picked unit))] = (Distance between BACasterLoc[(Custom value of (Picked unit))] and BAMovePt[(Custom value of (Picked unit))])[/B][/COLOR]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
[COLOR="Sienna"] BADist[(Custom value of (Picked unit))] Greater than or equal to 1500.00[/COLOR]
Then - Actions
Unit Group - Remove BADummy[(Custom value of (Picked unit))] from BAArrowGroup
Unit - Remove BADummy[(Custom value of (Picked unit))] from the game[/COLOR][/B]
Set BAEndDmgGroup[(Custom value of (Picked unit))] = (Units within 300.00 of BAMovePt[(Custom value of (Picked unit))] matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)))
Unit Group - Pick every unit in BAEndDmgGroup[(Custom value of (Picked unit))] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Matching unit) belongs to an enemy of (Owner of BACaster[(Custom value of (Last created unit))])) Equal to False
Then - Actions
[COLOR="Red"] Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + BAEndHeal[(Custom value of (Last created unit))])[/COLOR]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Matching unit) belongs to an enemy of (Owner of BACaster[(Custom value of (Last created unit))])) Equal to True
Then - Actions
[COLOR="Red"][B] Unit - Cause BACaster[(Custom value of (Last created unit))] to damage (Picked unit), dealing BAEndDamage[(Custom value of (Last created unit))] damage of attack type Spells and damage type Normal[/B][/COLOR]
Else - Actions
Unit - Create 1 Nova for (Owner of BADummy[(Custom value of (Picked unit))]) at BAMovePt[(Custom value of (Picked unit))] facing Default building facing degrees
Unit - Turn collision for (Last created unit) Off
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
Custom script: call DestroyGroup (udg_BAEndDmgGroup[GetUnitUserData(GetEnumUnit())])
-------- Damage Text --------
[COLOR="Red"] Floating Text - Create floating text that reads (String((Integer(BAEndDamage[(Custom value of (Picked unit))])))) at BAMovePt[(Custom value of (Picked unit))] with Z offset 0.00, using font size 10.00, color (60.00%, 10.00%, 60.00%), and 0.00% transparency[/COLOR]
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 3.50 seconds
Floating Text - Change the fading age of (Last created floating text) to 0.50 seconds
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
-------- Heal Text --------
[COLOR="Red"] Floating Text - Create floating text that reads (String((Integer(BAEndHeal[(Custom value of (Picked unit))])))) at BAMovePt[(Custom value of (Picked unit))] with Z offset 0.00, using font size 10.00, color (10.00%, 100.00%, 10.00%), and 0.00% transparency[/COLOR]
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 3.50 seconds
Floating Text - Change the fading age of (Last created floating text) to 0.50 seconds
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 270.00 degrees
Else - Actions
Custom script: call DestroyGroup (udg_BADmgGroup[GetUnitUserData(GetEnumUnit())])
Custom script: call DestroyGroup (udg_BAEndDmgGroup[GetUnitUserData(GetEnumUnit())])
Custom script: call RemoveLocation (udg_BADummyPt[GetUnitUserData(GetEnumUnit())])
Custom script: call RemoveLocation (udg_BAMovePt[GetUnitUserData(GetEnumUnit())])
------------------------------------------------------------------------------------------------------------------------------------------------------------
BA damage
Events
Conditions
Actions
Unit Group - Pick every unit in BAArrowGroup and do (Actions)
Loop - Actions
Set BADummyPt[(Custom value of (Picked unit))] = (Position of BADummy[(Custom value of (Picked unit))])
Set BATargetLoc[(Custom value of (Picked unit))] = (Position of (Triggering unit))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between BADummyPt[(Custom value of (Picked unit))] and BATargetLoc[(Custom value of (Picked unit))]) Less than or equal to 101.00
((Triggering unit) belongs to an enemy of (Owner of BACaster[(Custom value of (Picked unit))])) Equal to False
((Triggering unit) is alive) Equal to True
Then - Actions
[COLOR="Blue"][B] Set BAEndHeal[(Custom value of (Picked unit))] = (BAEndHeal[(Custom value of (Picked unit))] + 10.00)[/B][/COLOR]
[B][COLOR="Blue"] Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + ((0.50 x (Real((Level of Black Arrow for BACaster[(Custom value of (Picked unit))])))) x (Real((Intelligence of BACaster[(Custom value of (Picked unit))] (Exclude bonuses))))))[/COLOR][/B]
Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
Special Effect - Destroy (Last created special effect)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between BADummyPt[(Custom value of (Picked unit))] and BATargetLoc[(Custom value of (Picked unit))]) Less than or equal to 101.00
((Triggering unit) belongs to an enemy of (Owner of BACaster[(Custom value of (Picked unit))])) Equal to True
((Triggering unit) is alive) Equal to True
Then - Actions
[COLOR="Red"][B] Set BAEndDamage[(Custom value of (Picked unit))] = (BAEndDamage[(Custom value of (Picked unit))] + 10.00)[/B][/COLOR]
[COLOR="Red"][B] Unit - Cause BADummy[(Custom value of (Picked unit))] to damage (Triggering unit), dealing ((0.50 x (Real((Level of Black Arrow for BACaster[(Custom value of (Picked unit))])))) x (Real((Intelligence of BACaster[(Custom value of (Picked unit))] (Exclude bonuses))))) damage of attack type Spells and damage type Normal[/B][/COLOR]
Unit - Set life of BACaster[(Custom value of (Picked unit))] to ((Life of BACaster[(Custom value of (Picked unit))]) + ((0.50 x (Real((Level of Black Arrow for BACaster[(Custom value of (Picked unit))])))) x (Real((Intelligence of BACaster[(Custom value of (Picked unit))] (Exclude bonuses))))))
Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
Special Effect - Destroy (Last created special effect)
Else - Actions
Custom script: call RemoveLocation (udg_BADummyPt[GetUnitUserData(GetEnumUnit())])
Custom script: call RemoveLocation (udg_BATargetLoc[GetUnitUserData(GetEnumUnit())])
Screenshots (taken from GUI version)
GUI version officially approved as of 9th Dec 2007.