Flare
Stops copies me!
- Reaction score
- 662
This is a system I put together for my own use a while ago to allow me to differentiate between physical attack damage and spell damage. Currently, the demo map only uses a custom Critical Strike (random amount of extra damage between 0% and 100% more damage). It requires an orb effect ability[del], but I will be adding a replacement for every orb effect ability I can think of (and replace in some way).[/del]
Since this uses an orb effect ability, do -NOT- add any ability such as Slow Poison, Orb of Frost, Orb of Fire, Mask of Death and so on. These abilities (and others) will conflict with the used orb effect and render this pretty much useless.
One of the only flaws (other than use of orb effects, but that can be overcome ) is the fact that it can't detect physical ability damage (such as Kaboom).
If you have any requests for additions, please let me know.
Importing this:
Screenshot of the custom Critical Strike (SFX was just to show that the effect occured )
-NOTICE: Very large image
Code involved
Planned additions (will get some done over the weekend)
Since this uses an orb effect ability, do -NOT- add any ability such as Slow Poison, Orb of Frost, Orb of Fire, Mask of Death and so on. These abilities (and others) will conflict with the used orb effect and render this pretty much useless.
One of the only flaws (other than use of orb effects, but that can be overcome ) is the fact that it can't detect physical ability damage (such as Kaboom).
If you have any requests for additions, please let me know.
Importing this:
Code:
Copy the DD detector 2 ability, both the DD detect 2 buffs, and the Damage detector spellbook abilities/buffs into your map.
In File -> Preferences, make sure that "Automatically create unknown variables when pasting trigger data" is checked
Copy the All damage, Spell damage and Physical damage triggers into your map
Copy the Damage detection init 1 and 2 triggers into your map
Now, add your own set of actions to All damage, Spell damage and Physical damage (if necessary)
Screenshot of the custom Critical Strike (SFX was just to show that the effect occured )
-NOTICE: Very large image
Code involved
Code:
Damage detection init 1
Events
Map initialization
Conditions
Actions
Set TempGroupA = (Units in (Playable map area))
Unit Group - Pick every unit in TempGroupA and do (Actions)
Loop - Actions
Unit - Add Damage detection spellbook to (Picked unit)
Trigger - Add to All damage <gen> the event (Unit - (Picked unit) Takes damage)
Trigger - Add to Physical damage <gen> the event (Unit - (Picked unit) Takes damage)
Trigger - Add to Spell damage <gen> the event (Unit - (Picked unit) Takes damage)
-----------------------------------------------------
Damage detection init 2
Events
Unit - A unit enters (Playable map area)
Conditions
Actions
Unit Group - Add (Triggering unit) to TempGroupB
Unit Group - Remove all units of TempGroupA from TempGroupB
Unit Group - Pick every unit in TempGroupB and do (Actions)
Loop - Actions
Unit - Add Damage detection spellbook to (Picked unit)
Trigger - Add to All damage <gen> the event (Unit - (Picked unit) Takes damage)
Trigger - Add to Physical damage <gen> the event (Unit - (Picked unit) Takes damage)
Trigger - Add to Spell damage <gen> the event (Unit - (Picked unit) Takes damage)
Unit Group - Add (Picked unit) to TempGroupA
Unit Group - Remove (Picked unit) from TempGroupB
---------------------------------------------------
Physical damage
Events
Conditions
(Damage taken) Greater than 0.00
Or - Any (Conditions) are true
Conditions
((Triggering unit) has buff DD detect 2 non-stacking (Non-stacking)) Equal to True
((Triggering unit) has buff DD detect 2 stacking (Stacking)) Equal to True
Actions
-------- This will be used for custom attack modifiers, physical damage block etc --------
-------- ALL damage actions go between these 2 actions (Turn Off and Turn On trigger) --------
Trigger - Turn off All damage <gen>
Trigger - Turn off (This trigger)
-------- Random Critical Strike --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Critical Strike for (Damage source)) Greater than 0
(Random real number between 0.00 and 100.00) Less than or equal to 100.00
Then - Actions
Set Multiplier = (Random real number between 0.00 and 1.00)
Unit - Cause (Damage source) to damage (Triggering unit), dealing (Multiplier x (Damage taken)) damage of attack type Hero and damage type Normal
Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
-------- Multiplier value --------
Floating Text - Create floating text that reads ((Substring((String((1.00 + Multiplier))), 1, ((Length of (String((1.00 + Multiplier)))) - 1))) + x) above (Damage source) with Z offset 0.00, using font size 11.00, color (60.00%, 60.00%, 60.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 64.00 towards 90.00 degrees
Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
-------- Total damage dealt. --------
Floating Text - Create floating text that reads ((String((Integer(((1.00 + Multiplier) x (Damage taken)))))) + !) above (Triggering unit) with Z offset 0.00, using font size 11.00, color (100.00%, 0.00%, 0.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 64.00 towards 90.00 degrees
Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
Else - Actions
Trigger - Turn on (This trigger)
Trigger - Turn on All damage <gen>
Unit - Remove DD detect 2 non-stacking (Non-stacking) buff from (Triggering unit)
Unit - Remove DD detect 2 stacking (Stacking) buff from (Triggering unit)
-------------------------------------------
Spell damage
Events
Conditions
(Damage taken) Greater than 0.00
And - All (Conditions) are true
Conditions
((Triggering unit) has buff DD detect 2 non-stacking (Non-stacking)) Equal to False
((Triggering unit) has buff DD detect 2 stacking (Stacking)) Equal to False
Actions
-------- This will be used for custom spell modifiers, spell damage block etc --------
-------- ALL damage actions go between these 2 actions (Turn Off and Turn On trigger) --------
Trigger - Turn off All damage <gen>
Trigger - Turn off (This trigger)
Trigger - Turn on (This trigger)
Trigger - Turn on All damage <gen>
----------------------------------------------------------
All damage
Events
Conditions
Actions
-------- This will be used for recording any damage taken by units, universal damage block etc --------
-------- ALL damage actions go between these 2 actions (Turn Off and Turn On trigger) --------
Trigger - Turn off (This trigger)
Trigger - Turn on (This trigger)
Planned additions (will get some done over the weekend)
Code:
Slow Poison replacement using Slow and some DPS ability, more customizable than your average Slow Poison
Lifesteal orb effect, more customizable though
Orb of Frost orb effect, more customizable again
(Possibly) Orb of Lightning orb effect
Evasion
Magic damage reduction
Magic damage amplification