Spell Damage Reduction (item ability). Additive or multiplicative?

Level 7
Joined
Sep 9, 2007
Messages
253
If a hero has 2 or more items like Runed Bracers with the item ability Spell Damage Reduction Will the stacked effects be multiplicative or additive?

ie. let's say a unit has two items with 20% spell resistance and 25% spell resistance.

=45% spell damage reduction? (additive)
=40% spell damage reduction? (multiplicative)

Also, I notice this ability has "Data - Damage Bonus" Will this increase spell damage? additive or multiplicative?

I know I could test this but asking might be faster...

Thanks.
 
Level 7
Joined
Sep 9, 2007
Messages
253
I was hoping to have several different items which all give some spell resistance. Do you have any reccomendations in how to go about this? I'm thinking I would have to use Bribe's DDS but I was hoping not to have to adjust the damage manually.
 
Level 15
Joined
Dec 19, 2007
Messages
1,231
I was hoping to have several different items which all give some spell resistance. Do you have any reccomendations in how to go about this? I'm thinking I would have to use Bribe's DDS but I was hoping not to have to adjust the damage manually.

Put Spell Reducion on 202 levels, and set the first level = 0%, then start by giving minus%, this is the hard part since it must be done manually, then do the possitive% part. Every second, set ug = all units that need to be tested, mainly checked by having that ability which is invisable and can be given to any unit because of that. pick every unit in ug { set int =0. if unit has buff "5% spell defense" set int= int+5 if "-5%" then set int = int-5..... if int = 0 set ability levle to 1 , if a negetive set ability level to 1+the negetive value Aritmatic[-5 means 1+(-5*-1)=6 , which on my system means -5 spell resistance] for positive value: 100+1+int [5%bonus will mean 100+1+5= 106, which is for my system means 5% additive]
* Hero has 25% spell defense which is caculated before this system goes, so 100 damage is actaully 75 that is then reduced by the system.
* The ability can't give more than -200% value, meanning you can maximum have double damage from spell (I never actually tried it, I might be wrong about that part)
* The ability must be given as permanent ability so that transformation will not remove it (advice: player do text massge -ms, show both his movement speed and his corrent spell resistance, so you can check how it work for your metamorthed illidan)
^ From my experience this system will work without bugs, but the massive update will indeed cause lag, so its adviced to set unitgroup=only heroes which are not illusions to optimize it.
Good Luck
 
Level 15
Joined
Dec 19, 2007
Messages
1,231
Yes, it doesn't really stack. Example, you have two effect from the same base, negative and positive. It chooses the positive because it's the maximized. Anyways, @best_player_88, creating an ability with 202 levels would make the loading much longer.
Yes, it make lag on loading time and that is why its possible to use 5% = a level, resulting in less overall levels.
 
Level 15
Joined
Dec 19, 2007
Messages
1,231
I forgot to add
  • GLOBAL Settings Per Second
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set ug = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and (((Player number of (Owner of (Matching unit))) Less than or equal to 10) and ((((Matching unit) is Magic Immune) Equal to False) and (True Equal to True)))))
      • Unit Group - Pick every unit in ug and do (Actions)
        • Loop - Actions
          • Set Integer = 1
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Weaken Souls) Equal to True
            • Then - Actions
              • Set Integer = (Integer - 35)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has an item of type Khadgar's Pipe of Insight) Equal to True
            • Then - Actions
              • Set Integer = (Integer + 30)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) has an item of type Hood of Defiance) Equal to True
                • Then - Actions
                  • Set Integer = (Integer + 30)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) has an item of type Planeswalker's Cloak) Equal to True
                    • Then - Actions
                      • Set Integer = (Integer + 15)
                    • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff 40% Jutsu Damage Reducion ) Equal to True
            • Then - Actions
              • Set Integer = (Integer + 40)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) has buff 35% Jutsu Damage Reducion ) Equal to True
                • Then - Actions
                  • Set Integer = (Integer + 35)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) has buff 33% Jutsu Damage Reducion ) Equal to True
                    • Then - Actions
                      • Set Integer = (Integer + 33)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked unit) has buff 30% Jutsu Damage Reducion ) Equal to True
                        • Then - Actions
                          • Set Integer = (Integer + 30)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • ((Picked unit) has buff 25% Jutsu Damage Reducion ) Equal to True
                            • Then - Actions
                              • Set Integer = (Integer + 25)
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • ((Picked unit) has buff 20% Jutsu Damage Reducion ) Equal to True
                                • Then - Actions
                                  • Set Integer = (Integer + 20)
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • ((Picked unit) has buff 15% Jutsu Damage Reducion ) Equal to True
                                    • Then - Actions
                                      • Set Integer = (Integer + 15)
                                    • Else - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • ((Picked unit) has buff 10% Jutsu Damage Reducion ) Equal to True
                                        • Then - Actions
                                          • Set Integer = (Integer + 10)
                                        • Else - Actions
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • ((Picked unit) has buff 5% Jutsu Damage Reducion ) Equal to True
                                            • Then - Actions
                                              • Set Integer = (Integer + 5)
                                            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Stone Skin Shield (20% spell defense) ) Equal to True
            • Then - Actions
              • Set Integer = (Integer + 20)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) has buff Stone Skin Shield (15% spell defense) ) Equal to True
                • Then - Actions
                  • Set Integer = (Integer + 15)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) has buff Stone Skin Shield (10% spell defense) ) Equal to True
                    • Then - Actions
                      • Set Integer = (Integer + 10)
                    • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Defence Aura - 20% ) Equal to True
            • Then - Actions
              • Set Integer = (Integer + 20)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) has buff Defence Aura - 15% ) Equal to True
                • Then - Actions
                  • Set Integer = (Integer + 15)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) has buff Defence Aura - 10% ) Equal to True
                    • Then - Actions
                      • Set Integer = (Integer + 10)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked unit) has buff Defence Aura - 5% ) Equal to True
                        • Then - Actions
                          • Set Integer = (Integer + 5)
                        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has an item of type Divine Forhead Protector) Equal to True
            • Then - Actions
              • Set Integer = 101
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Integer Greater than 101
            • Then - Actions
              • Set Integer = 101
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Integer Less than 1
            • Then - Actions
              • Set Integer = (Integer x -1)
              • Set Integer = (Integer + 101)
            • Else - Actions
          • Unit - Set level of A CONTROLER Spell Damage for (Picked unit) to Integer
      • Custom script: call DestroyGroup(udg_ug)
