• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Spell damage

Status
Not open for further replies.
Level 3
Joined
Jun 3, 2013
Messages
34
You could have this:
  • Actions
    • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing ((Your Damage) x (Real((Strength/Agility/Intelligence of (Casting unit) (Exclude/Include bonuses))))) damage of attack type (Attack Type) and (Damage Type)
You should use the "Conversion - Convert Integer to Real" on the part where you deal the damage and then find and pick "Hero - Hero Attribute".
 
Level 14
Joined
Jun 27, 2008
Messages
1,325
Hm passive spells? That depends on what the spells do.
Example: a passive spell that gives you a 20% chance to deal 5 times your Strength as damage when attacking.
For that spell you would need to detect the attacks of the unit (using a Damage Detection System) and when the unit is attacking calculate a random integer and deal damage.

For passives that do other things this might look different. But you always have to detect the effects of the passives (like when does the passive do something, when a unit is attacked? when a unit attacks? when a unit reaches low hp? when a unit is healed? or a passive that does something every x seconds? ...)
 
Level 14
Joined
Jun 27, 2008
Messages
1,325
You can trigger AoE spells similar to this:
  • Actions
    • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing ((Your Damage) x (Real((Strength/Agility/Intelligence of (Casting unit) (Exclude/Include bonuses))))) damage of attack type (Attack Type) and (Damage Type)
Just instead of only damaging one unit you have to pick all units in the target area (Enum Units in Range) and damage them all.
 
Status
Not open for further replies.
Top