[trigger=QuiverSetup]
Events
Time - Elapsed game time is 0.00 seconds
Actions
Set Ammo = 20
Set MaximumAmmo = 20
Set BowStrung = False
[/trigger]
[trigger=Multiboard]
Events
Time - Elapsed game time is 0.00 seconds
Actions
Multiboard - Create a multiboard with 1 columns and 3 rows, titled Quiver
Set Quiver = (Last created multiboard)
Multiboard - Set the width for Quiver item in column 1, row 1 to 10.00% of the total screen width
Multiboard - Set the width for Quiver item in column 1, row 2 to 12.00% of the total screen width
Multiboard - Set the width for Quiver item in column 1, row 3 to 18.00% of the total screen width
Multiboard - Set the icon for Quiver item in column 1, row 1 to ReplaceableTextures\CommandButtons\BTNTrueShot.blp
Multiboard - Set the icon for Quiver item in column 1, row 2 to ReplaceableTextures\CommandButtons\BTNImprovedBows.blp
Multiboard - Set the text for Quiver item in column 1, row 1 to (Arrows: + ( + ((String(Ammo)) + ( | + ( + (String(MaximumAmmo)))))))
Multiboard - Set the text for Quiver item in column 1, row 2 to (Bow Strung: + |CFFED1C24No|r)
Multiboard - Set the display style for Quiver item in column 1, row 3 to Show text and Hide icons
Multiboard - Show Quiver
Multiboard - Minimize Quiver
Multiboard - Maximize Quiver
[/trigger]
[trigger=Loop Quiver]
Events
Time - Every 0.01 seconds of game time
Actions
Multiboard - Set the text for Quiver item in column 1, row 1 to (Arrows: + ( + ((String(Ammo)) + ( | + ( + (String(MaximumAmmo)))))))
Multiboard - Set the text for Quiver item in column 1, row 3 to (|CFFED1C24Damage Done: + ( + ((String(DamageDone)) + |r)))
[/trigger]
[trigger=String Bow]
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to String Bow
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Ammo Greater than 0
Then - Actions
Set BowStrung = True
Multiboard - Set the text for Quiver item in column 1, row 2 to (Bow Strung: + |CFF00FF00Yes|r)
Else - Actions
Game - Display to (All players) for 8.00 seconds the text: |CFF00FF00Y|CFF0EF9...
[/trigger]
[trigger=Shoot]
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Shoot
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BowStrung Equal to True
Then - Actions
Set Caster = (Triggering unit)
Set Location = (Target point of ability being cast)
Set Angle = (Angle from (Position of Caster) to Location)
Custom script: call RemoveLocation(udg_Location)
Unit - Create 1 Arrow for (Owner of Caster) at ((Position of Caster) offset by 2.00 towards Angle degrees) facing Angle degrees
Set Arrow = (Last created unit)
Unit - Add a 1.19 second Generic expiration timer to Arrow
Set Damage = (Random integer number between 8 and 14)
Set DoubleDamage = (Damage x 2)
Set CritChance = 27.00
Set Ammo = (Ammo - 1)
Set BowStrung = False
Trigger - Turn on Shoot Loop <gen>
Multiboard - Set the text for Quiver item in column 1, row 2 to (Bow Strung: + |CFFED1C24No|r)
Else - Actions
Game - Display to (All players) for 8.00 seconds the text: |CFF00FF00S|CFF03FE...
[/trigger]
[trigger=Shoot Loop]
Events
Time - Every 0.01 seconds of game time
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Arrow is alive) Equal to True
Then - Actions
Unit - Move Arrow instantly to ((Position of Arrow) offset by 8.00 towards Angle degrees)
Unit Group - Pick every unit in (Units within 50.00 of (Position of Arrow) matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A structure) Not equal to True) and (((Matching unit) belongs to an enemy of (Owner of Arrow)) Equal to True)))) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random real number between 1.00 and 100.00) Less than or equal to CritChance
Then - Actions
Trigger - Turn off (This trigger)
Unit - Remove Arrow from the game
Unit - Cause Arrow to damage (Picked unit), dealing (Real(DoubleDamage)) damage of attack type Chaos and damage type Normal
Floating Text - Create floating text that reads (|CFF6DCFF6:|CFF7FB6D8:|CFF919CBAC|CFFA3839CR|CFFB6697EI|CFFC85060T|CFFDA3642:|CFFEC1D24: + ( + (String(DoubleDamage)))) above (Picked unit) with Z offset 0.00, using font size 11.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Set the velocity of (Last created floating text) to 25.00 towards 135.00 degrees
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 1.30 seconds
Set DamageDone = (DamageDone + DoubleDamage)
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
Else - Actions
Trigger - Turn off (This trigger)
Unit - Remove Arrow from the game
Unit - Cause Arrow to damage (Picked unit), dealing (Real(Damage)) damage of attack type Chaos and damage type Normal
Floating Text - Create floating text that reads (|CFF790000 + (- + ( + ((String(Damage)) + |r)))) above (Picked unit) with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Set the velocity of (Last created floating text) to 80.00 towards 45.00 degrees
Floating Text - Change the lifespan of (Last created floating text) to 1.25 seconds
Floating Text - Change the fading age of (Last created floating text) to 0.90 seconds
Set DamageDone = (DamageDone + Damage)
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
Else - Actions
Trigger - Turn off (This trigger)
[/trigger]
[trigger=DestroyArrowSE]
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Arrow
Actions
Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Orc\Devour\DevourEffectArt.mdl
[/trigger]