• 🏆 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] Every 3 casts the 4th cast deal extra spell damage

Status
Not open for further replies.
Level 8
Joined
Jul 10, 2018
Messages
383
i want a passive that makes a hero 3rd cast deal extra damage i have already made a trigger but it can't seem to work.

  • Old Blood
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • IsDamageSpell Equal to True
          • (DamageEventSource has buff Old Blood ) Equal to True
    • Actions
      • Set Quickshotattack[(Custom value of DamageEventSource)] = (Quickshotattack[(Custom value of DamageEventSource)] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Quickshotattack[(Custom value of DamageEventSource)] Equal to 3
        • Then - Actions
          • Floating Text - Create floating text that reads |cffd45e19Spell Dam... at (Position of (Triggering unit)) with Z offset 0.00, using font size 4.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
          • Set DamageEventAmount = (DamageEventPrevAmt x 3.00)
          • Set Quickshotattack[(Custom value of DamageEventSource)] = 0
        • Else - Actions
 
Last edited:
Level 14
Joined
Feb 7, 2020
Messages
387
  • Or - Any (Conditions) are true
    • Conditions
      • IsDamageSpell Equal to True
      • (DamageEventSource has buff Old Blood ) Equal to True
Did you mean for this to be all conditions are true? If so, remove the wrapping <or> tag.

Have you verified your unit indexer is working?

What version of damage engine are you using? This is how I would modify damage in 5.5:

  • Set DamageEventAmount = (DamageEventAmount x 3.00)
There is no triggering unit in this event, only DamageEventSource as the 'trigger unit':

  • Floating Text - Create floating text that reads |cffd45e19Spell Dam... at (Position of (Triggering unit)) with Z offset 0.00, using font size 4.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
edit: also, the way you increment the attacks right now means the bonus will occur on every 3rd attack. Move the increment to the end of the trigger or change the required value to 4 to fix.
 
Level 8
Joined
Jul 10, 2018
Messages
383
  • Or - Any (Conditions) are true
    • Conditions
      • IsDamageSpell Equal to True
      • (DamageEventSource has buff Old Blood ) Equal to True
Did you mean for this to be all conditions are true? If so, remove the wrapping <or> tag.

Have you verified your unit indexer is working?

What version of damage engine are you using? This is how I would modify damage in 5.5:

  • Set DamageEventAmount = (DamageEventAmount x 3.00)
There is no triggering unit in this event, only DamageEventSource as the 'trigger unit':

  • Floating Text - Create floating text that reads |cffd45e19Spell Dam... at (Position of (Triggering unit)) with Z offset 0.00, using font size 4.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
edit: also, the way you increment the attacks right now means the bonus will occur on every 3rd attack. Move the increment to the end of the trigger or change the required value to 4 to fix.
i dont want it to be an auto attack and yes my unit indexer is working all triggers are working but i dont know how to make it every 4th Cast spell deals extra dmg
 
Level 14
Joined
Feb 7, 2020
Messages
387
i dont want it to be an auto attack and yes my unit indexer is working all triggers are working but i dont know how to make it every 4th Cast spell deals extra dmg
I don't think you inferred properly.

You're checking if it is either a spell or if the unit has the buff. Is that intended? That would count any kind of spell damage.

Did you try the other suggestions?
 
Level 8
Joined
Jul 10, 2018
Messages
383
I don't think you inferred properly.

You're checking if it is either a spell or if the unit has the buff. Is that intended? That would count any kind of spell damage.

Did you try the other suggestions?
What i have in mind is this

If a hero cast the same spell for 3 times the 4th time will deal extra damage

The spell original damage is 50 spell damage with the 4th cast it deals 500 damage you get me?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,539
Do everything Planetary said and you should be all set.

That means remove the OR in your conditions, it's not needed.

And don't use "DamageEventPrevAmt", instead use: Set DamageEventAmount = DamageEventAmount * 3.00
 
Level 8
Joined
Jul 10, 2018
Messages
383
Do everything Planetary said and you should be all set.

That means remove the OR in your conditions, it's not needed.

And don't use "DamageEventPrevAmt", instead use: Set DamageEventAmount = DamageEventAmount * 3.00
but it triggers after each spell i don't want that to happen


  • Old Blood
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • IsDamageSpell Equal to True
      • (DamageEventSource has buff Old Blood ) Equal to True
    • Actions
      • Set Oldblood4Cast[(Custom value of DamageEventSource)] = (Oldblood4Cast[(Custom value of DamageEventSource)] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Oldblood4Cast[(Custom value of DamageEventSource)] Equal to 4
        • Then - Actions
          • Floating Text - Create floating text that reads |cffd45e19Spell Dam... at (Position of DamageEventSource) with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
          • Set DamageEventAmount = (DamageEventPrevAmt x 3.00)
          • Set Oldblood4Cast[(Custom value of DamageEventSource)] = 0
        • Else - Actions
i did as he said
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,539
You're still referencing "DamageEventPrevAmt".

And you need to explain exactly what you want. I'm assuming the Buff you're checking is associated with the Passive, which doesn't seem necessary as you can just check if the unit has the ability.
  • Conditions
    • (Level of YourPassiveSkill for DamageEventSource Greater than or equal to 1
Is the passive designed to work for only 1 of the Hero's spells?

For example:
Thunder Boost (Passive): Every 3rd cast of Thunderclap deals 3x damage.
 
Last edited:
Level 8
Joined
Jul 10, 2018
Messages
383
You're still referencing "DamageEventPrevAmt".

And you need to explain exactly what you want. I'm assuming the Buff you're checking is associated with the Passive, which doesn't seem necessary as you can just check if the unit has the ability.
  • Conditions
    • (Level of YourPassiveSkill for DamageEventSource Greater than or equal to 1
Is the passive designed to work for only 1 of the Hero's spells?

For example:
Thunder Boost (Passive): Every 3rd cast of Thunderclap deals 3x damage.
still doesn't work the spell damage floating text appear after first spell :p
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,539
Show the triggers for the Spells that deal damage. If you deal multiple instances of Spell Damage it will run the Damage Event trigger many times.

Also, add this to the top of the Damage Event trigger after you increase Oldblood4Cast by 1:
  • Game - Display to (All players) for 30.00 seconds the text: (String(Oldblood4Cast[(Custom value of DamageEventSource)]))
 
Level 8
Joined
Jul 10, 2018
Messages
383
Show the triggers for the Spells that deal damage. If you deal multiple instances of Spell Damage it will run the Damage Event trigger many times.

Also, add this to the top of the Damage Event trigger:
  • Game - Display to (All players) for 30.00 seconds the text: (String(Oldblood4Cast[(Custom value of DamageEventSource)]))
so if its aoe it will run it multiple times?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,539
Yes. Every time a unit takes Spell Damage from a source with the Old Blood Buff it will run the trigger.

So what you can do is instead increase Oldblood4Cast when the unit casts a spell. The issue here is if the damage from your spells is delayed or if the spells can be cast in a very short amount of time. Because you could 4th cast Storm Bolt, and while the Bolt is still in the air, cast Thunderclap, and Thunderclap will change the variable preventing Storm Bolt from dealing bonus damage.

  • Example
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Oldblood4Cast[(Custom value of (Triggering unit))] Less than 3
        • Then - Actions
          • Set VariableSet Oldblood4Cast[(Custom value of (Triggering unit))] = (Oldblood4Cast[(Custom value of (Triggering unit))] + 1)
        • Else - Actions
          • Set VariableSet Oldblood4Cast[(Custom value of (Triggering unit))] = 0
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,539
Are the spells that deal bonus damage triggered? Or is the damage coming from a Blizzard ability like Thunderclap? Because it would probably be better to not even use a Damage Engine for this and instead trigger your spells to deal bonus damage if they're the 4th cast.
 
Level 8
Joined
Jul 10, 2018
Messages
383
Are the spells that deal bonus damage triggered? Or is the damage coming from a Blizzard ability like Thunderclap? Because it would probably be better to not even use a Damage Engine for this and instead trigger your spells to deal bonus damage if they're the 4th cast.
also does this increase damage done by spells or all damage sources? Screenshot - 4cd9ea24d28d3fd57e7d10fb010c0b8e - Gyazo
 
Level 8
Joined
Jul 10, 2018
Messages
383
Hmm? Which abilities do you want to deal bonus damage. Is it a Hero that casts multiple spells? Is it an Item that gives the passive ability?

Can you explain exactly what you want to do in detail.
i have a spell called Meteor

Which calls down a meteor on target stunning him and dealing AOE damage i want it to deal extra damage on 4th cast when the buff is on but that is a choice maybe the player want to buff a different spell
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,539

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,539
Here's an example of how you can do it without a Damage Engine. I'm using the Mountain King's Thunder Clap and Storm Bolt ability as the spells.
  • Setup Mountain King Spells
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet ThunderClap_Damage[1] = 60.00
      • Set VariableSet ThunderClap_Damage[2] = 100.00
      • Set VariableSet ThunderClap_Damage[3] = 140.00
      • Set VariableSet StormBolt_Damage[1] = 100.00
      • Set VariableSet StormBolt_Damage[2] = 225.00
      • Set VariableSet StormBolt_Damage[3] = 350.00
  • Cast Thunder Clap
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Thunder Clap
    • Actions
      • Set VariableSet UDex = (Custom value of (Triggering unit))
      • Set VariableSet Level = (Level of (Ability being cast) for (Triggering unit))
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FourthCast[UDex] Less than 3
        • Then - Actions
          • Set VariableSet FourthCast[UDex] = (FourthCast[UDex] + 1)
          • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: (Ability being cast))'s Real Level Field: AOE Damage ('Htc1') of Level: (Level - 1) to ThunderClap_Damage[Level]
          • -------- --------
          • Floating Text - Create floating text that reads ((String(FourthCast[UDex])) + /4) at (Position of (Triggering unit)) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        • Else - Actions
          • Set VariableSet FourthCast[UDex] = 0
          • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: (Ability being cast))'s Real Level Field: AOE Damage ('Htc1') of Level: (Level - 1) to (ThunderClap_Damage[Level] x 3.00)
          • -------- --------
          • Floating Text - Create floating text that reads |cffff00003x Damage... at (Position of (Triggering unit)) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
  • Cast Storm Bolt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Storm Bolt
    • Actions
      • Set VariableSet UDex = (Custom value of (Triggering unit))
      • Set VariableSet Level = (Level of (Ability being cast) for (Triggering unit))
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FourthCast[UDex] Less than 3
        • Then - Actions
          • Set VariableSet FourthCast[UDex] = (FourthCast[UDex] + 1)
          • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: (Ability being cast))'s Real Level Field: Damage ('Htb1') of Level: (Level - 1) to StormBolt_Damage[Level]
          • -------- --------
          • Floating Text - Create floating text that reads ((String(FourthCast[UDex])) + /4) at (Position of (Triggering unit)) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        • Else - Actions
          • Set VariableSet FourthCast[UDex] = 0
          • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: (Ability being cast))'s Real Level Field: Damage ('Htb1') of Level: (Level - 1) to (StormBolt_Damage[Level] x 3.00)
          • -------- --------
          • Floating Text - Create floating text that reads |cffff00003x Damage... at (Position of (Triggering unit)) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
