Help! I have trigger for spell damage issue! It gives negative value, why?

Status
Not open for further replies.
Level 6
Joined
Aug 31, 2018
Messages
167
This trigger works fine
  • Robe of Magic Spell Power Copy 3
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventSource has an item of type |c0096FF96Mantle of Magic [4/5]|r) Equal to True
      • IsDamageSpell Equal to True
    • Actions
      • Set DamageEventAmount = (DamageEventAmount x 1.12)

This is the bugged trigger. I tested it with 2 heroes, 1 with the item and 1 without the item. The one without the item dealed 500 dmg, the one with the item (for x1.15 bonus dmg) dealed like 485 or something like that. After that i made it x2 and it worked, but when its x1.15 it deals negative damage, why? The trigger with x1.12 works fine but this doesn't.
  • Robe of Magic Spell Power Copy 4
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventSource has an item of type |c00990081Mantle of Magic|r) Equal to True
      • IsDamageSpell Equal to True
    • Actions
      • Set DamageEventAmount = (DamageEventAmount x 1.15)
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
That's really strange. It might be a bug with the system but I've never had any problems with it before.

Do you have other triggers that use the Damage Engine?
It could be helpful to combine them all into 1 trigger.
Here's an example:
  • Damage Engine Example
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • IsDamageSpell Equal to True
        • Then - Actions
          • Set DamageEventAmount = (DamageEventAmount x 2.00)
        • Else - Actions
      • -------- - --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventSource has an item of type Claws of Attack +15) Equal to True
        • Then - Actions
          • Set DamageEventAmount = (DamageEventAmount x 2.00)
        • Else - Actions
      • -------- - --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventSource has buff Avatar) Equal to True
        • Then - Actions
          • Set DamageEventAmount = (DamageEventAmount x 2.00)
        • Else - Actions
This way everything is ordered properly.

So in my example trigger let's say the Damage dealt is equal to 10. If the Damage comes from a Spell, the Source has Claws of Attack, and the Source has the Avatar buff, then the damage will be multiplied like this:
10*2 = 20 (Spell)
20*2 = 40 (Claws)
40*2 = 80 (Avatar)

The reason I recommend doing this is because it'll make it easier to debug when you run into problems. It'll also give you more control over how everything resolves.

That being said, perhaps try to create a new map that isolates the problem. By that I mean a map that only contains the Damage Engine + Your Problem Trigger. This way if it works in the new map then you know that it's not the Damage Engine itself and has to be some other trigger of yours that's causing the problem.
 
Last edited:
Status
Not open for further replies.
Top