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 > Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 01-03-2009, 02:48 PM   #31
moyack
Evil Emoticon
 
moyack's Avatar


Respected User
Project Leader: PoC
 
Join Date: Jan 2006
Posts: 3,266

Submissions (17)

moyack is a splendid one to behold (661)moyack is a splendid one to behold (661)moyack is a splendid one to behold (661)moyack is a splendid one to behold (661)

AI Tournament #2 - 2nd PlaceHero Contest - Second place

Send a message via MSN to moyack
Default

I've changed the name to avoid confusion (Inv could be interpreted as Inventory... :P)
moyack is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 01-03-2009, 03:06 PM   #32
ToukoAozaki
extends net.wc3c.Jasser
 
Join Date: Jun 2008
Posts: 336

Submissions (5)

ToukoAozaki will become famous soon enough (60)ToukoAozaki will become famous soon enough (60)ToukoAozaki will become famous soon enough (60)

Send a message via MSN to ToukoAozaki
Default

Quote:
Originally Posted by moyack
I've changed the name to avoid confusion (Inv could be interpreted as Inventory... :P)

I was also concerned, but I didn't have enough motive to change. Thanks.
ToukoAozaki is offline   Reply With Quote
Old 01-03-2009, 05:05 PM   #33
DioD
obey
 
DioD's Avatar
 
Join Date: Feb 2006
Posts: 1,532

Submissions (4)

DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)

Send a message via ICQ to DioD
Default

this is madness...
Collapse JASS:
library InvulnerabilityDetector
//THIS IS SPARTAAAAAAAAA

    function IsUnitInvulnerable takes unit whichUnit returns boolean
        local boolean result = false // default false
        local real HPSTATE = GetWidgetLife(whichUnit)
        
        call UnitDamageTarget(whichUnit,whichUnit,0.01,false,true,null,null,null)
        
        if GetWidgetLife(whichUnit) == HPSTATE then
        return true
        else
        return false
        endif
        return false
    endfunction
endlibrary

looks like "null ownage" still works.

ever if banish ruin all fun, there is check for ethereal state, on this check we can use other attacktype.

well, there is banish+spell immune no problem proof.
result by modded function ofc.
Attached Images
File Type: jpg 123.JPG (66.6 KB, 18 views)

Last edited by DioD : 01-03-2009 at 05:14 PM.
DioD is offline   Reply With Quote
Old 01-03-2009, 05:24 PM   #34
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (134)

Default

And in this unlucky case :
The unit has just a little more than 0.405 hp and she is vulnerable, she will die for no reason.
And there is a constant witch allow to hit invulnerable units, no ?
Hmm finally i will make my own function which checking if the unit has one of the invulnerable buff.
Credit to Rising_Dusk :p
__________________
Cool != Useful

Last edited by Troll-Brain : 01-03-2009 at 05:24 PM.
Troll-Brain is offline   Reply With Quote
Old 01-03-2009, 05:35 PM   #35
ToukoAozaki
extends net.wc3c.Jasser
 
Join Date: Jun 2008
Posts: 336

Submissions (5)

ToukoAozaki will become famous soon enough (60)ToukoAozaki will become famous soon enough (60)ToukoAozaki will become famous soon enough (60)

Send a message via MSN to ToukoAozaki
Default

Quote:
Originally Posted by DioD
this is madness...
Collapse JASS:
library InvulnerabilityDetector
//THIS IS SPARTAAAAAAAAA

    function IsUnitInvulnerable takes unit whichUnit returns boolean
        local boolean result = false // default false
        local real HPSTATE = GetWidgetLife(whichUnit)
        
        call UnitDamageTarget(whichUnit,whichUnit,0.01,false,true,null,null,null)
        
        if GetWidgetLife(whichUnit) == HPSTATE then
        return true
        else
        return false
        endif
        return false
    endfunction
endlibrary

looks like "null ownage" still works.

ever if banish ruin all fun, there is check for ethereal state, on this check we can use other attacktype.

