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



Reply
 
Thread Tools Search this Thread
Old 07-03-2007, 05:42 PM   #1
Rising_Dusk
Obscurity, the Art


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

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 Bluefire Ward

Zoom (requires log in)
Bluefire Ward
v1.7

Description:
Spell Description:
Bluefire Ward
Range: 500
Cooldown: 2 seconds

Summons an immobile ward that burns the mana of nearby foes per second.
Lasts 8 seconds.

Level 1 - Burns 10 mana per second
Level 2 - Burns 15 mana per second
Level 3 - Burns 20 mana per second

Background:
The spell is made specifically for the Spell Session #8 on wc3c. The spell is fully multi-instanceable and requires vJass. It was based on the idea of creating a ward that interacted with mana by burning it; it sounded cool at the time.

Requirements:Spell Code:
Expand Spell Code:


Change Log:
Quote:
v1.0: Spell created and submitted for critique.
v1.1: Modified spell so lightning originates from tip of wards.
v1.2: Fixed a critical bug in the dummy FoD ability not working on heroes.
v1.3: Fixed a bug caused by leaking dummy units.
v1.4: Virtually recoded the entire spell at Blu's request, uses a scope, private vars, runs all wards through an array, uses only a single dummy unit per ward, and numerous other things that right now I don't remember at all.
v1.5: Fixed something Blu pointed out in the code.
v1.6: Made all scope-specific functions private.
v1.7: Spell updated to follow vJass conventions and be up to speed with proper coding practice.

Special Thanks:
All credits to anything used in the spell are in the testmap, but I'll do it again here. Thanks to Vex for vJass and JESP and thanks to wc3c for another cool contest.

Hope you all like it!
Attached Images
File Type: jpg BluefireWard.JPG (53.8 KB, 2090 views)
Attached Files
File Type: w3x SpellSession8_BluefireWard_v1.7.w3x (53.1 KB, 195 views)
__________________

Last edited by Rising_Dusk : 03-20-2009 at 04:20 AM.
Rising_Dusk is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 07-03-2007, 06:30 PM   #2
Rao Dao Zao
www.raodaozao.net
 
Rao Dao Zao's Avatar


MDL & Resource Moderator
 
Join Date: Aug 2003
Posts: 2,511

Submissions (27)

Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)

Approved Map: When the Freedom Slips Away

Send a message via MSN to Rao Dao Zao
Default

Looks like green lightning to me. :/
__________________
Rao Dao Zao is offline   Reply With Quote
Old 07-03-2007, 06:33 PM   #3
Rising_Dusk
Obscurity, the Art


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

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

Would you rather it spam your screen with little blue "-20"s? :p
Besides, it's just a name.
__________________

Last edited by Rising_Dusk : 07-03-2007 at 06:35 PM.
Rising_Dusk is offline   Reply With Quote
Old 07-03-2007, 10:44 PM   #4
Tide-Arc Ephemera
Overdoses result in death
 
Tide-Arc Ephemera's Avatar
 
Join Date: Jan 2007
Posts: 2,365

Submissions (3)

Tide-Arc Ephemera is a jewel in the rough (206)Tide-Arc Ephemera is a jewel in the rough (206)Tide-Arc Ephemera is a jewel in the rough (206)

Default

I'd rather the lightning be blue so that it matches the name... nice spell though... other than the colour, +Rep
Tide-Arc Ephemera is offline   Reply With Quote
Old 07-03-2007, 11:11 PM   #5
moyack
Evil Emoticon
 
moyack's Avatar


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

Submissions (17)

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

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

Send a message via MSN to moyack
Default

I DEMMAND to change the lightning color to blue, otherwise it will be graveyard'd at once!!!

Just kidding, because I couldn't give my opinion in the contest about your spell, I'll take this opportunity to give a good review. Stay tunned.
moyack is offline   Reply With Quote
Old 07-03-2007, 11:21 PM   #6
erwtenpeller
*****istrator
 
erwtenpeller's Avatar


Art Director
 
Join Date: Nov 2003
Posts: 8,759

Submissions (35)

erwtenpeller has a brilliant future (927)erwtenpeller has a brilliant future (927)erwtenpeller has a brilliant future (927)erwtenpeller has a brilliant future (927)erwtenpeller has a brilliant future (927)erwtenpeller has a brilliant future (927)erwtenpeller has a brilliant future (927)erwtenpeller has a brilliant future (927)

Skinning Contest 7 ~ Were-AnimalsConcept art session 3 - Dungeon

Default