And here's an example of modifying a spell that deals triggered damage.
  • Cast Meteor
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Meteor
    • Actions
      • Set VariableSet UDex = (Custom value of (Triggering unit))
      • Set VariableSet Level = (Level of (Ability being cast) for (Triggering unit))
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FourthCast[UDex] Less than 3
        • Then - Actions
          • Set VariableSet FourthCast[UDex] = (FourthCast[UDex] + 1)
          • -------- --------
          • Set VariableSet Damage = Meteor_Damage[Level]
          • Unit Group - Pick every unit in (Units within 300.00 of (Position of (Target unit of ability being cast)).) and do (Actions)
            • Loop - Actions
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing Damage damage of attack type Spells and damage type Normal
        • Else - Actions
          • Set VariableSet FourthCast[UDex] = 0
          • -------- --------
          • Set VariableSet Damage = (Meteor_Damage[Level] x 3.00)
          • Unit Group - Pick every unit in (Units within 300.00 of (Position of (Target unit of ability being cast)).) and do (Actions)
            • Loop - Actions
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing Damage damage of attack type Spells and damage type Normal
The map is made using the latest version so you may not be able to open it.
 

Attachments

  • 4th Cast Example.w3m
    25 KB · Views: 40
Last edited:
Level 8
Joined
Jul 10, 2018
Messages
383
Here's an example of how you can do it without a Damage Engine. I'm using the Mountain King's Thunder Clap and Storm Bolt ability as the spells.
  • Setup Mountain King Spells
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet ThunderClap_Damage[1] = 60.00
      • Set VariableSet ThunderClap_Damage[2] = 100.00
      • Set VariableSet ThunderClap_Damage[3] = 140.00
      • Set VariableSet StormBolt_Damage[1] = 100.00
      • Set VariableSet StormBolt_Damage[2] = 225.00
      • Set VariableSet StormBolt_Damage[3] = 350.00
  • Cast Thunder Clap
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Thunder Clap
    • Actions
      • Set VariableSet UDex = (Custom value of (Triggering unit))
      • Set VariableSet Level = (Level of (Ability being cast) for (Triggering unit))
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FourthCast[UDex] Less than 3
        • Then - Actions
          • Set VariableSet FourthCast[UDex] = (FourthCast[UDex] + 1)
          • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: (Ability being cast))'s Real Level Field: AOE Damage ('Htc1') of Level: (Level - 1) to ThunderClap_Damage[Level]
          • -------- --------
          • Floating Text - Create floating text that reads ((String(FourthCast[UDex])) + /4) at (Position of (Triggering unit)) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        • Else - Actions
          • Set VariableSet FourthCast[UDex] = 0
          • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: (Ability being cast))'s Real Level Field: AOE Damage ('Htc1') of Level: (Level - 1) to (ThunderClap_Damage[Level] x 3.00)
          • -------- --------
          • Floating Text - Create floating text that reads |cffff00003x Damage... at (Position of (Triggering unit)) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
  • Cast Storm Bolt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Storm Bolt
    • Actions
      • Set VariableSet UDex = (Custom value of (Triggering unit))
      • Set VariableSet Level = (Level of (Ability being cast) for (Triggering unit))
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FourthCast[UDex] Less than 3
        • Then - Actions
          • Set VariableSet FourthCast[UDex] = (FourthCast[UDex] + 1)
          • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: (Ability being cast))'s Real Level Field: Damage ('Htb1') of Level: (Level - 1) to StormBolt_Damage[Level]
          • -------- --------
          • Floating Text - Create floating text that reads ((String(FourthCast[UDex])) + /4) at (Position of (Triggering unit)) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        • Else - Actions
          • Set VariableSet FourthCast[UDex] = 0
          • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: (Ability being cast))'s Real Level Field: Damage ('Htb1') of Level: (Level - 1) to (StormBolt_Damage[Level] x 3.00)
          • -------- --------
          • Floating Text - Create floating text that reads |cffff00003x Damage... at (Position of (Triggering unit)) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
And here's an example of modifying a spell that deals triggered damage.
  • Cast Meteor
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Meteor
    • Actions
      • Set VariableSet UDex = (Custom value of (Triggering unit))
      • Set VariableSet Level = (Level of (Ability being cast) for (Triggering unit))
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FourthCast[UDex] Less than 3
        • Then - Actions
          • Set VariableSet FourthCast[UDex] = (FourthCast[UDex] + 1)
          • -------- --------
          • Set VariableSet Damage = Meteor_Damage[Level]
          • Unit Group - Pick every unit in (Units within 300.00 of (Position of (Target unit of ability being cast)).) and do (Actions)
            • Loop - Actions
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing Damage damage of attack type Spells and damage type Normal
        • Else - Actions
          • Set VariableSet FourthCast[UDex] = 0
          • -------- --------
          • Set VariableSet Damage = (Meteor_Damage[Level] x 3.00)
          • Unit Group - Pick every unit in (Units within 300.00 of (Position of (Target unit of ability being cast)).) and do (Actions)
            • Loop - Actions
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing Damage damage of attack type Spells and damage type Normal
The map is made using the latest version so you may not be able to open it.
Thank you that helped! +1
 
Status
Not open for further replies.
Top