HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spectral Sight

12-29-2009, 03:26 PM#1
fX_
Description:
With his twisted vision the Demon Hunter looks into the nether realm to better discern the fel essences of his foes and strike them with greater proficiency.

Requirements:
- ABuff by Anitarf (http://www.wc3c.net/showthread.php?t=95521)
- ABuffDisplay by Anitarf (http://www.wc3c.net/showthread.php?t=95521)
- IDDS by Rising_Dusk (http://www.wc3c.net/showthread.php?t=100618)
- SpellEvent by Anitarf (http://www.wc3c.net/showthread.php?t=105374)

Code:
Expand JASS:
Attached Images
File type: jpgicon.JPG (13.1 KB)
File type: jpgplain.JPG (167.4 KB)
File type: jpgspectral.JPG (165.3 KB)
File type: jpgspectralattack.JPG (71.2 KB)
Attached Files
File type: w3x[Spell] Spectral Sight.w3x (289.8 KB)
12-29-2009, 06:25 PM#2
ploks
A lot spells coming into Submitted resources the last days :) Anyway, I suggest to add a screenshot showing the spell in action!
12-29-2009, 09:09 PM#3
Karawasa
I may be wrong but doesn't IDDS require you to code all spell damage? Seems like such a dependency is too much for one spell...
12-29-2009, 09:33 PM#4
Veev
From the man himself:
Quote:
Originally Posted by Rising Dusk
Notes:
This system is only applicable if all of the damage from spells in your map is triggered. The only way this system is useful is if the only damage units deal themselves is from attacks.
The system requires that all damage dealt via triggers be done using a function from the system rather than UnitDamageTarget().

http://www.wc3c.net/showthread.php?t=100618
12-29-2009, 10:42 PM#5
fX_
i need to distinguish damage dealt by attacks.
though i guess i should just use a damage modifier library (if there is such a thing) or, much simpler, abuse orb effects?
12-30-2009, 02:18 PM#6
Rising_Dusk
Quote:
Originally Posted by Karawasa
I may be wrong but doesn't IDDS require you to code all spell damage? Seems like such a dependency is too much for one spell...
Everyone at this point in the game is doing that anyways if they've any sense about them, so there are worse dependencies to have. ABuff is actually the rougher of the requirements to have.

Anyways, is it a passive ability? If so, you should use a passive icon. (Random thought)
12-30-2009, 02:21 PM#7
fX_
its an activated ability. u get the effects only for the duration of the ability.
12-30-2009, 02:21 PM#8
Rising_Dusk
'Kay.
01-02-2010, 10:32 PM#9
Anitarf
The ABuff's damage event that your spell uses will not function without the DamageEvent library, you need to list it in the requirements.

It seems a bit superfluous to maintain a separate list of markers and instances when you could simply enumerate all the buffs of that type instead. Then again, having a dedicated list is somewhat faster so this is acceptable.

You can avoid the data/olddata complications by using the new data1/data2/data3 members, since the ABuff system never modifies those the way it modifies data.

It seems inconsistent that you can see the special effect on the enemies if they cast a spell within the last ABSOLUTE_MAX_MARKER_DURATION seconds, but you can only deal bonus damage if they cast it within the last GetMarkerDuration() seconds.

It makes sense that most of the spell's special effects are local, however the damage effect should probably be visible to all players, since it concerns them all, not just the spectral sight owner.

Collapse JASS:
// You can replace this...
            loop
                if sensed[i] and GetPlayerId(GetLocalPlayer()) == i then
                    set fxPath = HIGHLIGHT_FX_MODELNAME
                endif
                set i = i + 1
                exitwhen i == 12
            endloop
// ...with this:
            if sensed[GetPlayerId(GetLocalPlayer())] then
                set fxPath = HIGHLIGHT_FX_MODELNAME
            endif


Quote:
Originally Posted by Rising_Dusk
ABuff is actually the rougher of the requirements to have.
How so?
01-03-2010, 06:35 AM#10
fX_
Quote:
It seems inconsistent that you can see the special effect on the enemies if they cast a spell within the last ABSOLUTE_MAX_MARKER_DURATION seconds, but you can only deal bonus damage if they cast it within the last GetMarkerDuration() seconds.
this is a different problem:
not just that, but there might be some discrepancy too in the case where two units of a player that are both using the ability attack an enemy that has casted a spell within the 'markerDuration' of the former but not within that of the latter: the marker will be displayed to the player but the extra damage will not apply for both his units.
i think the problem is that the marker special effect is displayed per player and not per unit (spectral sight casters).

Quote:
It makes sense that most of the spell's special effects are local, however the damage effect should probably be visible to all players, since it concerns them all, not just the spectral sight owner.
i didnt mean it as a damage effect, though it may imply that extra damage is being dealt. i categorized it with the marker special effect that is visible only to units with spectral sight.


i have addressed all of these problems except #4 because what ill do to fix that (or whether or not ill have to) might depend on what ill do to fix the problem i mentioned above.
edit: decided to address problem #4 too, anyway.
i added another condition in the 'if' in the second loop in Marker.display():
Collapse JASS:
if IsUnitEnemy(.subject, owner) and IsUnitInRange(.subject, insts[i].caster, insts[i].detectRng) [b]and ABSOLUTE_MAX_MARKER_DURATION-GetABuffTimeRemaining(.abuff) < insts[i].markDur then[/b]
but there's still problem i mentioned above.
02-03-2010, 06:36 AM#11
fX_
fixed something wrong with how damage detection is used. no longer uses DamageEvent.
02-13-2011, 03:50 PM#12
Anitarf
You don't verify in the OnBuffedAttackDamage function if the unit has the buff in the first place, which you should do since that code runs on all damage events so right now even units without the buff take bonus damage (not sure why you didn't use ABuff's built-in damage event which runs only for specific buffs).

Aside form this, the spell looks okay.