Edit: the point of using if ELSE is an aura that takes time to swap, so that a unit with both buffs will not get double the benefit, forhead protector ignores all over modifies, giving 100% defense ignoring others. and I shown example of detecting buffs, it can be done in many more ways limited by immagination. (keep in mind: spell reducion won't effect illusions. and also, this trigger will be much more optimized if it effects none-illusions heroes)
 
Level 10
Joined
Mar 17, 2012
Messages
582
Elunes Grace ability stacks several times... I just tried it... I took 6 items with Elunes grace (each item gives 15% spell reduction) and they protected my hero for 90% of spell damage!
But when I gave hero runed bracers - elunes grace stoped working

Conclusion - use Elune's Grace? don't use Spell Damage Reduction
^^,
 
Level 7
Joined
Sep 9, 2007
Messages
253
ZiGOR That sounds brilliant. I will have to have a play around with that.
I wonder what causes some abilities to not stack but others do stack.
best_player_88 Thanks very much for your efforts, your system looks very comprehensive. For what I'm trying to achieve I think there is a bit too much overhead for my liking. Thanks nonetheless.
thegreatninjaman thanks for the idea for elune's grace.
Daffa The Mage thanks for the contribution. As I said I'm very curious why this will not stack but something like "Attribute bonus +1 Strength" does stack.

En_Tropy and Maker thanks as well.
+rep to all.
 
Level 15
Joined
Dec 19, 2007
Messages
1,231
best_player_88

I think you should really learn how to use arrays

I do know, but what does it have to do with anything?
Evasion doesn't stack, you are right, but Critical always stacked)))

Only on melee attacker, a ranged hero can't commit 2 crits at the same time. (if 1 of the crit has 100% it will be the only one done for a ranged attacker)

Elunes Grace ability stacks several times... I just tried it... I took 6 items with Elunes grace (each item gives 15% spell reduction) and they protected my hero for 90% of spell damage!
But when I gave hero runed bracers - elunes grace stoped working

Conclusion - use Elune's Grace? don't use Spell Damage Reduction
^^,

I was ever so amazed to hear it. So, I checked it myself. The disclaimer says "6 items contain Elune's Grace stacks": so I gave each of the 6 item 17% spell reducion, 17*6= 102%. And made blizzard that deals 100 damage on a single wave, and made zero health regeneration. Results: 32 damage was made. So it was better than just 17%, means it does stack, but it does not stack as he claim:
1)100-17%= 83.
2)83-17%= 68.89.
3) 68.89-17%=57.1787.
4) 57.1787-17%=47.458321.
5) 47.458321-17%=39.39040643.
6) 39.39040643-17%=32.6940373369.
Note: since the game mecanics usually cieling the final results and don't use more than 0.00, it most likely that if I used only 2 numbers, the final damage was 31.xx and then was set to 32.
Conclusion: Elune's Grace stacks, but not in additive way, it is still amazing and I am sure to use it in my maps, but it won't fit for a spell damage reducion system.
Good luck with making system based on up to 202 levels of either Elune's Grace OR Spell Reducion, but not a system based on 1 level.
 
Last edited:
Top