• 🏆 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] Searing Arrow behavior without autocast

Hello,
I need an ability similar to searing arrow (Priestess of the moon flaming arrow) ability behavior, what I need :
  • Bonus magic damage on attack
  • Mana consumed on each attack

I believe I cannot use auto-cast because I already have another automated spell on.
Therefore, I was thinking about using Envenomed Spear, maybe? I don't know if it can consume mana though, I'll have to try.
Asking for ideas, thank you.
 

Remixer

Map Reviewer
Level 31
Joined
Feb 19, 2011
Messages
1,957
I'm afraid it's a projectile system calling your number. As far as I know there's no way to make on-hit effect cost mana without projectile / damage detection system - granted you want the mana to be consumed on missile launch rather than on the damage event.

I guess technically you could try to pick up every attack order of the unit and instead order the unit to cast a hidden ability at the target but yeah... it gets pretty complex real fast.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,550
I actually just "discovered" a trick for detecting when an attack is launched by using a self-damaging Barrage ability. It's not perfect but it allows the user to know the frame (or maybe a frame after?) an attack is launched, which is quite useful. Unfortunately, this still happens POST attack missile launch, so that rules out anything like modifying the missile data beforehand. It also relies on the attacking unit to have the Barrage ability which could create some unwanted side effects.

In the example map I check and subtract 20 mana at the time of this "attack launch" event and use a rather unsafe approach to add the bonus damage. It's unsafe for many reasons, mainly because it could apply the bonus damage to the wrong attack if you change targets too quickly, but it's just meant to be a quick and dirty example.

Edit: Added Invulnerable/Vulnerable to the Barrage Targets Allowed field so it works even when the attacker is invulnerable.
 

Attachments

  • Detect Attack Launch 1.w3m
    19.5 KB · Views: 3
Last edited:
Top