Wc3C.net

Wc3C.net (http://www.wc3c.net/forums.php)
-   vJass Spells (http://www.wc3c.net/forumdisplay.php?f=647)
-   -   Spear of Longinus (http://www.wc3c.net/showthread.php?t=99870)

moyack 04-07-2008 01:35 PM

Spear of Longinus
 
6 Attachment(s)
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...

Alexander244 04-07-2008 02:47 PM

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

moyack 04-07-2008 06:39 PM

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.

Salbrismind 04-07-2008 08:02 PM

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!

Rising_Dusk 04-07-2008 09:27 PM

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*

Tide-Arc Ephemera 04-07-2008 11:51 PM

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.

darkwulfv 04-07-2008 11:54 PM

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

On-Topic: Spell looks really cool. Well done.

Rising_Dusk 04-07-2008 11:54 PM

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).

Tide-Arc Ephemera 04-08-2008 12:07 AM

Hm, I see. Would I still be able to use this spell without New Gen?

Rising_Dusk 04-08-2008 12:17 AM

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.

moyack 04-08-2008 03:17 AM

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.

Rising_Dusk 04-09-2008 02:25 AM

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

moyack 04-10-2008 04:22 PM

What options are you using for optimization?? I'll try to check it this night.... if my energies allow me to do it.

Rising_Dusk 04-10-2008 06:29 PM

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.

Vexorian 04-13-2008 05:13 PM

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.


All times are GMT. The time now is 06:11 PM.

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