Included:Disintegrate (FocusMagic) Like a lightning effect with collisionSwap (SwapArrow)FireOrb (ArcaneArrow) These last two are basically just xecollider samples.

Yeah these are just the hero contest spells, but packed in their own spell map without Mc!'s art, so I can update them with bug fixes. Disintegrate and FireOrb actually got updated and got more features than the ones in the hero contest submission... These things don't really look that well without Mc!'s art though.

Disintegrate was a fun spell to code, and yes it was inspired by a d3 video...

Edit: updated to fix bug with FireOrb

FocusMagic:

libraryFocusMagicinitializerinitrequiresxebasic, xedamage, xefx, Table//**************************************************************************************//* FocusMagic//* ------------//* Author: Vexorian.//* Requirements://* - xebasic, xedamage, xefx//* - The Table library//* - A triggerer ability, with a point target. An example would be//* the FocusMagic ability you can find in this map's object editor.//*//* Notes: - The base ability's lightning effect field determines the lightning to use.//* - The base ability's area effect field determines the effect to use at the//* end of the laser.//* - The base ability's target effect field determines the target effect.//* //*************************************************************************************//==================================================================================// Config:////globalsprivateconstantintegerSPELL_ID ='A00B'//The triggerer spell id.privateconstantintegerMAX_SPELL_LEVELS = 3privateconstantrealLASER_HEIGHT = 80.0privateconstantrealEND_FX_HEIGHT = 80.0privateconstantrealEND_FX_SCALE = 2.0privateconstantrealLASER_START_OFFSET = 20.0privateconstantstringATTACH_POINT_TARGET = "chest"privateconstantbooleanPSEUDO_EXPLODE = true//This adds a cute FX on unit deathendglobals////// Some config functions:// -// radius: the collision size of the beam (See bellow for an explanation:)// damagePerSecond: dps?// manaDrainPerSecond: Every second, the casting unit will lose a total of manaDrainPerSecond// requiredMana: The spell is stopped once the unit reaches less than requiredMana.//privatefunctionradiustakesreallevelreturnsrealreturnlevel*0.0 + 35.0endfunctionprivatefunctiondamagePerSecondtakesreallevelreturnsrealreturn45.0 + level*22.5endfunctionprivatefunctionmanaDrainPerSecondtakesreallevelreturnsrealreturn3.0 + level*0.0endfunctionprivatefunctionrequiredManatakesreallevelreturnsrealreturn25.0 + level*0.0endfunctionprivatefunctionconfigDamagetakesintegerlevel, xedamagedreturnsnothing//Read xedamage's documentation to know how to configure this.//does not support damagetrees//setd.damageAllies = true//True if you want it to hurt allies.setd.damageSelf = falsesetd.atype = ATTACK_TYPE_NORMAL// NORMAL (spell) attacktypesetd.exception = UNIT_TYPE_FLYING// Don't hit flierssetd.dtype = DAMAGE_TYPE_LIGHTNING// LIGHTNING (magical) damage,calld.factor(UNIT_TYPE_STRUCTURE, 0.33) // does 1/3 damage to buildings.endfunction//Some tweaks that are more advanced:globalsprivaterealTIMER_PERIOD = 0.1//The timer's period of time, seems 0.1 is fineprivaterealTARGET_FX_PERIOD = 0.25//Every TARGET_FX_PERIOD a special effect is played on currently affected targets.privaterealBEGINNING_DURATION = 1.0//This is an initial time in which requiredMana is ignored.endglobals//// The spell is based on a shape that's like the integral of a circle:// ,---------------------. ,// ( ) | radius// `---------------------' `// |<->| Units which collision circles intersect with this figure are affected by the spell.// ^radius // //===============================================================================// The code. ////// In my opinion, this is the best spell I made, well, just because I am a geometry fan (when it works correctly)// Anyway, as you can see, I added collision to a lightning effect, this laser beam will consider unit collision// sizes and all. Not to mention the custom art...//// I consider the lightning effect to be a line segment, for each unit in the vecinity, I get the closest point// inside this segment, for that I did a derivative to find a formula that you can see in unitInRectEnum,// once we have this point... just check if the unit is in range to that point, and done! The rest are just// smoke and mirrors, that's right, eye candy got complicated to make in this one, it is silly I needed GetLocationZ// to make the lightning effect look well. Notice that since the return value of GetLocationZ is not used for things// that affect the gameplay, it shouldn't desync if there are local terrain deformations.//// And yes, I am using a HandleTable for the end spell effect, just remember, that this is one of those cases in// which this is perfectly safe, yes, IT IS. Kidnapping custom values was not necessary. No, it wasn't.// (The stop event will never fire for a unit if the start event has not fired for it yet) and stop fires// when you remove the unit)////globalsprivategroupenumgroupprivaterectenumrectprivatexedamagearraydamageconfprivateHandleTableunitsInstanceprivatelocationzlocendglobalsprivatefunctionGetZtakesrealx, realyreturnsrealcallMoveLocation(zloc,x,y)
returnGetLocationZ(zloc)
endfunctionprivatestructinstanceunituintegerlevelrealx2realy2lightninglibooleanend = falserealacum = 0.0realelapsed=0.0xefxfxstaticinstancecurrentstaticmethodunitInRectEnumtakesnothingreturnsbooleanlocalinstancethis=.currentlocalunitu=this.ulocalunitt=GetFilterUnit()
localrealx1=GetUnitX(u)
localrealy1=GetUnitY(u)
localrealx2=this.x2localrealy2=this.y2localreala=x2-x1localrealb=y2-y1localrealcxlocalrealcylocalreals=(a*( GetUnitX(t) -x1)+b*( GetUnitY(t)-y1))/(a*a+b*b)
localrealfcif(s<0) thensets=0.0elseif(s>1) thensets=1.0endifsetcx=x1+s*asetcy=y1+s*bifIsUnitInRangeXY(t, cx, cy, radius(this.level) ) thenifdamageconf[this.level].damageTarget(u,t, damagePerSecond(this.level)*TIMER_PERIOD ) thenif(PSEUDO_EXPLODEand (GetWidgetLife(t)<=0.405) ) then//call ShowUnit(t,false)callDestroyEffect( AddSpellEffectTargetById(GetUnitTypeId(t), EFFECT_TYPE_SPECIAL, t, "origin" ) )
endifif(this.acum == 0.0) thencallDestroyEffect( AddSpellEffectTargetById(SPELL_ID,EFFECT_TYPE_TARGET, t, "origin" ) )
endifendifendifsetu=nullsett=nullreturnfalseendmethodmethodprocesstakesnothingreturnsbooleanlocalrealalocalrealx1localrealy1localrealx2localrealy2if(.end) thenreturnfalseendifseta=GetUnitState(this.u, UNIT_STATE_MANA)
if (a < requiredMana(this.level) ) and (this.elapsed>=BEGINNING_DURATION) thencallPauseUnit(this.u, true)
callIssueImmediateOrder(this.u, "stop")
callPauseUnit(this.u, false)
endifcallSetUnitState(this.u, UNIT_STATE_MANA, a- this.level * manaDrainPerSecond(this.level)* TIMER_PERIOD )
setx1=GetUnitX(this.u)
sety1=GetUnitY(this.u)
setx2=this.x2sety2=this.y2seta=Atan2(y2-y1,x2-x1)
setx1=x1+LASER_START_OFFSET*Cos(a)
sety1=y1+LASER_START_OFFSET*Sin(a)
seta=XE_MAX_COLLISION_SIZE + radius(this.level)
callMoveLightningEx(this.li, false, x1,y1,GetZ(x1,y1)+LASER_HEIGHT, x2,y2,GetZ(x2,y2)+LASER_HEIGHT)
//set the rect: (painful stuff, yes)if(x1 < x2) thenif( y1 < y2) thencallSetRect(enumrect, x1-a,y1-a,x2+a,y2+a)
elsecallSetRect(enumrect, x1-a,y2-a,x2+a,y1+a)
endifelseif( y1 < y2) thencallSetRect(enumrect, x2-a,y1-a,x1+a,y2+a)
elsecallSetRect(enumrect, x2-a,y2-a,x1+a,y1+a)
endifendifset.current = thiscallGroupEnumUnitsInRect(enumgroup, enumrect, Condition(functioninstance.unitInRectEnum) )
set.acum=.acum+TIMER_PERIODset.elapsed=.elapsed + TIMER_PERIODif(.acum>= TARGET_FX_PERIOD) thenset.acum=0.0endifreturntrueendmethodmethodonDestroytakesnothingreturnsnothingcallDestroyLightning(this.li)
callunitsInstance.flush(this.u)
callthis.fx.destroy()
endmethodendstructglobalsprivateinstancearrayVprivateintegerN=0privatetimerTendglobalsprivatefunctioncontroltakesnothingreturnsnothinglocalintegeri=N-1loopexitwhen (i<0)
if ( notV[i].process()) thencallV[i].destroy()
setN=N-1setV[i]=V[N]
endifseti=i-1endloopif(N==0) thencallPauseTimer(T)
endifendfunctionprivatefunctiononSpellEffecttakesnothingreturnsnothinglocallocationloc =GetSpellTargetLoc()
localunitu=GetTriggerUnit()
localinstanceins = instance.create()
if (N==0) thencallTimerStart(T, TIMER_PERIOD, true, functioncontrol )
endifsetu:unitsInstance = integer(ins)
setV[N]=inssetN=N+1setins.u=usetins.x2=GetLocationX(loc)
setins.y2=GetLocationY(loc)
setins.level = GetUnitAbilityLevel(u, SPELL_ID)
setins.fx=xefx.create(ins.x2, ins.y2, 0)
setins.fx.z=END_FX_HEIGHTsetins.fx.scale = END_FX_SCALEsetins.fx.fxpath=GetAbilityEffectById(SPELL_ID, EFFECT_TYPE_AREA_EFFECT, 0)
setins.li = AddLightningEx( GetAbilityEffectById(SPELL_ID, EFFECT_TYPE_LIGHTNING, 0) ,false, GetUnitX(u), GetUnitY(u), GetZ(GetUnitX(u),GetUnitY(u))+LASER_HEIGHT, ins.x2, ins.y2, GetZ(ins.x2,ins.y2)+LASER_HEIGHT )
callRemoveLocation(loc)
setu=nullsetloc=nullendfunctionprivatefunctiononSpellEndtakesnothingreturnsnothing//I love this: setinstance(GetTriggerUnit():unitsInstance).end= trueendfunctionprivatefunctionspellIdMatchtakesnothingreturnsbooleanreturn (SPELL_ID==GetSpellAbilityId())
endfunction//=====================================================================================================// Init stuff://privatefunctioninittakesnothingreturnsnothinglocaltriggert=CreateTrigger()
localintegerilocalintegerjsetzloc=Location(0,0)
setenumrect = Rect(0,0,0,0)
setunitsInstance = HandleTable.create()
setenumgroup=CreateGroup()
setT=CreateTimer()
callTriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
callTriggerAddCondition(t, Condition(functionspellIdMatch))
callTriggerAddAction(t, functiononSpellEffect)
sett=CreateTrigger()
callTriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_ENDCAST)
callTriggerAddCondition(t, Condition(functionspellIdMatch))
callTriggerAddAction(t, functiononSpellEnd)
seti=1loopexitwhen (i>MAX_SPELL_LEVELS)
setdamageconf[i]=xedamage.create()
callconfigDamage(i, damageconf[i] )
seti=i+1endloopsett=nullendfunctionendlibrary

ima take a look at this and compare it to what i did when i made it for our D3 map - see if i can get any pointers (MC!s are does make it looks distinctly better, I only wish he could have made the lightning effect less lightningy and more lasery/lavay/more like a dense,viscous liquid)

That's so lame, I should really make my build scripts use --debug by default unless it is the release...

It is inspired by the trailer but I do not intend to reproduce it 100% , I actually like the red lightning stuff and I already made swinging before when making lightning inferno and the other freezing spell, it is cool for demonstrations but it doesn't have a huge gameplay value due to wc3's controls, besides of overcomplicating the code...