would have been a cooler mechanic if it hurt units casting a spell, like fairy dragons do. Still a verry nice usuable spell though, nothing too fancy. Luv.
__________________
erwtenpeller is offline   Reply With Quote
Old 07-04-2007, 12:45 AM   #7
Tiki
Transform and roll out!
 
Tiki's Avatar


Respected User
 
Join Date: Dec 2002
Posts: 2,901

Submissions (11)

Tiki is a jewel in the rough (244)Tiki is a jewel in the rough (244)Tiki is a jewel in the rough (244)Tiki is a jewel in the rough (244)Tiki is a jewel in the rough (244)

AI tournament - 3rd place

Default

The ward is blue and on fire, not the lightning... think.
__________________

www.sc2armory.com - Join our forums and community.
Latest and most up to date information about starcraft II.
Tiki is offline   Reply With Quote
Old 07-04-2007, 01:17 AM   #8
Rising_Dusk
Obscurity, the Art


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

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:
would have been a cooler mechanic if it hurt units casting a spell, like fairy dragons do.
That would be just as easy to do; as a matter of fact I may make that now. :p
__________________
Rising_Dusk is offline   Reply With Quote
Old 07-07-2007, 05:00 PM   #10
xombie
Banned
 
Join Date: Oct 2006
Posts: 858

xombie has a spectacular aura about (79)xombie has a spectacular aura about (79)xombie has a spectacular aura about (79)

Default

Quote:
Originally Posted by Tiki
The ward is blue and on fire, not the lightning... think.
Could you please point out to me where you are seeing fire?
xombie is offline   Reply With Quote
Old 07-07-2007, 11:36 PM   #11
Freakazoid
I love you all.
 
Freakazoid's Avatar
 
Join Date: May 2003
Posts: 1,915

Submissions (14)

Freakazoid is a jewel in the rough (159)Freakazoid is a jewel in the rough (159)

Default

Quote:
Originally Posted by erwtenpeller
would have been a cooler mechanic if it hurt units casting a spell, like fairy dragons do. Still a verry nice usuable spell though, nothing too fancy. Luv.

Yea, It is easier, and it's in Dota :P
__________________
Freakazoid is offline   Reply With Quote
Old 07-08-2007, 12:18 AM   #12
xombie
Banned
 
Join Date: Oct 2006
Posts: 858

xombie has a spectacular aura about (79)xombie has a spectacular aura about (79)xombie has a spectacular aura about (79)

Default

Why not a manaburn that triggers when a unit is casting a spell - like a 250 manaburn when an enemy unit casts a spell. Manaflare (which is what the Faerie's have) actually doesn't burn any mana, it merely damages a unit based on the cost of a spell.
xombie is offline   Reply With Quote
Old 07-12-2007, 02:47 AM   #13
moyack
Evil Emoticon
 
moyack's Avatar


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

Submissions (17)

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

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

Send a message via MSN to moyack
Default

Ok Dusk, here's my review:

First of all I did some modifications to your demo map in order to give a full test.
  • First I've added a copy of the Shadow hunter but owned by a computer player and some whitch Doctors. When I tested my shadow hunter, the ward doesn't hurt in any way the enemy hero, is the spell designed to only affect normal units?? I didn't see anything like isUnitType(u, UNIT_TYPE_HERO) == false

  • Probably you are asking "why the hell moayck added a computer player??" because I had a bad feeling about the global timer that you use in your spell. After the addition of the Computer player, I could see that your spell is not MUI, attached in the replay you will see that some lightnings begin to appear randomly in the map. Please check that.

  • Because your spell requires New Gen Pack, why not become your spell a library?? take advantage of vJASS features, implement a struct to control the ward and ensure the MUI in an easier and efficient way :)

  • If you check the modified demo map, you will see this trigger:
    Collapse Order to all the units owned by player 3 (teal) to attack a random point:
    library TestTriggerTwo
    
    globals
        private boolexpr b
    endglobals
    
    private function GetUnitPlayers takes nothing returns boolean
        return GetOwningPlayer(GetFilterUnit()) == Player(2)
    endfunction
    
    function Trig_Untitled_Trigger_002_Actions takes nothing returns nothing
        local group g = CreateGroup()
        call GroupEnumUnitsOfPlayer(g, Player(2), b)
        call GroupPointOrder(g, "attack", GetRandomReal(-3100., 3100), GetRandomReal(-2400., 2400.))
        call DestroyGroup(g)
        set g = null
    endfunction
    
    //===========================================================================
    function InitTrig_Untitled_Trigger_002 takes nothing returns nothing
        set gg_trg_Untitled_Trigger_002 = CreateTrigger(  )
        call TriggerRegisterTimerEventPeriodic( gg_trg_Untitled_Trigger_002, GetRandomReal(10.00, 20.00) )
        call TriggerAddAction( gg_trg_Untitled_Trigger_002, function Trig_Untitled_Trigger_002_Actions )
        set b = Condition(function GetUnitPlayers)
    endfunction
    
    endlibrary

    As you can see, I declare the boolexpr and I don't destroy it, why?? becasue it's constant, it doesn't matter if you create and destroy the boolExpr, it will point always to the same handle (I learned this beautiful feature here). You can add this feature in your spell, by assigning the required boolexprs to your spell and leave them in the global section as a private variable which you can access when you need it.

