This was my submission to the Spell Olympics last year, I figure it's about time I submitted it. The pack consists of seven spells, for their descriptions read the documentation included with their code or download the testmap and try them out.

scopeGlacialWallinitializerInit//*****************************************************************//* spell - Glacial Wall//*//* written by: Anitarf//* requires: -xebasic//* -xepreload//* -TimerUtils//* -LineSegment//* -ABuff//*//* -a point target triggerer ability//* -a unit to be used as the wall//* -a chaos ability that makes the wall unit//* -a self-targetting aura for displaying the buff//* -a buff that gets displayed by the aura//*//* description: Creates a wall of ice at a target point that//* is perpendicular to the facing of the caster.//* Enemy units approaching the wall will be slowed//* for a short duration.//*//* technical: The unit used to make the wall may be created at//* an offset from the intended point due to pathing.//* For that reason, the unit gets forcefuly moved to//* the intended position after it is created; for that//* to work, the unit must have a movement speed. Since//* it has a movement speed, players can order it to//* move. In order to prevent players from doing that,//* it must be made unselectable, but if we use locust//* to do that then the unit will no longer be treated//* as an obstacle. Luckily, a trick exists that allows//* locusted units to still be treated as obstacles//* (and also be attacked), it works by adding locust//* to a unit after it has been transformed with a//* chaos ability, this spell uses this trick.//*//*****************************************************************globals//Spell settingsprivateconstantintegerSPELL_ABILITY = 'A004'//the spell abilityprivateconstantrealSPELL_PERIOD = 0.5//how often is wall's buff applied on nearby unitsprivateconstantintegerCHAOS_ABILITY = 'S000'//the chaos transform ability that makes wall unitsprivateconstantintegerBUFF_ABILITY = 'A005'//the self-targetting aura that displays the buff and slows unitsprivateconstantintegerBUFF_BUFF = 'Bfro'//the buff applied by the self-targetting aura//Visual settingsprivateconstantrealWALL_UNIT_MAX_OFFSET = 48.0//adds a bit of randomness to wall unit placementprivateconstantbooleanWALL_UNIT_RANDOM_FACING = true//if true, will choose a random facing angle for wall unitsprivateconstantrealWALL_UNIT_FACING = 0.0//the facing of wall units relative to the caster's (in degrees)endglobals//spell statsprivateconstantfunctionWallDurationtakesintegerlevelreturnsrealreturn3.0+3.0*level//how long the wall lasts; should be longer than the time it takes to spawn all the wall unitsendfunctionprivateconstantfunctionWallLengthtakesintegerlevelreturnsrealreturn250.0+level*250.0//the distance between the two farthest wall unitsendfunctionprivateconstantfunctionWallUnitIntervaltakesintegerlevelreturnsrealreturn0.1//the time between wall units being createdendfunctionprivateconstantfunctionWallUnitCounttakesintegerlevelreturnsintegerreturn5+4*level//number of units per wall, must be more than 1endfunctionprivatefunctionBuffTargetstakesunitinRange, playerwallOwnerreturnsbooleanreturnnot(IsUnitType(inRange, UNIT_TYPE_FLYING)) andIsUnitEnemy(inRange, wallOwner) andGetWidgetLife(inRange)>0.405//units affected by the buffendfunctionprivateconstantfunctionBuffApplyRadiustakesintegerlevelreturnsrealreturn128.0//the distance from the wall at which the buff is appliedendfunctionprivateconstantfunctionBuffDurationtakesintegerlevelreturnsrealreturn3.0//the duration of the buffendfunction// END OF CALIBRATION SECTION// ================================================================privatekeywordinstanceglobalsprivateaBuffTypeabtprivatetimerslowprivateinstancearrayinstancesprivateintegerinstanceCount = 0privategrouptempg = CreateGroup()
privateboolexprtempbxprivateinstancetempsiendglobals//Applying the wall buffprivatefunctionTargetstakesnothingreturnsbooleanreturnBuffTargets(GetFilterUnit(), tempsi.owner)
endfunctionprivatefunctionPeriodictakesnothingreturnsnothinglocalintegeri=0localrealrlocalunituloopexitwheni>=instanceCountsettempsi = instances[i]
setr = tempsi.segments/2.0callGroupEnumUnitsInRangeOfSeg(tempg, tempsi.x-tempsi.dx*r,tempsi.y-tempsi.dy*r, tempsi.x+tempsi.dx*r,tempsi.y+tempsi.dy*r, BuffApplyRadius(tempsi.level), tempbx)
loopsetu=FirstOfGroup(tempg)
exitwhenu==nullcallABuffApply(abt, u, tempsi.caster, BuffDuration(tempsi.level), tempsi.level, 0 )
callGroupRemoveUnit(tempg, u)
endloopseti=i+1endloopendfunction// ================================================================//ABuff functionsprivatefunctionCreatetakesaBuffeventBuffreturnsnothingcallUnitAddAbility(eventBuff.target.u, BUFF_ABILITY)
callSetUnitAbilityLevel(eventBuff.target.u, BUFF_ABILITY, eventBuff.level)
callUnitMakeAbilityPermanent(eventBuff.target.u, true, BUFF_ABILITY) //prevent morphing from removing the abilityendfunctionprivatefunctionRefreshtakesaBuffeventBuffreturnsnothingcallSetUnitAbilityLevel(eventBuff.target.u, BUFF_ABILITY, eventBuff.level)
endfunctionprivatefunctionCleanuptakesaBuffeventBuffreturnsnothingcallUnitRemoveAbility(eventBuff.target.u, BUFF_ABILITY)
callUnitRemoveAbility(eventBuff.target.u, BUFF_BUFF)
endfunction// ================================================================//Wall unitsprivatefunctionSpellExpiretakesnothingreturnsnothinglocalinstancesi = instance(GetTimerData(GetExpiredTimer()))
callsi.destroy() //timer gets cleaned up in the onDestroy methodendfunctionprivatefunctionSpawnUnittakesinstancesi, realfacing, integersidereturnsnothinglocalrealoffset=GetRandomReal(-WALL_UNIT_MAX_OFFSET, WALL_UNIT_MAX_OFFSET)
localrealx=si.x+si.dx*si.segments/2.0*side+Cos(si.angle)*offsetlocalrealy=si.y+si.dy*si.segments/2.0*side+Sin(si.angle)*offsetlocalunituifWALL_UNIT_RANDOM_FACINGthensetfacing=GetRandomReal(0,360)
endifsetu=CreateUnit(si.owner, XE_DUMMY_UNITID, x, y, facing)
callUnitAddAbility(u, CHAOS_ABILITY) //chaos transformcallUnitAddAbility(u, 'Aloc') //locust; makes unit unselectable, but thanks to chaos transformation it still blocks pathingcallIssueImmediateOrder(u, "holdposition")
callSetUnitX(u, x) //override unit's pathing to put it in positioncallSetUnitY(u, y)
callGroupAddUnit(si.wallunits, u)
setu = nullendfunctionprivatefunctionSpawnSegmenttakesnothingreturnsnothinglocalinstancesi = instance(GetTimerData(GetExpiredTimer()))
localrealfacing = si.angle*bj_RADTODEG+WALL_UNIT_FACINGcallSpawnUnit(si, facing, 1)
ifsi.segments!=0thencallSpawnUnit(si, facing, -1)
endififsi.segments>=WallUnitCount(si.level)-1then//wait the remaining durationcallTimerStart(si.t, WallDuration(si.level)-((si.segments/2)*WallUnitInterval(si.level)), false, functionSpellExpire)
else//wait for the next intervalsetsi.segments=si.segments+2callTimerStart(si.t, WallUnitInterval(si.level), false, functionSpawnSegment)
endifendfunctionprivatefunctionDestroyWallEnumtakesnothingreturnsnothinglocalunitu = GetEnumUnit()
localrealx = GetUnitX(u)
localrealy = GetUnitY(u)
callKillUnit(u) //this triggers a pathing check it seemscallSetUnitX(u, x) //override unit's pathing to put it back in positioncallSetUnitY(u, y)
setu= nullendfunction// ================================================================//Spell instanceprivatestructinstanceprivateintegerindexrealxrealyrealdxrealdyrealangleintegersegments=0unitcasterplayerownerintegerleveltimertgroupwallunitsstaticmethodcreatetakesunitcaster, integerlevel, realtargetx, realtargetyreturnsinstancelocalinstancesi=instance.allocate()
localreallength=WallLength(level)
localrealcount=WallUnitCount(level)
setsi.angle=Atan2(targety-GetUnitY(caster), targetx-GetUnitX(caster))
setsi.caster=castersetsi.owner=GetOwningPlayer(caster)
setsi.level=levelsetsi.x=targetxsetsi.y=targetysetsi.dx=Sin(si.angle)*length/(count-1) //offsets between unitssetsi.dy=-Cos(si.angle)*length/(count-1)
ifcount/2==count/2.0then//even, start with one segmentsetsi.segments=1endififsi.wallunits==nullthen//create a group if this is the first time this instance id is usedsetsi.wallunits=CreateGroup()
endifsetsi.t=NewTimer()
callSetTimerData(si.t, integer(si))
callTimerStart(si.t, 0.0, false, functionSpawnSegment)
ifinstanceCount==0then//slow timersetslow=NewTimer()
callTimerStart(slow, SPELL_PERIOD, true, functionPeriodic)
endifsetinstances[instanceCount]=sisetsi.index=instanceCountsetinstanceCount=instanceCount+1returnsiendmethodmethodonDestroytakesnothingreturnsnothingsetinstanceCount=instanceCount-1setinstances[this.index]=instances[instanceCount]
setinstances[instanceCount].index=this.indexcallForGroup(this.wallunits, functionDestroyWallEnum)
callGroupClear(this.wallunits) //the next time this instance id is used we won't need to create a groupcallReleaseTimer(this.t)
ifinstanceCount==0thencallReleaseTimer(slow)
endifendmethodendstruct// ================================================================privatefunctionSpellEffecttakesnothingreturnsnothinglocalintegerlvllocallocationlifGetSpellAbilityId() == SPELL_ABILITYthensetlvl =GetUnitAbilityLevel(GetTriggerUnit(), SPELL_ABILITY)
setl = GetSpellTargetLoc()
callinstance.create(GetTriggerUnit(), lvl, GetLocationX(l), GetLocationY(l))
callRemoveLocation(l)
setl = nullendifendfunctionprivatefunctionInittakesnothingreturnsnothing//init spellcast triggerlocaltriggertr = CreateTrigger()
callTriggerRegisterAnyUnitEventBJ( tr, EVENT_PLAYER_UNIT_SPELL_EFFECT )
callTriggerAddAction( tr, functionSpellEffect )
//init buff filtersettempbx=Condition(functionTargets)
//init aBuffTypecallXE_PreloadAbility(BUFF_ABILITY)
callXE_PreloadAbility(CHAOS_ABILITY)
setabt=aBuffType.create()
setabt.ignoreAsBuff = truesetabt.eventCreate = ABuffEvent_Create.Createsetabt.eventRefresh = ABuffEvent_Refresh.Refreshsetabt.eventCleanup = ABuffEvent_Cleanup.Cleanupendfunctionendscope

Anyways, you misspelled LurkingShadow in the scope's name. It also still drives me nuts that you 'shamelessly copy' Ammorth's line segments' code as opposed to just using it for Glacial Wall. I'm pretty sure he updated it to be usable, even in your case here. Otherwise, everything looks good and in order. Thank you for making your spells easy to follow and with sensible looking code, it goes a long way to make reading over it smoother.

=It was brought to my attention recently that the ":P" icon stands for "tongue-sticking out", and not the "smirky half-smile" I was using it for all these years. = Thusly I apologize for any unintentional juvenilization of my messages to anyone so afflicted.=

=It was brought to my attention recently that the ":P" icon stands for "tongue-sticking out", and not the "smirky half-smile" I was using it for all these years. = Thusly I apologize for any unintentional juvenilization of my messages to anyone so afflicted.=