HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Damage Detection... in Melee

12-18-2008, 02:06 AM#1
Pyrogasm
Okay, so we all know that we can do damage detection in a variety of ways. To quote Dusk in our IM chat:
Quote:
Originally Posted by Rising_Dusk
The only ways to detect attack damage are as follows:
A) IDDS' way
B) Detect buffs that are acquired on attack.
C) Use timers and pray attacks hit within certain intervals.
A) does not work in melee simply because I cannot cause all units on the map to cast dummy spells instead of real spells in melee.
B) is not viable because it fucks with orbs and on-attack abilities
C) is just impractical and is the worst of all the methods by far.


So, how would you go about creating a system that you could import into a Melee map and have it work without needing to alter the abilities of all the units on the map?

You might think that you could do what Dusk initially suggested to me, which was to simply make whatever units I needed the attack detection to work for cast their spells with dummy units. However, that's not viable in my situation because I need to detect damage done to any and all units on the map.
12-18-2008, 02:14 AM#2
Rising_Dusk
With specific conditions being met in your melee hero, you can use IDDS to properly and effectively detect attack damage for your specific hero. This means that custom critical hit passives, for instance, are easy to make using IDDS in the melee game.

It only falters in exactly one case, and that is when you need to monitor the attack damage of all of the other unit types already in the melee environment. This would only ever be applicable in very specific spells (like trying to trigger a custom thorns aura for whatever reason), but it's really the only hole in the entire method. (Since you as the user obviously don't control all aspects of the WC3 melee environment such that you can trigger all spell damage for all heroes/etc.)

This one hole really isn't all that problematic in 99% of cases, but in that 1% where it's a serious issue, I cannot see an easy solution.
12-18-2008, 07:26 PM#3
Anitarf
There's a limited number of non-attack damage sources in melee, so a possibility is to identify those by other means; spells mostly deal the same damage to everything, exceptions being ethereal units, hero armour and the spell damage reduction item; after you consider these factors and calculate what the base damage would be if it were spell damage, you can compare that to the damage of any damage spells that the damage source may have and if there's no match, the damage could only have been caused by an attack.
12-18-2008, 07:55 PM#4
Kyrbi0
ITT: Coding giants assault a mutual threat