• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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