wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Code Resources > Systems
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 01-30-2010, 03:01 PM   #301
NoobMapmaker
User
 
Join Date: Oct 2007
Posts: 11

NoobMapmaker has little to show at this moment (0)

Default

I think you misunderstood me. The example I'm looking for is like this:

Say the caster cast blizzard, normally it would do 10 damage per wave, but if that caster has a certain passive spell that boost blizzard's damage by 25% for example, making it do 12.5 damage per wave. Basically the game will check the caster to see if it has that passive and adjust the damage accordingly.
NoobMapmaker is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 01-30-2010, 05:43 PM   #302
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,726

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

It'd be a lot easier on you in the long run if you just triggered the Blizzard spell, created something like DAMAGE_TYPE_BLIZZARD, and then added the extra damage in another lowest-priority callback with DAMAGE_TYPE_IGNORED and calling SetDamage().

If you really want to do it your way, though, the system does allow it. It doesn't actually increase the damage, though, just deals an extra, ignored bit of damage and then sets the damage to the higher value. This makes the system, for all intents and purposes, think that the damage was the higher value.
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
ICARUS
Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf
Rising_Dusk is offline   Reply With Quote
Old 02-01-2010, 04:15 AM   #303
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 606

Submissions (1)

Fledermaus has a spectacular aura about (143)

Send a message via MSN to Fledermaus
Default

Quote:
Originally Posted by NoobMapmaker
I think you misunderstood me. The example I'm looking for is like this:

Say the caster cast blizzard, normally it would do 10 damage per wave, but if that caster has a certain passive spell that boost blizzard's damage by 25% for example, making it do 12.5 damage per wave. Basically the game will check the caster to see if it has that passive and adjust the damage accordingly.
So you only want 1 spell to increase in damage if the caster has a certain passive? In your first post you said you wanted all spell damage done by the caster to increase, and I gave you an example for that.

If you do in fact want it for only 1 spell, just add an if statement that checks if the caster has the certain passive then increase the damage variable.

Expand YourSpellsCode:
Fledermaus is online now   Reply With Quote
Old 04-15-2010, 01:14 AM   #304
TheKid
User
 
TheKid's Avatar
 
Join Date: Mar 2009
Posts: 195

TheKid will become famous soon enough (37)TheKid will become famous soon enough (37)

Default

Are you aware of the DAMAGE_TYPE_IGNORED bug?

When using your GetUnitArmor library which has optional support for this system, you use UnitDamageTargetEx in replacement of disabling the trigger, though when this occurs all damage after that point is included as ignored.

By removing the static-if statement from the equation (in GetUnitArmor library) the problem was solved but there is still the underlying problem that DAMAGE_TYPE_IGNORED is bugged. I don't know how this wasn't caught sooner, perhaps when this was accepted a resource a fairly common bug such as this should have been caught.
__________________
TheKid is offline   Reply With Quote
Old 05-27-2010, 03:22 PM   #305
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,726

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

DAMAGE_TYPE_IGNORED is actually a newer addition to the library. If there's a bug with it, then it must certainly have slipped by with the past few updates. I'm sorry that I didn't notice your post sooner, I wish you had PMed me with the issue as well so that I would've seen it.

I'd like to clarify what the bug you found is, though.
Quote:
Originally Posted by TheKid
When using your GetUnitArmor library which has optional support for this system, you use UnitDamageTargetEx in replacement of disabling the trigger, though when this occurs all damage after that point is included as ignored.
Can you give me an example of where this bug would occur? If I do -
Collapse JASS:
call UnitDamageTargetEx(..., DAMAGE_TYPE_IGNORED)
call UnitDamageTargetEx(..., DAMAGE_TYPE_SOMETHINGELSE)
- both packets of damage work fine. I'm unsure what you mean by "all damage after that point is included as ignored."

Thanks for your report.
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
ICARUS
Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf
Rising_Dusk is offline   Reply With Quote
Old 06-24-2010, 10:05 AM   #306
TheKid
User
 
TheKid's Avatar
 
Join Date: Mar 2009
Posts: 195

TheKid will become famous soon enough (37)TheKid will become famous soon enough (37)

Default

This site has been down for quite some time now - it's been over two weeks!

Anyways, I'll try to hunt down where I found the problem. I know it was with an issue in compatibility between GetUnitArmor and this system, though I was able to fix it by adjusting a few lines of your script (which made me come to removing the use of your DAMAGE_TYPE_IGNORED). It is not fresh in my memory, though; I'll see what I can find.

This is a link to the system that causes the bug - I think that the test-map download content is broken, too; when I try to open the map in the World Editor it gives me the error, "Main map file could not be opened".

These are the lines that, once changed, appeared to "fix" the issue.

Hidden information:
Collapse JASS:
        static if LIBRARY_IntuitiveDamageSystem then
            //Use the IGNORED type in the IDDS if present so it is 100% ignored
            call UnitDamageTargetEx(u, u, DAMAGE_TEST, ATTACK_TYPE_USED, DAMAGE_TYPE_IGNORED, true)
        else
            if trig != null and IsTriggerEnabled(trig) then
                //Disable the trigger to prevent it registering with damage detection systems
                call DisableTrigger(trig)
                set enab = true
            endif
            call UnitDamageTarget(u, u, DAMAGE_TEST, true, false, ATTACK_TYPE_USED, DAMAGE_TYPE_NORMAL, null)
            if enab then
                //Re-enable the trigger
                call EnableTrigger(trig)
            endif
        endif


At the moment I can't seem to recreate the issue, nor can I find the map that it initially showed up in. What I was doing (to the best of my memory) was displaying values of damage taken to the Game. I noticed that after I would have happened to use GetUnitArmor() it seemed that the printed messages were no longer displayed (I believe there were internal effects from the damage event not responding too, not sure though).
__________________

Last edited by TheKid : 06-24-2010 at 10:28 AM.
TheKid is offline   Reply With Quote
Old 06-25-2010, 10:57 AM   #307
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 606

Submissions (1)

Fledermaus has a spectacular aura about (143)

Send a message via MSN to Fledermaus
Default

Was it only ignoring damage from attacks after you called GetUnitArmor? Because that makes sense :p

UnitDamageTargetEx sets the DamageType to DAMAGE_TYPE_IGNORED but since the RunTrigger doesn't run on that damage type, DamageType is never reset to DAMAGE_TYPE_ATTACK (0). Calling DamageTargetEx with a different damage type would fix the problem however :p
Fledermaus is online now   Reply With Quote
Old 06-28-2010, 05:22 AM   #308
TheKid
User
 
TheKid's Avatar
 
Join Date: Mar 2009
Posts: 195

TheKid will become famous soon enough (37)TheKid will become famous soon enough (37)

Default

Quote:
Was it only ignoring damage from attacks after you called GetUnitArmor?

Indeed it was. I didn't really bother looking through the code to see what the problem was to be honest, though I knew there was a problem somewhere.

Dusk, do you agree with Fledermaus' conclusion?
__________________
TheKid is offline   Reply With Quote
Old 09-11-2010, 05:32 PM   #309
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,726

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Yes, it appears that Fled is right in this regard. I am working out a fix for this issue.

EDIT: Ok, updated the OP with a fixed version.
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
ICARUS
Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf

Last edited by Rising_Dusk : 09-11-2010 at 06:20 PM.
Rising_Dusk is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 02:16 AM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2014, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services