well, there is banish+spell immune no problem proof.
result by modded function ofc.

Your method indeed functions, but there is a flaw. No matter which parameter you change or not, UnitDamageTarget will trigger EVENT_UNIT_DAMAGED every time called with vulnerable units: which is undesirable. Please consider why I did all sort of extra stuff; a function that works with anything and anytime.
ToukoAozaki is offline   Reply With Quote
Old 01-03-2009, 05:44 PM   #36
emjlr3
Rehabbing
 
emjlr3's Avatar
 
Join Date: Jun 2005
Posts: 1,386

Submissions (14)

emjlr3 is a jewel in the rough (151)emjlr3 is a jewel in the rough (151)

Mapping Contest First Place

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

if someone has a DDS, they can easily omit any damage they want - such as in this case
__________________
emjlr3 is offline   Reply With Quote
Old 01-03-2009, 07:14 PM   #37
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

Yeah, a 0. damage event is easy to ignore in every DDS out there.
__________________
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 01-04-2009, 01:42 AM   #38
DioD
obey
 
DioD's Avatar
 
Join Date: Feb 2006
Posts: 1,532

Submissions (4)

DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)

Send a message via ICQ to DioD
Default

You can use damage dummy, if not able to set up filters yourself.
There is no problem with events.

Collapse JASS:
    function IsUnitInvulnerable takes unit whichUnit returns boolean
        local boolean result = false // default false
        local real HPSTATE = GetWidgetLife(whichUnit)
        call SetWidgetLife(whichUnit,HPSTATE + 0.01)
        call UnitDamageTarget(whichUnit,whichUnit,0.01,false,true,null,null,null)
        
        if GetWidgetLife(whichUnit) == HPSTATE then
        return true
        else
        return false
        endif
        return false
    endfunction

There is no more problem with 0.405 hp, since unit will get hp before taking damage.
DioD is offline   Reply With Quote
Old 01-04-2009, 02:42 AM   #39
ToukoAozaki
extends net.wc3c.Jasser
 
Join Date: Jun 2008
Posts: 336

Submissions (5)

ToukoAozaki will become famous soon enough (60)ToukoAozaki will become famous soon enough (60)ToukoAozaki will become famous soon enough (60)

Send a message via MSN to ToukoAozaki
Default

Quote:
Originally Posted by Rising_Dusk
Yeah, a 0. damage event is easy to ignore in every DDS out there.

That would impose limitation that one should use DDS or configure it additionally. This makes extra (indirect) dependency. Suppose you are making an AoS and decide to implement a takeover feature. In this case, you don't necessarily have to use DDS; detecting damages on a few major buildings would work fine without DDS. However, if I need to force doing such configuration, it is overcomplicating things on the user's side. I think unnecessary dependencies should be avoided in the modules (whether it is Jass, C, C#, or whatever), and I wrote them to be independent as possible. It is user's choice anyway, to choose simpler implementation but more work on the user's side, or a bit complex implementation but simple and handy on the user's side. (I think performance difference in this particular case is trivial, though)

Last edited by ToukoAozaki : 01-04-2009 at 02:42 AM.
ToukoAozaki is offline   Reply With Quote
Old 01-04-2009, 03:06 AM   #40
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

Any AoS without a DDS is going to be limited in the scope of its design anyways, so as far as we're concerned your example falters. Anyways, this is not a discussion of game design, so please don't use silly, mis-representative examples.

Anyways, you have still failed to address why using the boolean return of a UnitDamageTarget() call won't work. Technically, your current library will set off false positives for systems that intercept unit orders, so it imposes just as much a user-side dilemma as the UnitDamageTarget() boolean return. As far as I am concerned, with regards to actual maps, the overhead to ignore 0.00 damage events is obvious, whereas ignoring random orders in order-related systems may not be.

Regardless, I stand by what we decided on earlier. If you can prove via testmap that a custom FoD ability is the only way to do this library effectively, then I'll buy into it.
__________________
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 01-04-2009, 03:41 AM   #41
DioD
obey
 
DioD's Avatar
 
Join Date: Feb 2006
Posts: 1,532

Submissions (4)

DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)

