• 🏆 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!

[Spell] Is there a way to make normal damage based spells?

Status
Not open for further replies.
Level 1
Joined
Sep 20, 2015
Messages
1
Is there a way to make damage based spells? I saw attribute-based spells like ability deals Agility x2 Strength x3. But I want to damage based spells like Searing Arrows. Adding bonus damage to spells or multiplying hero damage. Thanks for your help in advance. Sorry for my English.



 
Level 14
Joined
Nov 17, 2010
Messages
1,265
I made one, but it isn’t done in the best way. Basically I just store the damage value whenever the hero auto-attacks and then uses that value on the next ability attack. So it can certainly vary a lot and the ability deals a lot of damage if used right after a crit, but it works well for my purposes. I just have to make sure it isn’t taking the damage value of a different ability and it only uses his auto-attacks. This is easy for me because all ability damage is triggered.
 
Level 14
Joined
Nov 17, 2010
Messages
1,265
I think he is trying to find a way to use a units damage when making an ability. Like you cast a spell that deals the units weapon damage + the units agility or something like that. Without keeping track of the damage bonus from each level, attribute, item, etc there is no way to call the unit’s damage as far as I know
 
Level 4
Joined
Sep 2, 2016
Messages
48
1. You can add buff placer to the arrows or use different ability with a buff placer or add some hidden orb ability to the hero having the arrow ability.
2. At damage detection you can check if the attacked unit has the buff.
3. a) (easier) You can make damage source deal damage to attacked unit equal to the damage dealt x whatever multipier you want.
b) (harder) You can make damage source deal damage to attacked unit equal to the damge of attacking hero x whatever multipier you want. But you need to track the damage value somehow.

If the arrows ability ispassive (not autocasted) you don't need the buff. Just check if the damage source has the ability.
 
Level 14
Joined
Nov 17, 2010
Messages
1,265
He can do something like this:

  • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (Real(((Base Damage of (Triggering unit) for weapon index 0) + (2 x (Unit: (Triggering unit)'s Integer Field: Agility (with Bonus) ('uagb')))))) damage of attack type Spells and damage type Normal

That must be one of the new natives from the newer patches. I didn’t know you could do that. I still use 1.27, but I’m working on updating my maps so I can use the newest patch.
 
Status
Not open for further replies.
Top