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 04-07-2008, 12:35 PM   #1
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 Spear of Longinus

NOTE: You have been redirected in order for our attachments to be made available to you. This will only last two minutes; these measures where taken to avoid hotlinking and bandwidth theft.
To avoid these restrictions Log in or Register

Ok, submission time....

The Spear of Longinus
By moyack


Zoom (requires log in)Requires JASS NEW GEN pack 5B or up. Totally MUI, and made with vJASS.

Spell type: Passive (buff dependant)

Description: The Spear of Longinus is known for being a weapon blessed by the Gods, giving to its owner astonishing strength and deadly results. Every time the owner of this mighty spear attacks, it has a chance to deal additional damage to the target unit, impaling them and throwing away a long distance.

Additionally if there are units behind them, this spear will impale them with the target unit.

  • Level 1: low chance to cast the ability, up to 3 units impaled, deals 100 damage to each impaled unit, consumes 10 mana.

  • Level 2: medium chance to cast the ability, up to 4 units impaled, deals 150 damage to each impaled unit, consumes 8 mana.

  • Level 3: high chance to cast the ability, up to 5 units impaled, deals 200 damage to each impaled unit, consumes 6 mana.

Changelog

6/03/2008: First release
7/03/2008: Added triggered cooldown so the user can't abuse of stop/attack and fixed the flying height setting in the custom missile.
7/04/2008: Fixed some minor stuff and added Berserker Strength ability, which is basically the Spear of Longinus, but on an active ability.
27/04/2008: Version 1.2. Now it requires JNGP 5a or up to work properly. Fixed (hopefully) the cooldown system.
06/05/2008: More improvements... now the cooldown and the data structs don't do a search looping when they destroy a data.
05/05/2009: Fixed a double free issue, and code improved (thanks to Zaraf for find the bug).


Expand Current code:

Comments, suggestions are always welcome...
Attached Images
File Type: jpg Clip_9.jpg (68.5 KB, 2232 views)
Attached Files
File Type: w3x Longinus Spear.w3x (32.6 KB, 609 views)

Last edited by moyack : 05-06-2009 at 03:34 AM.
moyack is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 04-07-2008, 01:47 PM   #2
Alexander244
Now Kharyb
 
Join Date: Feb 2006
Posts: 602

Submissions (1)

Alexander244 is a jewel in the rough (193)Alexander244 is a jewel in the rough (193)Alexander244 is a jewel in the rough (193)

Default

I really enjoy spells which reward microing your hero, and this provided that in plenty.

Quick Feedback/Suggestions:
  • Sometimes if you are in very close melee with the target (you need to walk right up to them, closer than melee attack range) the spear misses them.

  • On effect you could add an item orb ability that changes missile art to nothing, so you don't sometimes get a double spear throw. Then remove it on attacks where no effect occurs.
    You might even be able to use damage detection using this method and changing the missile art to the longinus spear, then only create the projectile on damage, which would look and work a lot better than the current method.

  • Because the ability costs mana, wouldn't it make sense for it to be toggleable on & off?
    You could make it an arrow ability, or, if you want to leave it as a passive, do something similar to immolation.

  • onDestroy should be private
Alexander244 is offline   Reply With Quote
Old 04-07-2008, 05:39 PM   #3
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 Alexander244
I really enjoy spells which reward microing your hero, and this provided that in plenty.

Quick Feedback/Suggestions:
Sometimes if you are in very close melee with the target (you need to walk right up to them, closer than melee attack range) the spear misses them.
Hmm.... I'll check it out this night.


Quote:
On effect you could add an item orb ability that changes missile art to nothing, so you don't sometimes get a double spear throw. Then remove it on attacks where no effect occurs.
Actually a very good idea, I hadn't thought that solution :) I'll apply it this night too.

Quote:
You might even be able to use damage detection using this method and changing the missile art to the longinus spear, then only create the projectile on damage, which would look and work a lot better than the current method.
Well, I did it in this way in order to give the idea that the caster takes the spear and throws it to the enemy, so the attack event is the most accurate of all. Anyways, I'll check the orb effect and test how it looks, and, according to that I'd change the spell in concordance.


Quote:
Because the ability costs mana, wouldn't it make sense for it to be toggleable on & off?
You could make it an arrow ability, or, if you want to leave it as a passive, do something similar to immolation.
This spell requires mainly a buff to work, so any spell that left a buff in the caster can be perfectly used. For example, create a custom ability based on Berserk or immolation, set the chance to 100%, mana cost = 0 and set the buff in the spell, and voila!! an active spell.


Quote:
onDestroy should be private
hmmm.... yes, why not.
moyack is offline   Reply With Quote
Old 04-07-2008, 07:02 PM   #4
Salbrismind
User
 
Salbrismind's Avatar
 
Join Date: Aug 2007
Posts: 609

Salbrismind is on a distinguished road (16)

Send a message via Yahoo to Salbrismind
Default

