# Detect used Spell Mana Cost

#### MN Lahmar

Level 21
Hello guys, i have thought of a spell that goes like this:

As long as the afflicted unit has the negative buff of the spell, every time that unit casts a spell it will receive damage that equals to the cost of the caster spell.
For example, Death knight is afflicted with the custom spell, when he uses death coil, he'll be damaged by 75points.

Thank you guys.

#### pick-a-chew

Level 13
You can use something like this to detected used spell mana cost:

[Trigger=]Set FeedbackInt = (For (Triggering unit), Mana cost of (Ability being cast), Level (Level of (Ability being cast) for (Triggering unit)))[/Trigger]

It's new to 1.29 though so you'll have to see if it actually works.

#### Wark

Level 13
^ I haven't tested that function, but if that doesn't work, try making a formula for it based on the ability level of the spell cast by the triggering unit.

#### MN Lahmar

Level 21
You can use something like this to detected used spell mana cost:

[Trigger=]Mana cost of (Ability being cast)[/Trigger]

Does this exist in the previous patches?
I cant't even find it in 1.29patch.

#### Wark

Level 13
Yup. I can't remember if it's an integer or a real value, though.
Probably a real.

#### pick-a-chew

Level 13
Does this exist in the previous patches?
I cant't even find it in 1.29patch.

I couldn't find it either but if you make an integer variable you can find it in the drop-down when you go to set its value.

#### MN Lahmar

Level 21
I couldn't find it either but if you make an integer variable you can find it in the drop-down when you go to set its value.
Does it exist or not??? How come you give me an answer that isn't correct? Not to sound disrespectful but what!!!! LOL
I can't seem to find this 'Mana cost of (Ability being cast)' as an integer value or a real value under any patch. My question in the first place was, does that function exist or not.
If u aren't sure why provide us with a wrong answer? If it does exist tell me exactly where to find it or give a proof with a screenshot.
Again, bro not trying to be disrespectful but if you aren't sure about your answer don't just assume that it exists.

#### Wark

Level 13
I just looked it up at home.
It's both an integer comparison for conditions, and integer value for actions. It's at the very bottom of the list for version 1.29+
Looks like this in actions:
• Set TempInt = (For (Triggering unit), Mana cost of (Ability being cast), Level 1)
It most definitely exists and works. Just tried using it in a test map to display the mana value an ability cast.

#### pick-a-chew

Level 13
Does it exist or not???

Nice meme. Read the 26 words of my original post. Though i suppose your lack of ability to read is probably why you can't find it.

#### MN Lahmar

Level 21
Nice meme. Read the 26 words of my original post. Though i suppose your lack of ability to read is probably why you can't find it.
Well nice meme too. Kind of insulting but whatever you just did another assumption of me lacking the ability to read when it's actually you who's lacking the ability to read or respond.
Again, bro, not trying to be disrespectful but if you spent the time counting the words that you wrote on giving an actual answer that would've helped a lot. I already said i can't seem to find in under both patches then Wark provided me with a clear answer.

Thank you both. Don't be insulted bro pls this is not Dota 2's SEA servers or a pro wrestling promo.
Hope that we can be friends. Gob bless all.

Replies
5
Views
408
Replies
29
Views
2K
Replies
11
Views
892
Replies
2
Views
2K
Replies
9
Views
1K