HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Magic Corruption

07-13-2006, 08:34 PM#1
emjlr3
A little simple ability I made for a recent spell contest.

Magic Corruption

Whenever a nearby enemy under the aura casts a spell a deathly magic is invoked upon the caster, slowing by 20% and destroying mana. Slows last 5 seconds and stack up to 60%.

Enjoy!
Attached Images
File type: jpgblah.JPG (322.8 KB)
Attached Files
File type: w3xMagic Corruption.w3x (98.4 KB)
07-14-2006, 12:40 AM#2
masda70
-Maybe change the aura buff name to |cffff0000Magic Corruption|r so it makes it appear as a negative one.

-Shouldn't the following register a death event instead?
Collapse JASS:
                call TriggerRegisterUnitEvent(trig,u,EVENT_UNIT_DAMAGED)    
                call SetTableObject(strig,"ta",TriggerAddAction(trig,function MC_Death))

-And why don't you use bj_lastCreatedUnit instead of bj_ghoul[99] directly in the MC_CreateCaster function to return the caster?
07-14-2006, 11:59 AM#3
emjlr3
good catches, on both accounts, I'll fix that when I get the chance

**updated, I did use JASS Craft and an mpq editor, instead of the WE, which I have never done before, so hopefully all is well
07-14-2006, 09:14 PM#4
PipeDream
- Please use at least 4 characters for the prefix
Collapse JASS:
function MC_Death takes nothing returns nothing
    local trigger trig = GetTriggeringTrigger()
    local string strig = GetAttachmentTable(trig)
    local unit u = GetTriggerUnit()
    local string s = "MC_Slow_"+GetAttachmentTable(u)
    
    call ClearTable(s)
    call TriggerRemoveAction(trig,GetTableTriggerAction(strig,"ta"))
    call ClearTable(strig)
    call DestroyTrigger(trig)
    
    set trig = null
    set u = null    
endfunction
Trigger remove action stops the trigger immediately, so that leaks. One way to fix it is to run the DestroyTrigger delayed in a separate thread.
- How do you install it? Are you sure it's all Vex Caster System? If so that's fine, but if parts of it are things that aren't publicly released, they should be moved to the spell, or a hundred people will ask about syntax problems when they try to install it.
- Please display only one buff. On magic immune golems, probably none should be displayed and no spell effect should occur, unless it's an ultimate. In which case it should have effects.
- you left out a couple constant prefixes
- Typically one can only be in an aura once, which is also the way you're displaying it with a on/off buff. So I would make the loop optional.

Maybe you could make the aura buff optional. I suppose it is at the moment, one would just need to use something other than an aura for the passive, so nevermind.
07-15-2006, 04:28 PM#5
emjlr3
think I fixed the trigger bug

i thought I included how to install

Quote:
Spell Requires: Magic Corruption ability
// Magic Corruption(Dummy) ability
// Magic Corruption buff
// Magic Corruption(Dummy) buff
// Caster Dummy unit
// CSCache System
// Implementation:
// Simply copy the forementioned requirements to your map, go through the
// options below and enjoy!

it requires nothing hidden or anything

the effect i created on magic immunes cuz it not only slows but also lowers mana too, which effects all units

constants updated

made loop optional

btw I did some tests, I do not belive TriggerRemoveAction stops the thread, cuz i have another spell i have been worknig on that does just this, and everything after the removeaction is ran just fine
07-17-2006, 07:21 AM#6
PipeDream
Indeed, you are correct about TRA. It appears to only prevent a thread from awakening from a second sleep. The first can happen at anytime, the second after. I, for one, am infinitely amused.

Collapse JASS:
//******************************************************
//emjlr3's Caster System
//******************************************************
//Author: emjlr3
//Decided to keep track of all the utility functions I make/use to keep my spell making simpler! :)
//******************************************************
Is what worries me about installation. Fortunately it appears you only use one piece, "PreloadAbil", in the spell trigger. Copy that over and you're good to go, although I would like it if someone else commented on the spell first.
07-17-2006, 01:50 PM#7
emjlr3
ill see what I can do, maybe ill just remove that part and leave in the tables
07-17-2006, 02:10 PM#8
Vexorian
I don't think that is grave enough to not approve the spell which is good already, so you should update that but I am approving it anyways
03-19-2007, 09:36 AM#9
norava
pretty cool
09-05-2008, 09:56 AM#10
saif3r
Quote:
constant function MagC_Abil takes nothing returns integer
?
09-22-2008, 12:31 AM#11
emjlr3
this was made before vJASS was released