I'll be pending for the bug fixes.
Attached Files
File Type: w3g LastReplay.w3g (11.7 KB, 19 views)
File Type: w3x SpellSession8_BluefireWard_v1.1.w3x (50.7 KB, 16 views)

Last edited by moyack : 07-12-2007 at 02:50 AM.
moyack is offline   Reply With Quote
Old 07-12-2007, 03:38 AM   #14
Rising_Dusk
Obscurity, the Art


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

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

Destroying boolexprs isn't bad practice though.
The same reason I clear groups before I destroy them, it's safe practice.
That's how I code.

Quote:
Because your spell requires New Gen Pack, why not become your spell a library?? take advantage of vJASS features, implement a struct to control the ward and ensure the MUI in an easier and efficient way :)
Because all that mumbo jumbo really isn't necessary.
If there's an issue with the MUI, I must have merely overlooked something.
I'll look into it though, thanks for the replay.

EDIT:
And actually, my method is as efficient as possible, structs here would be overkill.
I run all castings of the spell for all players on a single timer.
It's about as good as it gets.

EDIT AGAIN:
The spell indeed correctly works against heroes.
The dummy FoD spell was set to be unable to target heroes though, which is the problem.
If you pay close enough attention, it still burns mana correctly.

And your replay shows nothing wrong with the MUI when I tried it.
And I just tested it again, nothing seems to be going wrong.
Could you elaborate upon the EXACT conditions that caused it to not be MUI?

LAST EDIT:
Just editted your testmap to include the very minor fix to make the dummy ability castable on anything.
It uh, works perfectly as far as I can tell now.
Your random bolts must have been the dummy units having a fit from being unable to cast on heroes.
Attached it too.
Attached Files
File Type: w3x SpellSession8_BluefireWard_v1.1MOY.w3x (50.7 KB, 13 views)
__________________

Last edited by Rising_Dusk : 07-12-2007 at 03:54 AM.
Rising_Dusk is offline   Reply With Quote
Old 07-12-2007, 10:57 AM   #15
moyack
Evil Emoticon
 
moyack's Avatar


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

Submissions (17)

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

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

Send a message via MSN to moyack
Default

Quote:
Originally Posted by Rising_Dusk
Destroying boolexprs isn't bad practice though.
The same reason I clear groups before I destroy them, it's safe practice.
That's how I code.
Group destruction is necessary because unit groups ca be different over time, but Boolexpr doesn't change at all, is a variable which serves as a filter. The thing that I'm proposing your is to give to the boolexprs the same approach that you gave to the timer. It's up to you.

Quote:
EDIT AGAIN:
The spell indeed correctly works against heroes.
The dummy FoD spell was set to be unable to target heroes though, which is the problem.
If you pay close enough attention, it still burns mana correctly.

And your replay shows nothing wrong with the MUI when I tried it.
And I just tested it again, nothing seems to be going wrong.
Could you elaborate upon the EXACT conditions that caused it to not be MUI?
Hmmm....... yes you're right, the problem is not with MUI, it was the spell limitation. but that restriction definitely is generating some issues,
Quote:
Just editted your testmap to include the very minor fix to make the dummy ability castable on anything.
so this has to be fixed in the main test map too.

One more minor thing (optional): You use the BJ variable bj_ghoul[99], you can use this one instead bj_meleeNearestMine this one is only used at map initialization in melee maps and no more.

Quote:
LAST EDIT:
Just editted your testmap to include the very minor fix to make the dummy ability castable on anything.
It uh, works perfectly as far as I can tell now.
Your random bolts must have been the dummy units having a fit from being unable to cast on heroes.
Attached it too.
I'll check it this night, but I'm sure that the spell bug is caused for this issue. If gets solved, I'll approve it.

Last edited by moyack : 07-12-2007 at 02:21 PM.
moyack 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:25 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

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