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

AOE spell which scale with attribute without damaging me and my allies.

Status
Not open for further replies.
Level 6
Joined
Aug 31, 2018
Messages
157
I know how to make AOE spell which scale with attribute, but the problem is that it damages everything in the area + myself and my allies.

Spells that i need to trigger without damaging myself.
Frost nova
Forged lightning
Chain lightning
and maybe Thunder clap.
P.S it gonna be very good if they trigger in same way.

Example attribute: Int x 10.
 
Level 12
Joined
Nov 3, 2013
Messages
989
Basically what you do is this:

  • Unit Group - Pick every unit in (Units within 512.00 of (Position of (Triggering unit)) matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Actions)
    • Loop - Actions
      • Unit - Cause (Triggering unit) to damage (Picked unit), dealing ((Real((Intelligence of (Triggering unit) (Include bonuses)))) x 10.00) damage of attack type Spells and damage type Normal
You'd probably also check for organic or mechanical, ground and/or flying target, etc. etc. and of course you should be using some variables, remove leaks, etc. and you'd still need to use dummy abilities or something for the effects, but basically that's how you get the damage part fixed.
 
Level 9
Joined
Jul 30, 2018
Messages
445
One other way is to use damage detection system, which detects spells (like Bribe's Damage Engine) and then simply set the damage (X * Hero Int or whatever) when it is done by a certain spell.
 

Wrda

Spell Reviewer
Level 25
Joined
Nov 18, 2012
Messages
1,870
One other way is to use damage detection system, which detects spells (like Bribe's Damage Engine) and then simply set the damage (X * Hero Int or whatever) when it is done by a certain spell.
You can't really detect which spell damaged the target. Even if you attempt to detect, you will get innaccurate results, you only know it is spell damage type.
@HolyWillRise have you tried to make conditions?
 
Level 39
Joined
Feb 27, 2007
Messages
4,994
Knowing that it was spell damage is easy. Knowing WHICH spell did the damage is much harder and requires some workarounds. What would you check?

There’s no ‘ability being cast’, so you could try to check the damager’s current or Xth last order but that could be incorrect (if the damage was delayed for example). Even then that only gives the order not the spell id. You can check which spells are on cooldown on the damager, but that requires going through a list of every spell a unit COULD have and looking until one recently on cooldown is found... but what if it’s a passive or aura spell? Some spells give buffs and you can check for that, but not ALL of them do so it doesn’t always work.

There’s no perfect solution.
 
Status
Not open for further replies.
Top