Send a message via ICQ to DioD
Default

UnitDamageTarget()

return true, always, no matter what params, tested on paladin.

DDS system - if you can not add filters - dont use jass its overcomplicated for you.
DioD is offline   Reply With Quote
Old 01-04-2009, 05:35 AM   #42
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

Quote:
Originally Posted by DioD
return true, always, no matter what params, tested on paladin.
Did you test it against ethereal + invulnerable units as well as spell immune + invulnerable units? If it works for those two cases, it's a far better solution than the FoD ability order.
__________________
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 01-04-2009, 05:49 AM   #43
ToukoAozaki
extends net.wc3c.Jasser
 
Join Date: Jun 2008
Posts: 336

Submissions (5)

ToukoAozaki will become famous soon enough (60)ToukoAozaki will become famous soon enough (60)ToukoAozaki will become famous soon enough (60)

Send a message via MSN to ToukoAozaki
Default

Quote:
Originally Posted by Rising_Dusk
Any AoS without a DDS is going to be limited in the scope of its design anyways, so as far as we're concerned your example falters. Anyways, this is not a discussion of game design, so please don't use silly, mis-representative examples.
I just wanted to be more specific. My argument is that this library doesn't interfere with trigger events.

Quote:
Originally Posted by Rising_Dusk
Anyways, you have still failed to address why using the boolean return of a UnitDamageTarget() call won't work. Technically, your current library will set off false positives for systems that intercept unit orders, so it imposes just as much a user-side dilemma as the UnitDamageTarget() boolean return. As far as I am concerned, with regards to actual maps, the overhead to ignore 0.00 damage events is obvious, whereas ignoring random orders in order-related systems may not be.
This does not fire any order events. I am well aware of that issue and worked in many ways to make that not happen. When I first wrote this library, there was my another library called OrderLib, which reports any order events in debug mode. When I got a report of a FoD order, I made changes until I didn't get false positives.
Please read what I wrote.

Quote:
Originally Posted by Touko-Aozaki
This is an invulnerability detector library. Uses finger of death as a dummy ability, and won't fire any order events.

Quote:
Originally Posted by Rising_Dusk
Regardless, I stand by what we decided on earlier. If you can prove via testmap that a custom FoD ability is the only way to do this library effectively, then I'll buy into it.

Would a proof that there is no event fired be enough, then?

Last edited by ToukoAozaki : 01-04-2009 at 05:50 AM.
ToukoAozaki is offline   Reply With Quote
Old 01-04-2009, 06:03 AM   #44
DioD
obey
 
DioD's Avatar
 
Join Date: Feb 2006
Posts: 1,532

Submissions (4)

DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)

Send a message via ICQ to DioD
Default

Rising_Dusk
Read my posts, just a time, more - better.

I posted proof screen.

There is proof map.
Attached Files
File Type: w3x InvDetectorDemo.w3x (17.0 KB, 9 views)
DioD is offline   Reply With Quote
Old 01-04-2009, 06:28 AM   #45
ToukoAozaki
extends net.wc3c.Jasser
 
Join Date: Jun 2008
Posts: 336

Submissions (5)

ToukoAozaki will become famous soon enough (60)ToukoAozaki will become famous soon enough (60)ToukoAozaki will become famous soon enough (60)

Send a message via MSN to ToukoAozaki
Default

I have updated the testmap. You can now see every issued order on the screen. :)

You can test it yourself, or see attached screenshot. If checking invulnerability against vulnerable units causes an order to fire, it should be displayed on the screen. You can also compare the result by commenting out PauseUnit calls (doing so will cause the event to fire.).
Attached Images
File Type: jpg proof.jpg (326.7 KB, 16 views)

Last edited by ToukoAozaki : 01-04-2009 at 11:05 AM.
ToukoAozaki 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 01:07 PM.


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