• 🏆 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!

Damage source and ability probs ; )

Status
Not open for further replies.
Level 31
Joined
Jul 10, 2007
Messages
6,306
1. When I have 2 abilities based on frost breath and the orb of frost ability (the one that goes on to the orb, not the orb itself) and 2 other abilities based on the previous 2, both sets having different buffs-

frost breath 1
orb of frost 1
---> buff 1

frost breath 2
orb of frost 2
---> buff 2

And all four are on a unit, one of the buffs gets overwritten by the other-

attack unit w/ buff 1 and buff 2 and all 4 abilities

unit ends up only having buff 2 on it

So the first question is does anyone know of a way to get both buffs on the attacked unit using those abilities?


The second question has to do with damage source... when a unit attacks another unit, an attack is created (could be a projectile or w/e). When the unit is removed, the attack of course stays but no longer has a source as the unit no longer exists.

My first question is first, should attacks like that be ignored as if they don't exist? (all damage gets stopped)

Not sure how to determine which attack hit the unit w/o the source unit being up...

Every unit can have 64 attacks up at a given time. This means that when an attack hits a unit, it has an id between 1 and 64. If the source was null, then it is known that the unit was deindexed and is in a list of deindexed units w/ attacks up. From there, you can figure out which of those units had an attack up matching the id that hit the unit. After that, you can figure out where the attack was fired from and where the unit currently is and all of this other mumbo jumbo that I don't want to do.

Anyways... this would only occur with corpses with low decay times or when units are removed that had attacks up.

Furthermore, there is yet another problem... w/ no source unit, who gets the bounty? : P

A dummy unit could be used to kill the unit if the unit was going to die, giving the right player the bounty, but anyways...

What are everyone else's thoughts?
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
1. As the level 2 buff is stronger than lvl 1 (due to higher lvl) it will overwrite the lower buff. I have no idea about orb generated buffs, tornado slow aura buff stacks with itself and levels but that won't work with orbs :/

2. Yeah the damage shouldn't damage. I don't know, spells are something different but projectiles? Have you tested the wc3 engine if a unit dies while its projectile is moving if it damages or not? If it do damage then I guess you have to go with your bounty formula with the dummy.
 
Level 31
Joined
Jul 10, 2007
Messages
6,306
1. Well, so long as I can find abilities that work with artillery/reg attacks, like frost breath for artillery and the orb of frost for all reg attacks, I can use it. If it stacks, that'd be 100% good = ).

2. Actually... it should damage at all times. If a unit is null, I shouldn't block the damage. What if a unit was destroyed via artillery fire?

So yea.. I guess I'm going to have to figure out how to do this thing with the null units... and I might as well block damage from expired attacks too (block a wc3 bug)
 
Status
Not open for further replies.
Top