I love this spell idea and I really want to use this in my map! All credit for it will go to you of course!
__________________
Salbrismind is offline   Reply With Quote
Old 04-07-2008, 08:27 PM   #5
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:
Originally Posted by moyack
*I'll post the code when I get home...*
*Waits patiently because he doesn't have access to WE at work and isn't motivated enough to download and extract the testmap's .j file*
__________________
Rising_Dusk is offline   Reply With Quote
Old 04-07-2008, 10:51 PM   #6
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 cringed when I saw "The Spear of Longinus" (it's Lance), but that's only a minor detail.

... but just curious, what's the difference between vJass and Jass New Gen? I've been isolated from the whole coding concept for a while (and so I've regressed into GUI... but hoping to go back to JASS soon enough).

On the spell's notes, I found it was a lot of fun to play with, unique and I can see so many things this could be used as a base for.
__________________
Before asking for help with triggers... read this and check your trigger!

If you're having troubles getting help on WC3C or anywhere at all, please have a look at...
The WRONG way to ask for help and The CORRECT way to ask for help.

Quote:
Originally Posted by Alevice
You may never stop our bioweapon! We mexicans shall rule the third world! Mwahahahahahahaha!
Please acknowledge that I use Mac and avoid suggesting vJass and other tools that don't work on it. Thank you.
Tide-Arc Ephemera is offline   Reply With Quote
Old 04-07-2008, 10:54 PM   #7
darkwulfv
Alpha Male of Wc3c
 
darkwulfv's Avatar


Official Map Reviewer
 
Join Date: Mar 2006
Posts: 3,646

Submissions (6)

darkwulfv is just really nice (270)darkwulfv is just really nice (270)

Send a message via AIM to darkwulfv
Default

Jass New Gen is the pack name. vJASS is the extended language.

On-Topic: Spell looks really cool. Well done.
__________________
The Spell Request Thread
Quote:
Originally Posted by Joe-Black-5
a dota like map but with unique stuff
(There was no map attached, and that was all the thread said.)
Spells I've Made

Darkwulfv's Lightning Grapple || Tritanis' Lazy Bolt


Last edited by darkwulfv : 04-07-2008 at 10:54 PM.
darkwulfv is offline   Reply With Quote
Old 04-07-2008, 10:54 PM   #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:
Originally Posted by Tide-Arc-Ephemera
... but just curious, what's the difference between vJass and Jass New Gen? I've been isolated from the whole coding concept for a while (and so I've regressed into GUI... but hoping to go back to JASS soon enough).
vJass is a syntactical add-on to typical WC3 jass, allowing many new and awesome things. Jass NewGen Pack is the pack that it comes bundled in (Alongside PJASS, grimoire, TESH, etc).
__________________
Rising_Dusk is offline   Reply With Quote
Old 04-07-2008, 11:07 PM   #9
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

Hm, I see. Would I still be able to use this spell without New Gen?
__________________
Before asking for help with triggers... read this and check your trigger!

If you're having troubles getting help on WC3C or anywhere at all, please have a look at...
The WRONG way to ask for help and The CORRECT way to ask for help.

Quote:
Originally Posted by Alevice
You may never stop our bioweapon! We mexicans shall rule the third world! Mwahahahahahahaha!
Please acknowledge that I use Mac and avoid suggesting vJass and other tools that don't work on it. Thank you.
Tide-Arc Ephemera is offline   Reply With Quote
Old 04-07-2008, 11:17 PM   #10
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

If you could compile vJass in another way, sure, but JNGP is the cleanest, easiest, and furthest removed from hacking WE (again) way to do it.
__________________
Rising_Dusk is offline   Reply With Quote
Old 04-08-2008, 02:17 AM   #11
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, updated the code and I've added other spell: Berserker Strength, which is the same code, but using an active ability based on Berserk. The purpose is to show how easy is to transform this ability into an active or toggleable one.

To be honest I couldn't try the option of removing the missile with a dummy orb ability. I've been so busy right now, and hardly I could post the code with some minor stuff.
moyack is offline   Reply With Quote
Old 04-09-2008, 01:25 AM   #12
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

I have a feeling that your private constant functions will not compile correctly when inlined using Vex's optimizer. Just a heads up, since it's going to try to move that level argument into the actual function where it doesn't exist. I haven't the motivation right now to delve through it all in depth, but I'll get around to it soon. Promise! <3
__________________
Rising_Dusk is offline   Reply With Quote
Old 04-10-2008, 03:22 PM   #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

What options are you using for optimization?? I'll try to check it this night.... if my energies allow me to do it.
moyack is offline   Reply With Quote
Old 04-10-2008, 05:29 PM   #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

I didn't actually try it, but if my memory serves me correctly, constant functions and variables are inlined. If you have a constant function that is supposed to be changed, it would make sense for it to not work. I may be wrong though, but that's just what it seems like to me.
__________________
Rising_Dusk is offline   Reply With Quote
Old 04-13-2008, 04:13 PM   #15
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

The constants are fine in this case. *checks map*

Try not to create objects during global declarations. It is not necessary for approval or anything but I advice agains it.

The spell needs fixing, the concept is nice but it is right now lacking in looks, the knockback + spear movement looks unrealistic. You should change your knockback so it doesn't just move the unit in the same direction as the spear, think of what happens to a potato bag when you try to push it in a straight line for long time, it will not obey you.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian 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 05:16 AM.


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