HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Stacking curse spell?

06-09-2008, 08:29 AM#1
HyperActive
Is it possible? If yes, how??

If you didn't get it from the title, what I'm trying to do is to have multiple units with the curse spell (each spell has the same effect just different duration) and when multiple units cast curse on one target it will work as a sinergy, that is the duration will be as long as the combined duration of all curse spells cast.
Anyone understood?
Help please, I've been trying this all night, and all my ideas failed.
06-09-2008, 10:11 AM#2
Themerion
It is possible, but complicated. I think it's certainly not possible in GUI/triggers (requires scripting).

The way I would do it:

- Set the duration of all curse spells to 9999 seconds.
- Script all curse spells so that a timer starts for the unit which the spell is cast on. When the timer elapses, remove the buff.
- If the unit already had a timer/buff, add the new spell's duration to whatever was left of the timer's.
06-09-2008, 10:27 AM#3
HyperActive
Timers?
Could that produce a lag, if too many timers are created?
06-09-2008, 10:44 AM#4
Seneroth
I think i got a somewhat solution for your problem.
You can use the ability "Critical Strike" and set the "Damage Multiplier" field to a negative value by using shift.
Though it doesnt show a "Miss" text when it hits but you can add that with a floating text.
And stacking this ability wouldnt be that hard, and to prevent the ability being show use a spellbook and disable it.
Then you can happily increase the level each time a unit is under the cast.

That would be possible in Gui also :)
06-09-2008, 10:47 AM#5
Themerion
Not very likely, unless you have a lot of units cursed at the same time (50+).

Well, it might be a better idea to use just a single timer, and countdown integers for each unit.

EDIT:By the way, do you happen to have JassNewGenPack installed?
If not, then are you using the units' Custom Values for anything?
06-09-2008, 02:11 PM#6
Anitarf
You could just use my ABuff system to do all this for you.

...well, almost all of this. It sure makes coding this sort of spell a piece of cake.
06-10-2008, 03:52 AM#7
bountygiver
I've made a multi-leveled dummy ability to keep track of the current number of stacks on the target unit.

There are better ways, such as struts, but I'm still using a stock World Editor.

Hope this will be useful.

Try playing my map and look for some of the spells there. They are based on the same system:
Harpy Queen: Disintegrating Strike
Troll Headhunter: Blood Surge
War Druid: Crushing Claws

PS: Remember to remove the dummy ability from the unit as soon as the buff disappears/unit dies.
06-10-2008, 08:25 AM#8
HyperActive
Thank you all. I'm currently trying to figure out how vJass works, since I know a thing or two in jass.

@Anitarf: That's some wicked system, can't believe I've overseen it.
@bountygiver: Interesting map you've got there.