- Joined
- May 16, 2020
- Messages
- 660
Hi all,
I already posted a similar question about Warpath.
This time it's about Quill Spray though, which seems to be even more difficult...
The description from the Dota 2 wiki (Bristleback):
Whereas Warpath could be done by tracking a Timer (with custom value) for the caster only, here one needs to also tie the stacks to the caster(s) AND target(s).
@Devalut once created this trigger for me, but I realized that the stacks are meant to be independent of each other, i.e. if you hit an enemy, you don't reset the full stack, just add 1 stack for 14 seconds.
Could someone please help add the independence between the stacks?
Also, ideally I'd also like to change the code so that it deals damage via Bribes Damage Engine instead of "checking every 0.05 seconds".
Mainly for 2 reason: a) then I can increase the very low 0.05 timer, and b) the base ability is based on Fan of Knives, which is recognizes by Bribe's Damage Engine even at 0 damage. By working with the DamageEventAmount, I can more cleanly use for example SFXs on spell lifesteal whenever the ability is fired (currently it fires twice).
However, If the trigger is adjusted this way, one needs to consider the interaction between "Bristleback" (the ability):
Again... not exactly sure how to implement all these requirements into one ability.
Many thanks!
I already posted a similar question about Warpath.
This time it's about Quill Spray though, which seems to be even more difficult...
The description from the Dota 2 wiki (Bristleback):
Sprays enemy units with quills dealing damage in an area of effect around Bristleback. Deals bonus damage for every time a unit was hit by Quill Spray in the last 14 seconds.
Whereas Warpath could be done by tracking a Timer (with custom value) for the caster only, here one needs to also tie the stacks to the caster(s) AND target(s).
@Devalut once created this trigger for me, but I realized that the stacks are meant to be independent of each other, i.e. if you hit an enemy, you don't reset the full stack, just add 1 stack for 14 seconds.
-
QuillSpray Config
-
Events
- Map initialization
- Conditions
-
Actions
- Set VariableSet QuillSpray_Config_Damage[1] = 20.00
- Set VariableSet QuillSpray_Config_Damage[2] = 40.00
- Set VariableSet QuillSpray_Config_Damage[3] = 60.00
- Set VariableSet QuillSpray_Config_Damage[4] = 80.00
- -------- --------
- Set VariableSet QuillSpray_Config_Damage_Max[1] = 550.00
- Set VariableSet QuillSpray_Config_Damage_Max[2] = 550.00
- Set VariableSet QuillSpray_Config_Damage_Max[3] = 550.00
- Set VariableSet QuillSpray_Config_Damage_Max[4] = 550.00
- -------- --------
- Set VariableSet QuillSpray_Config_Damage_Stack[1] = 30.00
- Set VariableSet QuillSpray_Config_Damage_Stack[2] = 32.00
- Set VariableSet QuillSpray_Config_Damage_Stack[3] = 34.00
- Set VariableSet QuillSpray_Config_Damage_Stack[4] = 36.00
-
Events
-
QuillSpray
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Quill Spray
-
Actions
- Set VariableSet QuillSpray_Unit = (Triggering unit)
- Set VariableSet QuillSpray_Point[1] = (Position of QuillSpray_Unit)
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 700.00 of QuillSpray_Point[1].) and do (Actions)
-
Loop - Actions
- Set VariableSet QuillSpray_UnitTemp = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (QuillSpray_UnitTemp is alive) Equal to True
- (QuillSpray_UnitTemp belongs to an enemy of (Owner of QuillSpray_Unit).) Equal to True
- (QuillSpray_UnitTemp is A structure) Equal to False
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (QuillSpray_UnitTemp is in QuillSpray_Group.) Equal to False
-
Then - Actions
- Unit Group - Add QuillSpray_UnitTemp to QuillSpray_Group
- Set VariableSet QuillSpray_Index = (QuillSpray_Index + 1)
- Set VariableSet QuillSpray_Stack[QuillSpray_Index] = 0
- Set VariableSet QuillSpray_Level[QuillSpray_Index] = (Level of Quill Spray for QuillSpray_Unit)
- Set VariableSet QuillSpray_Target[QuillSpray_Index] = QuillSpray_UnitTemp
- Set VariableSet QuillSpray_Caster[QuillSpray_Index] = QuillSpray_Unit
- Set VariableSet QuillSpray_Duration[QuillSpray_Index] = 14.00
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- QuillSpray_Index Equal to 1
-
Then - Actions
- Trigger - Turn on QuillSpray Periodic <gen>
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
- Unit Group - Add QuillSpray_UnitTemp to QuillSpray_Group_Damage
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
Loop - Actions
- Custom script: call RemoveLocation(udg_QuillSpray_Point[1])
-
Events
-
QuillSpray Periodic
-
Events
- Time - Every 0.05 seconds of game time
- Conditions
-
Actions
-
For each (Integer QuillSpray_Integer) from 1 to QuillSpray_Index, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (QuillSpray_Target[QuillSpray_Integer] is alive) Equal to True
- QuillSpray_Duration[QuillSpray_Integer] Greater than 0.00
-
Then - Actions
- Set VariableSet QuillSpray_Duration[QuillSpray_Integer] = (QuillSpray_Duration[QuillSpray_Integer] - 0.05)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (QuillSpray_Target[QuillSpray_Integer] is in QuillSpray_Group_Damage.) Equal to True
-
Then - Actions
- Set VariableSet QuillSpray_Stack[QuillSpray_Integer] = (QuillSpray_Stack[QuillSpray_Integer] + 1)
- Set VariableSet QuillSpray_Duration[QuillSpray_Integer] = 14.00
- Set VariableSet NextDamageType = DamageTypeSpell
- Unit - Cause QuillSpray_Caster[QuillSpray_Integer] to damage QuillSpray_Target[QuillSpray_Integer], dealing (Min((QuillSpray_Config_Damage[QuillSpray_Level[QuillSpray_Integer]] + (QuillSpray_Config_Damage_Stack[QuillSpray_Level[QuillSpray_Integer]] x (Real((QuillSpray_Stack[QuillSpray_Integer] - 1))))), QuillSpray_Config_Damage_Max[QuillSpray_Level[QuillSpray_Integ damage of attack type Normal and damage type Normal
- Unit Group - Remove QuillSpray_Target[QuillSpray_Integer] from QuillSpray_Group_Damage.
- Else - Actions
-
If - Conditions
-
Else - Actions
- Unit Group - Remove QuillSpray_Target[QuillSpray_Integer] from QuillSpray_Group.
- Special Effect - Create a special effect attached to the chest of QuillSpray_Target[QuillSpray_Integer] using Abilities\Weapons\DemonHunterMissile\DemonHunterMissile.mdl
- Special Effect - Destroy (Last created special effect)
- Set VariableSet QuillSpray_Stack[QuillSpray_Integer] = 0
- Set VariableSet QuillSpray_Stack[QuillSpray_Integer] = QuillSpray_Stack[QuillSpray_Index]
- Set VariableSet QuillSpray_Level[QuillSpray_Integer] = QuillSpray_Level[QuillSpray_Index]
- Set VariableSet QuillSpray_Caster[QuillSpray_Integer] = QuillSpray_Caster[QuillSpray_Index]
- Set VariableSet QuillSpray_Target[QuillSpray_Integer] = QuillSpray_Target[QuillSpray_Index]
- -------- --------
- Set VariableSet QuillSpray_Index = (QuillSpray_Index - 1)
- Set VariableSet QuillSpray_Integer = (QuillSpray_Integer - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- QuillSpray_Index Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer QuillSpray_Integer) from 1 to QuillSpray_Index, do (Actions)
-
Events
Could someone please help add the independence between the stacks?
Also, ideally I'd also like to change the code so that it deals damage via Bribes Damage Engine instead of "checking every 0.05 seconds".
Mainly for 2 reason: a) then I can increase the very low 0.05 timer, and b) the base ability is based on Fan of Knives, which is recognizes by Bribe's Damage Engine even at 0 damage. By working with the DamageEventAmount, I can more cleanly use for example SFXs on spell lifesteal whenever the ability is fired (currently it fires twice).
However, If the trigger is adjusted this way, one needs to consider the interaction between "Bristleback" (the ability):
Bristleback takes less damage if hit on the sides or rear. If Bristleback takes 210 damage from the rear, he releases a Quill Spray of the current level.
Again... not exactly sure how to implement all these requirements into one ability.
Many thanks!