- Joined
- Jul 14, 2011
- Messages
- 3,213
Hi! I made these triggers to simulate a multishot that adds some stat damage. It's supossed to be castable up to 400 range. But sometimes it's casts, consumes mana, and no missile is shoot. The other part is that the skill can be cast too fast. It's based on channel ability, but I haven't found a way to prevent the ultra-fast cast, without adding a cooldown (played a bit with Casting Time and Follow Through Time, but no good result)
This one creates one dummy for target unit (max 3). (I know there's a Temp_Group group leak)
This one creates one dummy for target unit (max 3). (I know there's a Temp_Group group leak)
-
PoisonStaff DUMMY
-
Events
-
Unit - A unit Begins casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Poison Staff
-
-
Actions
-
Set Temp_Point = (Position of (Triggering unit))
-
Set Temp_PointArray[1] = (Position of (Triggering unit))
-
Set Temp_Group = (Random 3 units from (Units within 400.00 of Temp_PointArray[1] matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)))
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in Temp_Group and do (Actions)
-
Loop - Actions
-
Unit - Create 1 Dummy Poison Staff for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
-
Unit - Order (Last created unit) to Attack (Picked unit)
-
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-
-
-
Custom script: call RemoveLocation(udg_Temp_Point)
-
Custom script: call RemoveLocation(udg_Temp_PointArray[1])
-
-
-
PoisonStaff DAMAGE
-
Events
-
Game - GDD_Event becomes Equal to 0.00
-
-
Conditions
-
(Unit-type of GDD_DamageSource) Equal to Dummy Poison Staff
-
-
Actions
-
Trigger - Turn off (This trigger)
-
Set A = Believer Melee 0024 <gen> <- Don't pay attention to his
-
Set Real[1] = (Real((Strength of A (Include bonuses))))
-
Set Real[2] = (Real((Agility of A (Include bonuses))))
-
Set Real[3] = (Real((Intelligence of A (Include bonuses))))
-
Set Real[4] = (Real[1] + (Real[2] + Real[3]))
-
Unit - Cause A to damage GDD_DamagedUnit, dealing (Real[4] / 2.00) damage of attack type Hero and damage type Normal
-
Trigger - Turn on (This trigger)
-
-
-
Prevent Cast on Ground
-
Events
-
Unit - A unit Is issued an order targeting a point
-
-
Conditions
-
(Issued order) Equal to (Order(attack))
-
Or - Any (Conditions) are true
-
Conditions
-
(Level of Mindstaff for (Triggering unit)) Greater than 0
-
(Level of Souvenir Bow for (Triggering unit)) Greater than 0
-
(Level of Poison Staff for (Triggering unit)) Greater than 0
-
-
-
-
Actions
-
Trigger - Turn off (This trigger)
-
Unit - Order (Triggering unit) to Stop
-
Set Temp_Point = (Target point of issued order)
-
Set Temp_Group = (Units within 300.00 of Temp_Point matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in Temp_Group) Greater than 0
-
-
Then - Actions
-
Unit - Order (Triggering unit) to Attack (Random unit from Temp_Group)
-
-
Else - Actions
-
Unit - Order (Triggering unit) to Right-Click Temp_Point
-
-
-
Custom script: call DestroyGroup(udg_Temp_Group)
-
Custom script: call RemoveLocation(udg_Temp_Point)
-
Trigger - Turn on (This trigger)
-
-