• 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.

Spell damage?

Status
Not open for further replies.
Level 5
Joined
Jan 30, 2013
Messages
124
Well, I am having some problems about spell damage now. I want to create an ability that will make its target be taken more spell damage from other abilites after it is casted to the target (by a unit, hero, etc). Or another way is that the ability will decrease its target's spell damage reduction when the target is casted. By ... % or a real number, it is still OK. Shortly, it is the same as Ethereal Blade or Ghost Scepter or Decrepify of Pugna in DotA. But, I don't know how to make it. I have searched many standard abilities in warcraft several times... Anyway, I can't find. I have just tried the ability called "spell damage reduction" of standard Runed Bracers item, and adjusted its data to -x%, then I triggered in order to add that ability I have just made to the target when a unit casts it. However, it didn't work well!? I don't know why??? Please show me how to make the ability like that.
Thanks!:goblin_yeah:
 
Those items and skills just make the unit "Ethereal", wc3 automatically deals bonus spell damage to ethereal units... the base spell for that would be "Banish"... take note though that you cannot attack ethereal units...

if you need it to take more spell damage while it can still be attacked, you can use a dummy ability, then make an ability based from runed bracers to give -reduction, then add that to the target of the spell via triggers... you will also need to remove them after the set time though...
 
Level 5
Joined
Jan 30, 2013
Messages
124
^
1. Oh! Nice! I hadn't known that before. There is one in Gameplay Constants (0.66 = 66%). But it is used for all type of ethereal units (like Ghost Scepter, Ethereal Blade is 40%, but Decrepify of Pugna is 50%) and don't have levels (like lv1: 25%, lv2: 50%, lv3: 75%,... The more levels of Banish, the more spell damage the target will take). How could I make this?:vw_wtf:
2. As my first post, I have used your way, but it didn't work. Although I adjusted the data to -99999%, I didn't see anything. Why?:goblin_jawdrop:
 
Last edited:

yip

yip

Level 3
Joined
Jan 15, 2014
Messages
69
You could trigger it. Use a DDS or something that registers when a unit takes damage - check if the unit has Banish (buff), and if it does, deal extra damage based on the level of the Banish ability of the damage source.

So following your example, it'd be something like this:
(Damage Taken x (Level of Banish for Damage Source x 0.25))

A banished unit won't be damaged unless it's magic/spell damage anyway, so you don't have to worry about that.
Just don't forget to set the attack type of the extra damage to Spells and the damage type to Magic, otherwise it won't work.
 
Level 5
Joined
Jan 30, 2013
Messages
124
sorry! I am late a little. Here is my trigger:
  • shade 2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to shade 2(hero)
    • Actions
      • Unit - Add shade 2(unit) to (Target unit of ability being cast)
      • Unit - Set level of shade 2(unit) for (Target unit of ability being cast) to (Level of shade 2(hero) for (Casting unit))
      • Wait (1.50 + ((Real((Level of shade 2(hero) for (Casting unit)))) x 0.50)) seconds
      • Unit - Remove shade 2(unit) from (Target unit of ability being cast)
shade 2(hero) is the hero ability, it is used for the hero to cast to the target and shade 2(unit) is the Spell Damage Reduction - main spell.
I have tried yours. It wonderfully succeeded. When I add a buff for the item ability and then add it to an unit, it worked! But I don't know why I used that trigger to add it, it didn't work well! Anything happened! I don't know what problems!? Show me.
 
Level 5
Joined
Jan 27, 2014
Messages
164
Some variables do not survive through waits.
That's the root of your problem.
Adding the ability was working because the action was done before the wait.
Some (or most) global event responses are typically forgotten after the wait.
In your case, 'Casting unit' and 'Target unit of ability being cast'.

As a workaround, you can try localise the global variable.
Example:
  • shade 2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to shade 2(hero)
    • Actions
      • Custom script: local unit udg_YourUnit
      • Set YourUnit = (Target unit of ability being cast)
      • Unit - Add shade 2(unit) to (Target unit of ability being cast)
      • Unit - Set level of shade 2(unit) for (Target unit of ability being cast) to (Level of shade 2(hero) for (Triggering unit))
      • Wait (1.50 + ((Real((Level of shade 2(hero) for (Triggering unit)))) x 0.50)) seconds
      • Unit - Remove shade 2(unit) from YourUnit
      • Set YourUnit = (No unit)
You'll need to create a unit global variable in the variable editor. Name the variable 'YourUnit'. And then create the custom script as above.

Also, change all your 'Casting unit' to 'Triggering unit'.
 
Level 5
Joined
Jan 30, 2013
Messages
124
I don't understand these things:
1. How could I know when I must set variables for global event responses and when I don't have to?
2. Why must I change "Casting Unit" to "Triggering Unit"?
3. Adding the ability was working because the action was done before the wait.
Really, it didn't work!
 
Level 5
Joined
Jan 27, 2014
Messages
164
1. When there are waits involved. Most global event responses are always forgotten after waits. So the event responses after waits should have variable set before usage.

2. Casting unit is an unstable event response. In any case possible, use 'Triggering unit'. Also, 'Triggering unit' is one of the event responses that survive through waits.

3. See no 1.


> Really, it didn't work!
Not such a descriptive statement.
Perhaps you did something wrong.
And I can't see the wrong since you didn't post your updated trigger.
 
1) When ur gonna use them more than once... Global responses are functions, and they work slower than variables

@vypur - not entirely true, even with variables, it can still bug if you use waits... unless its a local variable, but need a jass line for that

2) Some say it's faster

3) From the posted trigger, it should work
 
Level 5
Joined
Jan 30, 2013
Messages
124
@vypur85 (#12): sorry, my English is not good so that I couldn't describe it clearly for you. But, I mean, you said that Adding the ability was working because the action was done before the wait.. As you said, I understand like this:
you meant, my first posted trigger still worked, these 2 functions:
  • Unit - Add shade 2(unit) to (Target unit of ability being cast)
  • Unit - Set level of shade 2(unit) for (Target unit of ability being cast) to (Level of shade 2(hero) for (Triggering unit))
They still worked, right? But when the function Wait came, the next other functions would not worked! Like this:
  • Wait (1.50 + ((Real((Level of shade 2(hero) for (Casting unit)))) x 0.50)) seconds
  • Unit - Remove shade 2(unit) from (Target unit of ability being cast)
In my case, the function Unit - Remove ... would not run! But 2 functions above the function Wait could still work well!? But I didn't see anything, the target had no Spell Damage Reduction
 
Last edited:
Status
Not open for further replies.
Top