Damage Filter

Necrolytie

Member
Reaction score
0
I'm trying to create a kind of "Extra Power" for the damage caused by the heroes, works in the following way, a trigger calculates the "Attack Power" that will be the extra physical damage caused by the hero, and another trigger calculates the "Spell Power" that will be the extra magic damage caused by the hero, however, I can not separate by the trigger when damage taken by the unit, if it is physical or magical, how can I "distinguish" from one another?

However, I accept any other idea to do.
 

Juggernaut

I don't know what to change it to
Reaction score
33
I think it's not possible to distinguish between magic or physical damage (at least not in GUI).

Maybe you could do a very complicated system where each time a unit casts a spell his custom value will change to 1, and when a unit attacks then change his custom value to 0.

Then using a damage detection system you check the units' custom value when the target took damage, if it was 1 deal magical damage and if it was 0 deal physical damage.
 

vypur85

Hibernate
Reaction score
803
As mentioned, they are indistinguishable.

Another alternative is using an buff placer orb attack ability (like slow poison) on all of your heroes. So whenever the hero deals damage via physical attack, it can be detected via the buff placed on the damaged unit. Other damages would be considered as magic. This, in my opinion, is not so game friendly though.
 

udg_local

New Member
Reaction score
4
Then using a damage detection system you check the units' custom value when the target took damage, if it was 1 deal magical damage and if it was 0 deal physical damage.

That won't work (due to spells with damage over time or attacks like bash that deal both physical and spell damage).

How so? I'm using it fine.

This kind of detection is very bugged.The main problems are:

  • If you add the orb ability to units with bouncing missles (like griffons), they can't attack anymore.
  • If you add it to an artillery and order it to attack ground, the game crashes completly.
  • Sometimes the attacked unit gets permanently slowed if it is attacked by many units, even if the buff is removed instantly.
Luckily you don't need such a system.

As mentioned, they are indistinguishable.

Yes they are, you are not up to date ;)
There has been a very recent developing of a system, which allows to distinguish between physical, spell or code damage.

[System] Detection of Physical Damage
[Extension] Damage Source Type
[System] DamageType (StructuredDD Extension)

These three systems are all based on the same idea to detect the damage type.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
If you add the orb ability to units with bouncing missles (like griffons), they can't attack anymore.
I trigger all my bounces and splashes.
If you add it to an artillery and order it to attack ground, the game crashes completly.
It doesn't help with attack ground, but so far I haven't had any crashes.
Sometimes the attacked unit gets permanently slowed if it is attacked by many units, even if the buff is removed instantly.
Never experienced this bug before. Are more than 10 units required?
 

udg_local

New Member
Reaction score
4
Never experienced this bug before. Are more than 10 units required?

You can read this for further information.
You can use the orb stuff in a very limited scenario, thats true. But with the new system its possible to detect the damage type in all cases and without re-triggering all bounces and splashes.
 

Necrolytie

Member
Reaction score
0
Yes they are, you are not up to date ;)
There has been a very recent developing of a system, which allows to distinguish between physical, spell or code damage.

[System] Detection of Physical Damage
[Extension] Damage Source Type
[System] DamageType (StructuredDD Extension)

These three systems are all based on the same idea to detect the damage type.

Well, I saw the 3 systems that passed to me, and apparently none of them really works....
I think i will have to think of another type of system to create extra damage ...
And also, they are all in JASS, and apart i'm HORRIBLE in JASS, i made unimaginable triggers with GUI, now in JASS if i write my name i will think i'm a genius of JASS :p
 

udg_local

New Member
Reaction score
4
Well, I saw the 3 systems that passed to me, and apparently none of them really works....

Then you implemented them wrong ;)
The systems work very well without any real limitations.

You can also also use those systems very easy in GUI: Just set a global variable to the damage type in the code and then check by an additional event for value of real variable -> There you go. This would be very easy to implement (about 3 lines of code). If you want I could help you with this.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
I guess this can only be used in a limited set of maps ^)^, but in the cases where it can be used it's highly useful =).
I guess in my scenario it just might be plausible to rework this method in. Thanks for the info, we could really use it around here ^^

@Necrolytie: Would you like me to send you the GUI system I'm using? It's not as leak-free as the JASS version, but for me it works as needed.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Make sure to change the ability added in the triggers to your modified Spell Damage Reduction ability.
 

Attachments

  • Damage Detection - GUI.w3x
    22.5 KB · Views: 166

udg_local

New Member
Reaction score
4
Carefull: You can't just deal twice damage as the unit may die of that amount before getting healed. Check the linked systems for solutions to this problem.
 

Necrolytie

Member
Reaction score
0
Make sure to change the ability added in the triggers to your modified Spell Damage Reduction ability.

Thats NICE! wonderfull system, but i have one question... correct me if i'm wrog. The trigger set the damage take from the unit to 0, and after that will check if is pysichal or magic, and them deal the damage on the unit, right?

Soo, if i'm right, how can i add extra damages if has pysichal, and how can i add extra damages if has magic? I'm really confuse about that .-.
 

udg_local

New Member
Reaction score
4
No, it doesn't set the damage to zero.

As explained in the links above, every unit gets a modified version of the spell-damage reduction ability with 200% reduction vs spell damage. As a result, all spell damage is negativ and by now simply checking the sign of the damage, it is possible to distinguish between physical or spell damage.

I changed the version in the first link which now supports als GUI. Just go to the trigger DamageEvent GUI, there you can add all your code in GUI.
 

Attachments

  • DamageType GUI.w3x
    46.1 KB · Views: 161

Necrolytie

Member
Reaction score
0
No, it doesn't set the damage to zero.

As explained in the links above, every unit gets a modified version of the spell-damage reduction ability with 200% reduction vs spell damage. As a result, all spell damage is negativ and by now simply checking the sign of the damage, it is possible to distinguish between physical or spell damage.

I changed the version in the first link which now supports als GUI. Just go to the trigger DamageEvent GUI, there you can add all your code in GUI.


OMG! It's amazing!!! Thx you very much!

Soo i just need to add a new event between the "commenst" and vuala, it will work, right?

And this custom script thats call a "Message" for the players of the damage done i can remove?

"c) Then copy the custom ability dmgDetector to the object editor of your
map. Make sure it has the ability ID 'A000'." How can i choose the ID for the spell? o_O

[Edited] Never mind :p i maybe don't know how to do JASS but i know how to "Edit", not all scrip, but the Spell ID yeah, i did that, and i'm felling like a JASS Master LOL.

Thx you very much again for this amazing system... did you want some credits about this on my map?
 

udg_local

New Member
Reaction score
4
Soo i just need to add a new event between the "commenst" and vuala, it will work, right?

Right.

And this custom script thats call a "Message" for the players of the damage done i can remove?

Correct.

Thx you very much again for this amazing system... did you want some credits about this on my map?

Well, thats your decision, I don't ask for credits in general ;)

But nice that it helps you.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top