[Contest] Official Spell Contest #1

Reaction score
456
Lunar Pulse

BTNLunarPulse.png


Obsidan Statue begins to drain energy inside
itself. After finished draining, strange waves
begin to pulse out of Obsidian Statue, freezing
and damaging enemy units in their way.

How far the far the waves will go,
depends on the time spent on channeling.


Level 1: Each wave deals 100 damage and
freezes for 1 second. Can be channeled up to 6
seconds, and has maximum wave distance of 600.
Pulsing lasts for 6 seconds.

Level 2: Each wave deals 150 damage and
freezes for 1.5 seconds. Can be channeled up to 8
seconds, and has maximum wave distance of 800.
Pulsing lasts for 8 seconds.

Level 3: Each wave deals 200 damage and
freezes for 2 seconds. Can be channeled up to 10
seconds, and has maximum wave distance of 1000.
Pulsing lasts for 10 seconds.

http://xs221.xs.to/xs221/07440/spellscreen.png

How to use, over 9 lines of code:
JASS:
How To Use:
¯¯¯¯¯¯¯¯¯¯¯
1. Export the "LunarStrain.mdx" from the import manager.
2. Import the exported model into your map.
3. Copy and paste the spell "Lunar Pulse" from object editor to your map.
4. Copy and paste the unit "[DummyU] Lunar Pulse]" from object editor to your map.
5. Copy the "Lunar Pulse" trigger from trigger editor to your map.
6. Change the rawcodes inside the "Lunar Pulse" trigger to match to the copied 
   unit's and spell's rawcodes.
7. Modify the spell to your liking.
Spell, over 300 lines of code:
JASS:
scope LunarPulse
    private constant function SpellId takes nothing returns integer
        return 'A000' //Rawcode of your spell
    endfunction
    
    private constant function MaximumChannel takes integer level returns real
        return 4.00 + (level * 2.00) //Maximum channeling time of the spell
    endfunction
    
    private constant function ChannelInterval takes integer level returns real
        return 0.035 //Interval of the channel timer
    endfunction
    
    private constant function MaximumDistance takes integer level returns real
        return 400.00 + (level * 200.00) //Maximum distance of the pulses
    endfunction
    
    private constant function DummyId takes nothing returns integer
        return 'h001' //Rawcode of your dummy wave unit
    endfunction
    
    private constant function DummyCount takes integer level returns integer
        return 36 //Quantity of the dummies per wave. MAX = 40.
    endfunction
    
    private constant function PulsingDuration takes integer level returns real
        return 4.00 + (level * 2.00) //How long does the pulsing last.
    endfunction
    
    private constant function PulseTimerInterval takes integer level returns real
        return 0.035 //Interval of the pulse timer
    endfunction
    
    private constant function PulseInterval takes integer level returns real
        return 2.00 //Time between each pulse. This is also the duration of each pulse
    endfunction
    
    private constant function FollowCaster takes nothing returns boolean
        return true //Set to true, if you wanted the pulse wave to follow the caster
    endfunction
    
    private constant function CasterEffectPath takes integer level returns string
        return "LunarStrain.mdx" //Path for the effect, which is attached to the caster
    endfunction
    
    private constant function CasterEffectPoint takes integer level returns string
        return "origin" //Attach point name of the effect, which is attached to the caster
    endfunction
    
    private constant function Damage takes integer level returns real
        return 50.00 + (level * 50.00) //How much each wave deals damage
    endfunction
    
    private constant function Freeze takes integer level returns real
        return 0.50 + (level * 0.50) //How long are the enemies freezed
    endfunction
    
    private constant function FreezeDamageArea takes integer level returns real
        return 48.00 //How big is the area where the units are frozen and damaged
    endfunction
    
    private constant function FreezeEffectPath takes integer level returns string
        return "Abilities\\Weapons\\DragonHawkMissile\\DragonHawkMissile.mdl" //Path for the effect, which appears on freezed units
    endfunction
    
    private constant function FreezeEffectPoint takes integer level returns string
        return "origin" //Attach point name of the effect, which appears when unit gets freezed
    endfunction
    
    globals
        private integer lastStruct
    endglobals
    
    private struct LPdata
        //Pulsing Data
        trigger controlTrigger = CreateTrigger()
        triggeraction controlAction
        trigger pulseTrigger = CreateTrigger()
        triggeraction pulseAction
        boolean firstTime = true
        unit array waveDummy[40]
        real casterX
        real casterY
        real currentDistance
        integer pulseCount = 0
        group damagerGroup = CreateGroup()
        
        method freezeUnit takes unit whichUnit returns nothing
            local LPdata dat
            local integer index = 0
            loop
                exitwhen (index == lastStruct + 1)
                set dat = index
                if (IsUnitInGroup(whichUnit, dat.damagerGroup)) then
                    exitwhen true
                endif
                set index = index + 1 
            endloop
            call DestroyEffect(AddSpecialEffectTarget(dat.freezeEffectPath, whichUnit, dat.freezeEffectPoint))
            call PauseUnit(whichUnit, true)
            call SetUnitTimeScale(whichUnit, 0.00 * 0.01)
            call PolledWait(dat.freeze)
            call PauseUnit(whichUnit, false)
            call SetUnitTimeScale(whichUnit, 100.00 * 0.01)
            if (IsUnitInGroup(whichUnit, dat.damagerGroup)) then
                call GroupRemoveUnit(dat.damagerGroup, whichUnit) 
            endif
        endmethod
        
        static method pulsePeriod takes nothing returns nothing
            local LPdata dat
            local real x
            local real y
            local integer index = 0
            local group g
            local unit f
            loop
                exitwhen (index == lastStruct + 1)
                set dat = index
                if (GetTriggeringTrigger() == dat.pulseTrigger) then
                    exitwhen true
                endif
                set index = index + 1
            endloop
            set dat.currentDistance = dat.currentDistance + ((dat.finalDistance / dat.pulseInterval) * dat.pulseTimerInterval)
            if (FollowCaster() == true) then
                set dat.casterX = GetUnitX(dat.casterUnit)
                set dat.casterY = GetUnitY(dat.casterUnit)
            endif
            set index = 0
            loop
                exitwhen (index == dat.dummyCount)
                set x = dat.casterX + dat.currentDistance * Cos((index * (360.00 / dat.dummyCount)) * bj_DEGTORAD)
                set y = dat.casterY + dat.currentDistance * Sin((index * (360.00 / dat.dummyCount)) * bj_DEGTORAD)
                call SetUnitX(dat.waveDummy[index], x)
                call SetUnitY(dat.waveDummy[index], y)
                set g = CreateGroup()
                call GroupEnumUnitsInRange(g, x, y, dat.freezeDamageArea, null)
                loop
                    set f = FirstOfGroup(g)
                    exitwhen (f == null)
                    call GroupRemoveUnit(g, f)
                    if ((IsUnitEnemy(f, GetOwningPlayer(dat.casterUnit)) == true) and (IsUnitInGroup(f, dat.damagerGroup) == false) and (GetUnitState(f, UNIT_STATE_LIFE) >= 1)) then
                        call UnitDamageTarget(dat.casterUnit, f, dat.damage, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNKNOWN, WEAPON_TYPE_WHOKNOWS)
                        call GroupAddUnit(dat.damagerGroup, f)
                        call dat.freezeUnit.execute(f)
                    endif
                    set f = null
                endloop
                call GroupClear(g)
                call DestroyGroup(g)
                set g = null
                set index = index + 1
            endloop
        endmethod
        
        static method controlPulse takes nothing returns nothing
            local LPdata dat
            local real x
            local real y
            local integer index = 0
            loop
                exitwhen (index == lastStruct + 1)
                set dat = index
                if (GetTriggeringTrigger() == dat.controlTrigger) then
                    exitwhen true
                endif
                set index = index + 1
            endloop
            set dat.currentDistance = 0.00
            set dat.casterX = GetUnitX(dat.casterUnit)
            set dat.casterY = GetUnitY(dat.casterUnit)
            set index = 0
            if ((dat.pulseCount >= R2I(dat.pulsingDuration / dat.pulseInterval)) or (GetUnitState(dat.casterUnit, UNIT_STATE_LIFE) <= 0)) then
                call TriggerRemoveAction(dat.controlTrigger, dat.controlAction)
                set dat.controlAction = null
                call DisableTrigger(dat.controlTrigger)
                call DestroyTrigger(dat.controlTrigger)
                set dat.controlTrigger = null
                call TriggerRemoveAction(dat.pulseTrigger, dat.pulseAction)
                set dat.pulseAction = null
                call DisableTrigger(dat.pulseTrigger)
                call DestroyTrigger(dat.pulseTrigger)
                set dat.pulseTrigger = null
                call DestroyEffect(dat.casterEffect)
                set dat.casterEffect = null
                loop
                    exitwhen (index == dat.dummyCount)
                    call KillUnit(dat.waveDummy[index])
                    set dat.waveDummy[index] = null 
                    set index = index + 1
                endloop
                call dat.destroy()
                return
            endif
            call GroupClear(dat.damagerGroup)
            call DestroyGroup(dat.damagerGroup)
            set dat.damagerGroup = null
            set dat.damagerGroup = CreateGroup()
            set dat.pulseCount = dat.pulseCount + 1
            loop
                exitwhen (index == dat.dummyCount)
                call KillUnit(dat.waveDummy[index])
                set dat.waveDummy[index] = null 
                set x = dat.casterX + dat.currentDistance * Cos((index * (360.00 / dat.dummyCount)) * bj_DEGTORAD)
                set y = dat.casterY + dat.currentDistance * Sin((index * (360.00 / dat.dummyCount)) * bj_DEGTORAD)
                set dat.waveDummy[index] = CreateUnit(GetOwningPlayer(dat.casterUnit), DummyId(), x, y, (index * (360.00 / dat.dummyCount)))
                set index = index + 1
            endloop
            if (dat.firstTime == true) then
                set dat.firstTime = false
                call TriggerRegisterTimerEvent(dat.pulseTrigger, dat.pulseTimerInterval, true)
                set dat.pulseAction = TriggerAddAction(dat.pulseTrigger, function LPdata.pulsePeriod)
            endif               
        endmethod
        
        //Channel Data
        trigger channelTrigger = CreateTrigger()
        triggeraction channelAction
        real currentChannel = 0.00
        real finalDistance
        real channelCasterX
        real channelCasterY
        effect casterEffect
        
        static method channelPeriod takes nothing returns nothing
            local LPdata dat
            local integer index = 0
            loop
                exitwhen (index == lastStruct + 1)
                set dat = index
                if (GetTriggeringTrigger() == dat.channelTrigger) then
                    exitwhen true
                endif
                set index = index + 1
            endloop
            set dat.currentChannel = dat.currentChannel + dat.channelInterval
            if ((GetUnitX(dat.casterUnit) != dat.channelCasterX) and (GetUnitY(dat.casterUnit) != dat.channelCasterY)) or (GetUnitState(dat.casterUnit, UNIT_STATE_LIFE) <= 0) or (dat.currentChannel >= dat.maximumChannel) then
                call PauseUnit(dat.casterUnit, true)
                call PauseUnit(dat.casterUnit, false)
                call TriggerRemoveAction(dat.channelTrigger, dat.channelAction)
                call DisableTrigger(dat.channelTrigger)
                call DestroyTrigger(dat.channelTrigger)
                set dat.channelTrigger = null
                if ((dat.maximumDistance / dat.maximumChannel) * dat.currentChannel > dat.maximumDistance) then
                    set dat.finalDistance = dat.maximumDistance
                else
                    set dat.finalDistance = (dat.maximumDistance / dat.maximumChannel) * dat.currentChannel
                endif
                set dat.casterEffect = AddSpecialEffectTarget(dat.casterEffectPath, dat.casterUnit, dat.casterEffectPoint)
                call TriggerRegisterTimerEvent(dat.controlTrigger, dat.pulseInterval, true)
                set dat.controlAction = TriggerAddAction(dat.controlTrigger, function LPdata.controlPulse)
            endif
        endmethod
        
        //General Data
        unit casterUnit
        real maximumChannel
        real channelInterval
        real maximumDistance
        integer dummyCount
        real pulsingDuration
        real pulseTimerInterval
        real pulseInterval
        string casterEffectPath
        string casterEffectPoint
        real damage
        real freeze
        real freezeDamageArea
        string freezeEffectPath
        string freezeEffectPoint
        
        static method create takes unit casterUnit, real maximumChannel, real channelInterval, real maximumDistance, integer dummyCount, real pulsingDuration, real pulseTimerInterval , real pulseInterval, string casterEffectPath, string casterEffectPoint, real damage, real freeze, real freezeDamageArea, string freezeEffectPath, string freezeEffectPoint returns LPdata
            local LPdata dat = LPdata.allocate()
            set dat.casterUnit = casterUnit
            set dat.maximumChannel = maximumChannel
            set dat.channelInterval = channelInterval
            set dat.maximumDistance = maximumDistance
            set dat.dummyCount = dummyCount
            set dat.pulsingDuration = pulsingDuration
            set dat.pulseTimerInterval = pulseTimerInterval
            set dat.pulseInterval = pulseInterval
            set dat.casterEffectPath = casterEffectPath
            set dat.casterEffectPoint = casterEffectPoint
            set dat.damage = damage
            set dat.freeze = freeze
            set dat.freezeDamageArea = freezeDamageArea
            set dat.freezeEffectPath = freezeEffectPath
            set dat.freezeEffectPoint = freezeEffectPoint
            
            set dat.channelCasterX = GetUnitX(dat.casterUnit)
            set dat.channelCasterY = GetUnitY(dat.casterUnit)
            
            call TriggerRegisterTimerEvent(dat.channelTrigger, dat.channelInterval, true)
            set dat.channelAction = TriggerAddAction(dat.channelTrigger, function LPdata.channelPeriod)
            
            return dat
        endmethod
    endstruct

    private function ControlConditions takes nothing returns boolean
        return GetSpellAbilityId() == SpellId()
    endfunction
    
    private function ControlActions takes nothing returns nothing
        local unit casterUnit = GetTriggerUnit()
        local integer level = GetUnitAbilityLevel(casterUnit, SpellId())
        local LPdata dat = LPdata.create(casterUnit, MaximumChannel(level), ChannelInterval(level), MaximumDistance(level), DummyCount(level), PulsingDuration(level), PulseTimerInterval(level), PulseInterval(level), CasterEffectPath(level), CasterEffectPoint(level), Damage(level), Freeze(level), FreezeDamageArea(level), FreezeEffectPath(level), FreezeEffectPoint(level))
        set lastStruct = dat
        set casterUnit = null
    endfunction

    //===========================================================================
    function InitTrig_Lunar_Pulse takes nothing returns nothing
        local trigger trig = CreateTrigger()
        local integer index = 0
        loop
            exitwhen (index == 12)
            call TriggerRegisterPlayerUnitEvent(trig, Player(index), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
            set index = index + 1 
        endloop
        call TriggerAddAction(trig, function ControlActions)
        call TriggerAddCondition(trig, Filter(function ControlConditions))
        set trig = null
    endfunction
endscope

MUI: Yes.. In my tests at least..
Lag: It sure does if it is casted many times. Also, it depends on what you put onto configuration menu.
Known bugs: You really shouldn't cast the spell again (with same unit), if the caster is channeling already..
What else: Figure out yourself.

EDIT://Updated map 3rd time.
 

Darkchaoself

What is this i dont even
Reaction score
106
Here is my Spell it is Called Balerino and it creates balls circling around the Hero
it Heals while channeling and causes damage after channeling.

MUI= No
Leakless= No

Hope you like it

Kinda sounds like mine except without the death and explosions :p

And yea, you should at least check leaks, you have (7?) hours left.

You don't gotta rush ;)
 

rodead

Active Member
Reaction score
42
Balerino

This spell is an idea i had long ago i hope you like the idea and get the concept of the spell that it could be used as 2 diferent spells.

Discription

Creates 8 lines of lighting around the hero That heals him 5% every second. also creating balls that circle around the hero and create a giant Ball that will explode and make an Nova of Balls Dealling 10 Damage every 0.10 seconds within 200 AoE of the Hero.

MUI sertanly not.
Leakless as far as i could clear them.


Code:

Code:
Balerino
    Events
        Unit - A unit Begins channeling an ability
    Conditions
        (Ability being cast) Equal to Balerino 
    Actions
        Set Hero = (Casting unit)
        Set Hero_Loc = (Position of (Casting unit))
        Set Offset[1] = 0.00
        Set Offset[2] = 90.00
        Set Offset[3] = 180.00
        Set Offset[4] = 270.00
        Unit - Create 1 Ball for (Owner of Hero) at Hero_Loc facing Default camera field of view degrees
        Set Balls[17] = (Last created unit)
        Animation - Change Balls[17] flying height to 200.00 at 1000000000.00
        Unit - Create 1 Ball for (Owner of Hero) at (Hero_Loc offset by 50.00 towards Offset[1] degrees) facing Offset[1] degrees
        Set Balls[1] = (Last created unit)
        Animation - Change Balls[1] flying height to 200.00 at 75.00
        Unit - Create 1 Ball for (Owner of Hero) at (Hero_Loc offset by 75.00 towards Offset[1] degrees) facing Offset[1] degrees
        Set Balls[2] = (Last created unit)
        Animation - Change Balls[2] flying height to 200.00 at 50.00
        Unit - Create 1 Ball for (Owner of Hero) at (Hero_Loc offset by 100.00 towards Offset[1] degrees) facing Offset[1] degrees
        Set Balls[3] = (Last created unit)
        Animation - Change Balls[3] flying height to 200.00 at 25.00
        Unit - Create 1 Ball for (Owner of Hero) at (Hero_Loc offset by 50.00 towards Offset[2] degrees) facing Offset[2] degrees
        Set Balls[4] = (Last created unit)
        Animation - Change Balls[4] flying height to 200.00 at 75.00
        Unit - Create 1 Ball for (Owner of Hero) at (Hero_Loc offset by 75.00 towards Offset[2] degrees) facing Offset[2] degrees
        Set Balls[5] = (Last created unit)
        Animation - Change Balls[5] flying height to 200.00 at 50.00
        Unit - Create 1 Ball for (Owner of Hero) at (Hero_Loc offset by 100.00 towards Offset[2] degrees) facing Offset[2] degrees
        Set Balls[6] = (Last created unit)
        Animation - Change Balls[6] flying height to 200.00 at 25.00
        Unit - Create 1 Ball for (Owner of Hero) at (Hero_Loc offset by 50.00 towards Offset[3] degrees) facing Offset[3] degrees
        Set Balls[7] = (Last created unit)
        Animation - Change Balls[7] flying height to 200.00 at 75.00
        Unit - Create 1 Ball for (Owner of Hero) at (Hero_Loc offset by 75.00 towards Offset[3] degrees) facing Offset[3] degrees
        Set Balls[8] = (Last created unit)
        Animation - Change Balls[8] flying height to 200.00 at 50.00
        Unit - Create 1 Ball for (Owner of Hero) at (Hero_Loc offset by 100.00 towards Offset[3] degrees) facing Offset[3] degrees
        Set Balls[9] = (Last created unit)
        Animation - Change Balls[9] flying height to 200.00 at 25.00
        Unit - Create 1 Ball for (Owner of Hero) at (Hero_Loc offset by 50.00 towards Offset[4] degrees) facing Offset[4] degrees
        Set Balls[10] = (Last created unit)
        Animation - Change Balls[10] flying height to 200.00 at 75.00
        Unit - Create 1 Ball for (Owner of Hero) at (Hero_Loc offset by 75.00 towards Offset[4] degrees) facing Offset[4] degrees
        Set Balls[11] = (Last created unit)
        Animation - Change Balls[11] flying height to 200.00 at 50.00
        Unit - Create 1 Ball for (Owner of Hero) at (Hero_Loc offset by 100.00 towards Offset[4] degrees) facing Offset[4] degrees
        Set Balls[12] = (Last created unit)
        Animation - Change Balls[12] flying height to 200.00 at 25.00
        Unit - Create 1 Ball for (Owner of Hero) at (Hero_Loc offset by 200.00 towards 45.00 degrees) facing 45.00 degrees
        Set Balls[13] = (Last created unit)
        Unit - Create 1 Ball for (Owner of Hero) at (Hero_Loc offset by 200.00 towards 135.00 degrees) facing 135.00 degrees
        Set Balls[14] = (Last created unit)
        Unit - Create 1 Ball for (Owner of Hero) at (Hero_Loc offset by 200.00 towards 225.00 degrees) facing 225.00 degrees
        Set Balls[15] = (Last created unit)
        Unit - Create 1 Ball for (Owner of Hero) at (Hero_Loc offset by 200.00 towards 315.00 degrees) facing 315.00 degrees
        Set Balls[16] = (Last created unit)
        Unit - Create 1 Ball for (Owner of Hero) at (Hero_Loc offset by 200.00 towards 0.00 degrees) facing 0.00 degrees
        Set Balls[18] = (Last created unit)
        Unit - Create 1 Ball for (Owner of Hero) at (Hero_Loc offset by 200.00 towards 90.00 degrees) facing 90.00 degrees
        Set Balls[19] = (Last created unit)
        Unit - Create 1 Ball for (Owner of Hero) at (Hero_Loc offset by 200.00 towards 180.00 degrees) facing 180.00 degrees
        Set Balls[20] = (Last created unit)
        Unit - Create 1 Ball for (Owner of Hero) at (Hero_Loc offset by 200.00 towards 270.00 degrees) facing 270.00 degrees
        Set Balls[21] = (Last created unit)
        Lightning - Create a Drain Mana lightning effect from source Hero_Loc to target (Position of Balls[13])
        Set Lightning[1] = (Last created lightning effect)
        Lightning - Create a Drain Mana lightning effect from source Hero_Loc to target (Position of Balls[14])
        Set Lightning[2] = (Last created lightning effect)
        Lightning - Create a Drain Mana lightning effect from source Hero_Loc to target (Position of Balls[15])
        Set Lightning[3] = (Last created lightning effect)
        Lightning - Create a Drain Mana lightning effect from source Hero_Loc to target (Position of Balls[16])
        Set Lightning[4] = (Last created lightning effect)
        Lightning - Create a Drain Mana lightning effect from source Hero_Loc to target (Position of Balls[18])
        Set Lightning[5] = (Last created lightning effect)
        Lightning - Create a Drain Mana lightning effect from source Hero_Loc to target (Position of Balls[19])
        Set Lightning[6] = (Last created lightning effect)
        Lightning - Create a Drain Mana lightning effect from source Hero_Loc to target (Position of Balls[20])
        Set Lightning[7] = (Last created lightning effect)
        Lightning - Create a Drain Mana lightning effect from source Hero_Loc to target (Position of Balls[21])
        Set Lightning[8] = (Last created lightning effect)
        Trigger - Turn on Move <gen>

Code:
Move
    Events
        Time - Every 0.05 seconds of game time
    Conditions
    Actions
        Set Rate = (Rate + 2.00)
        Set Real = (Real + 5.00)
        Set Offset[1] = (Offset[1] + 10.00)
        Set Offset[2] = (Offset[2] + 10.00)
        Set Offset[3] = (Offset[3] + 10.00)
        Set Offset[4] = (Offset[4] + 10.00)
        Animation - Change Balls[17]'s size to (Rate%, Rate%, Rate%) of its original size
        Unit - Move Balls[1] instantly to (Hero_Loc offset by 50.00 towards Offset[1] degrees)
        Unit - Move Balls[2] instantly to (Hero_Loc offset by 75.00 towards Offset[1] degrees)
        Unit - Move Balls[3] instantly to (Hero_Loc offset by 100.00 towards Offset[1] degrees)
        Unit - Move Balls[4] instantly to (Hero_Loc offset by 50.00 towards Offset[2] degrees)
        Unit - Move Balls[5] instantly to (Hero_Loc offset by 75.00 towards Offset[2] degrees)
        Unit - Move Balls[6] instantly to (Hero_Loc offset by 100.00 towards Offset[2] degrees)
        Unit - Move Balls[7] instantly to (Hero_Loc offset by 50.00 towards Offset[3] degrees)
        Unit - Move Balls[8] instantly to (Hero_Loc offset by 75.00 towards Offset[3] degrees)
        Unit - Move Balls[9] instantly to (Hero_Loc offset by 100.00 towards Offset[3] degrees)
        Unit - Move Balls[10] instantly to (Hero_Loc offset by 50.00 towards Offset[4] degrees)
        Unit - Move Balls[11] instantly to (Hero_Loc offset by 75.00 towards Offset[4] degrees)
        Unit - Move Balls[12] instantly to (Hero_Loc offset by 100.00 towards Offset[4] degrees)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Real Equal to 300.00
            Then - Actions
                Trigger - Turn on Healing <gen>
                Animation - Change Balls[1] flying height to 0.00 at 50.00
                Animation - Change Balls[4] flying height to 0.00 at 50.00
                Animation - Change Balls[7] flying height to 0.00 at 50.00
                Animation - Change Balls[10] flying height to 0.00 at 50.00
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Real Equal to 400.00
            Then - Actions
                Animation - Change Balls[2] flying height to 0.00 at 50.00
                Animation - Change Balls[5] flying height to 0.00 at 50.00
                Animation - Change Balls[8] flying height to 0.00 at 50.00
                Animation - Change Balls[11] flying height to 0.00 at 50.00
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Real Equal to 600.00
            Then - Actions
                Animation - Change Balls[3] flying height to 0.00 at 75.00
                Animation - Change Balls[6] flying height to 0.00 at 75.00
                Animation - Change Balls[9] flying height to 0.00 at 75.00
                Animation - Change Balls[12] flying height to 0.00 at 75.00
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Real Equal to 600.00
            Then - Actions
                Animation - Change Balls[1] flying height to 200.00 at 50.00
                Animation - Change Balls[4] flying height to 200.00 at 50.00
                Animation - Change Balls[7] flying height to 200.00 at 50.00
                Animation - Change Balls[10] flying height to 200.00 at 50.00
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Real Equal to 700.00
            Then - Actions
                Animation - Change Balls[2] flying height to 200.00 at 50.00
                Animation - Change Balls[5] flying height to 200.00 at 50.00
                Animation - Change Balls[8] flying height to 200.00 at 50.00
                Animation - Change Balls[11] flying height to 200.00 at 50.00
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Real Equal to 800.00
            Then - Actions
                Animation - Change Balls[3] flying height to 200.00 at 50.00
                Animation - Change Balls[6] flying height to 200.00 at 50.00
                Animation - Change Balls[9] flying height to 200.00 at 50.00
                Animation - Change Balls[12] flying height to 200.00 at 50.00
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Real Equal to 1000.00
            Then - Actions
                Unit - Remove Balls[1] from the game
                Unit - Remove Balls[2] from the game
                Unit - Remove Balls[3] from the game
                Unit - Remove Balls[4] from the game
                Unit - Remove Balls[5] from the game
                Unit - Remove Balls[6] from the game
                Unit - Remove Balls[7] from the game
                Unit - Remove Balls[8] from the game
                Unit - Remove Balls[9] from the game
                Unit - Remove Balls[10] from the game
                Unit - Remove Balls[11] from the game
                Unit - Remove Balls[12] from the game
                Unit - Remove Balls[13] from the game
                Unit - Remove Balls[14] from the game
                Unit - Remove Balls[15] from the game
                Unit - Remove Balls[16] from the game
                Unit - Explode Balls[17]
                Unit - Remove Balls[18] from the game
                Unit - Remove Balls[19] from the game
                Unit - Remove Balls[20] from the game
                Unit - Remove Balls[21] from the game
                Lightning - Destroy Lightning[2]
                Lightning - Destroy Lightning[1]
                Lightning - Destroy Lightning[3]
                Lightning - Destroy Lightning[4]
                Lightning - Destroy Lightning[5]
                Lightning - Destroy Lightning[6]
                Lightning - Destroy Lightning[7]
                Lightning - Destroy Lightning[8]
                For each (Integer B) from 1 to 50, do (Actions)
                    Loop - Actions
                        Unit - Create 1 Ball for (Owner of Hero) at Hero_Loc facing Default building facing degrees
                        Set Balls[(Integer B)] = (Last created unit)
                Trigger - Turn off Healing <gen>
                Trigger - Turn on Damage <gen>
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Real Greater than or equal to 1005.00
            Then - Actions
                Set Offset[5] = (Offset[5] + 10.00)
                Set Unitgroup[1] = (Units of type Ball)
                Unit Group - Pick every unit in (Units of type Ball) and do (Actions)
                    Loop - Actions
                        Unit - Move (Picked unit) instantly to (Hero_Loc offset by Offset[5] towards (Random angle) degrees)
                        Trigger - Turn on Damage <gen>
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Real Equal to 1200.00
            Then - Actions
                Unit Group - Pick every unit in Unitgroup[1] and do (Unit - Remove (Picked unit) from the game)
                Trigger - Turn off Damage <gen>
                Trigger - Turn off (This trigger)
            Else - Actions

Code:
Damage
    Events
        Time - Every 0.10 seconds of game time
    Conditions
    Actions
        Set Unitgroup[2] = (Units within 512.00 of Hero_Loc matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A ground unit) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and ((Owner of (Matching unit)) Not equal to (Owner of
        Unit Group - Pick every unit in Unitgroup[2] and do (Actions)
            Loop - Actions
                Unit - Cause Hero to damage (Picked unit), dealing 20.00 damage of attack type Spells and damage type Lightning

Code:
Healing
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Unit - Set life of Hero to ((Percentage life of Hero) + 5.00)%

Code:
Cancel
    Events
        Unit - A unit Stops casting an ability
    Conditions
        (Ability being cast) Equal to Balerino 
    Actions
        Unit - Remove Balls[1] from the game
        Unit - Remove Balls[2] from the game
        Unit - Remove Balls[3] from the game
        Unit - Remove Balls[4] from the game
        Unit - Remove Balls[5] from the game
        Unit - Remove Balls[6] from the game
        Unit - Remove Balls[7] from the game
        Unit - Remove Balls[8] from the game
        Unit - Remove Balls[9] from the game
        Unit - Remove Balls[10] from the game
        Unit - Remove Balls[11] from the game
        Unit - Remove Balls[12] from the game
        Unit - Remove Balls[13] from the game
        Unit - Remove Balls[14] from the game
        Unit - Remove Balls[15] from the game
        Unit - Remove Balls[16] from the game
        Unit - Explode Balls[17]
        Unit - Remove Balls[18] from the game
        Unit - Remove Balls[19] from the game
        Unit - Remove Balls[20] from the game
        Unit - Remove Balls[21] from the game
        Lightning - Destroy Lightning[2]
        Lightning - Destroy Lightning[1]
        Lightning - Destroy Lightning[3]
        Lightning - Destroy Lightning[4]
        Lightning - Destroy Lightning[5]
        Lightning - Destroy Lightning[6]
        Lightning - Destroy Lightning[7]
        Lightning - Destroy Lightning[8]
        Trigger - Turn off Move <gen>
        Trigger - Turn off Damage <gen>
        Trigger - Turn off Healing <gen>
        Set Rate = 100.00
        Set Offset[5] = 0.00
        Set Real = 0.00
        Custom script:   call RemoveLocation (udg_Hero_Loc)
        Custom script:   call DestroyGroup (udg_Unitgroup[GetForLoopIndexA()])

Screenshots

attachment.php

attachment.php
 

Attachments

  • Contest Spell.w3x
    57.6 KB · Views: 282

Darkchaoself

What is this i dont even
Reaction score
106
Time again for "The List!"
  1. DemonWrath
    [*]Darkchaoself
  2. rodead
    [*]PurgeandFire
  3. Grymlax
  4. hell_knight9
  5. The Mapmaker
  6. Rheias
    [*]0zaru
  7. ~GaLs~
    [*]Überplayer
  8. Prediter[BuB
  9. Hatebreeder
  10. FroznYoghurt
    [*]Pyrogasm
  11. Ghan_04
  12. AceHart
  13. MoonSlinger
Did i forget anyone?
 

Pigger

New Member
Reaction score
13
Ancestral Pwnage


Code:
Init
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Ancestral Pwnage 
    Actions
        Set Caster = (Triggering unit)
        Set CasterPos = (Position of Caster)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Custom value of Caster) Equal to 0
            Then - Actions
                Trigger - Add to Damaged <gen> the event (Unit - Caster Takes damage)
                Unit - Set the custom value of Caster to 1
            Else - Actions
        Countdown Timer - Start Timer[1] as a One-shot timer that will expire in 4.00 seconds
        Trigger - Turn on Calling <gen>
        Trigger - Turn on Damaged <gen>
        Unit - Create 1 TaurenDummy for (Owner of Caster) at CasterPos facing (Facing of Caster) degrees
        Unit - Add Buff  to (Last created unit)
        Unit - Order (Last created unit) to Orc Shaman - Bloodlust Caster
        Unit - Add a 0.75 second Generic expiration timer to (Last created unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Random integer number between 1 and 10) Less than or equal to 5
            Then - Actions
                Floating Text - Create floating text that reads |cFFFF0000Ancestors... above Caster with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
                Floating Text - Change (Last created floating text): Disable permanence
                Floating Text - Change the lifespan of (Last created floating text) to 3.50 seconds
                Floating Text - Change the fading age of (Last created floating text) to 0.00 seconds
            Else - Actions
                Floating Text - Create floating text that reads |cFFFF0000Prepare f... above Caster with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
                Floating Text - Change (Last created floating text): Disable permanence
                Floating Text - Change the lifespan of (Last created floating text) to 3.50 seconds
                Floating Text - Change the fading age of (Last created floating text) to 0.00 seconds

Code:
Calling
    Events
        Time - Every 0.50 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Current order of Caster) Not equal to (Order(channel))
            Then - Actions
                Trigger - Turn off (This trigger)
                Unit - Create 1 TaurenDummy for (Owner of Caster) at CasterPos facing (Facing of Caster) degrees
                Animation - Change (Last created unit)'s size to (230.00%, 230.00%, 230.00%) of its original size
                Animation - Play (Last created unit)'s slam animation
                Floating Text - Create floating text that reads |cFFFF0000Feel the ... above (Last created unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
                Floating Text - Change (Last created floating text): Disable permanence
                Floating Text - Change the lifespan of (Last created floating text) to 3.50 seconds
                Floating Text - Change the fading age of (Last created floating text) to 0.00 seconds
                Unit - Add a 1.20 second Generic expiration timer to (Last created unit)
                Set Group[2] = (Units within 625.00 of CasterPos matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of Caster)) Equal to True))))
                Unit - Remove Buff  buff from Caster
                Wait 0.60 seconds
                Unit Group - Pick every unit in Group[2] and do (Actions)
                    Loop - Actions
                        Unit - Pause (Picked unit)
                        Animation - Play (Picked unit)'s death animation
                        Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
                        Special Effect - Destroy (Last created special effect)
                Wait (Elapsed time for Timer[1]) seconds
                Unit Group - Pick every unit in Group[2] and do (Actions)
                    Loop - Actions
                        Unit Group - Remove (Picked unit) from Group[2]
                        Unit - Unpause (Picked unit)
                        Animation - Reset (Picked unit)'s animation
                Custom script:   call RemoveLocation(udg_RandomPoint)
                Trigger - Turn off (This trigger)
            Else - Actions
                Set RandomPoint = (CasterPos offset by ((Random real number between -200.00 and 200.00), (Random real number between -200.00 and 200.00)))
                Unit - Create 1 TaurenDummy for (Owner of Caster) at RandomPoint facing (Facing of Caster) degrees
                Set LCUNonArry = (Last created unit)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Random integer number between 1 and 10) Less than or equal to 5
                    Then - Actions
                        Unit - Add Stomp(Disorient)  to LCUNonArry
                        Unit - Order LCUNonArry to Human Mountain King - Thunder Clap
                    Else - Actions
                        Unit - Add Stomp(Stun)  to LCUNonArry
                        Unit - Order LCUNonArry to Orc Tauren Chieftain - War Stomp
                Unit - Add a 1.00 second Generic expiration timer to LCUNonArry
                Custom script:   call RemoveLocation(udg_RandomPoint)

Code:
Damaged
    Events
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Attacked unit) has buff Buff ) Equal to True
            Then - Actions
                Set Integer = (Integer + 1)
                Set AU[Integer] = (Damage source)
                Set AUPos[Integer] = (Position of AU[Integer])
                Set Angle[Integer] = (Angle from CasterPos to AUPos[Integer])
                Set MovingPoint[Integer] = (AUPos[Integer] offset by 20.00 towards Angle[Integer] degrees)
                Unit Group - Add AU[Integer] to Group[1]
                Special Effect - Create a special effect attached to the origin of AU[Integer] using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
                Special Effect - Destroy (Last created special effect)
                Unit - Create 1 TaurenDummy for (Owner of Caster) at AUPos[Integer] facing Angle[Integer] degrees
                Unit - Order (Last created unit) to Human Mountain King - Storm Bolt AU[Integer]
                Unit - Add a 0.70 second Generic expiration timer to (Last created unit)
                Floating Text - Create floating text that reads |cFFFF0000Do not in... above (Last created unit) with Z offset 0.00, using font size 7.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
                Floating Text - Change (Last created floating text): Disable permanence
                Floating Text - Change the lifespan of (Last created floating text) to 3.50 seconds
                Floating Text - Change the fading age of (Last created floating text) to 0.00 seconds
                Trigger - Turn on Knockback <gen>
            Else - Actions

Code:
Knockback
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        Destructible - Pick every destructible within 150.00 of AUPos[Integer] and do (Actions)
            Loop - Actions
                Destructible - Kill (Picked destructible)
        Unit Group - Pick every unit in Group[1] and do (Actions)
            Loop - Actions
                Unit - Turn collision for AU[Integer] Off
                Unit - Move AU[Integer] instantly to MovingPoint[Integer], facing (Angle[Integer] + 180.00) degrees
                Set AUPos[Integer] = (Position of AU[Integer])
                Set MovingPoint[Integer] = (AUPos[Integer] offset by 30.00 towards Angle[Integer] degrees)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Distance between CasterPos and AUPos[Integer]) Greater than or equal to 600.00
                    Then - Actions
                        Unit Group - Remove AU[Integer] from Group[1]
                        Unit - Turn collision for AU[Integer] On
                        Set Integer = (Integer - Integer)
                        Custom script:   call RemoveLocation(udg_AUPos[udg_Integer])
                        Custom script:   call RemoveLocation(udg_MovingPoint[udg_Integer])
                    Else - Actions
        Custom script:   call RemoveLocation(udg_AUPos[GetForLoopIndexA()])
        Custom script:   call RemoveLocation(udg_MovingPoint[GetForLoopIndexA()])

View attachment ChannelSpell.w3x
 

Darkchaoself

What is this i dont even
Reaction score
106
Well before this ends, which i will be off for, i would like to congratulate all the participants and their amazing spells, for all the time and effort put into them. Good job all.
 

Demonwrath

Happy[ExtremelyOverCommercializ ed]HolidaysEveryon
Reaction score
47
And thanks for making me #1 :p

Okay well my best guess is that there is under and hour left, and I think this contest is gonna be tough :p

Grading wise, I have no clue who will win (best guess is AceHart)
But then with the voting, it could be on best looks FTW :p

Anyway good luck to everyone :)
 

Pyrogasm

There are some who would use any excuse to ban me.
Reaction score
134
Ok, I'm done... let me just upload a screenshot in a bit.

And, uh, the contest ended 4 minutes ago.

GrislyBarrage.jpg

Grisly Barrage

The caster channels for a short while whilst periodically levitating nearby corpses and hurling them at target area dealing damage to all units around the impact.

Level 1 - Corpses each deal 85 damage upon impact.
Level 2 - Corpses each deal 105 damage upon impact.
Level 3 - Corpses each deal 125 damage upon impact.
JASS:
//globals
//    group udg_GrislyBarrage_SpinGroup //Just the globals used
//    timer udg_GrislyBarrage_SpinTimer
//endglobals

//*******************************************************************
//*                       Start Configuration                       *
//*******************************************************************

constant function GrislyBarrage_AbilityId takes nothing returns integer
    return &#039;A001&#039; //Rawcode of the actual spell
endfunction

constant function GrislyBarrage_ChannelOrderString takes nothing returns string
    return &quot;stampede&quot; //The base orderstring of the Grisly Barrage spell
endfunction

constant function GrislyBarrage_DummyAbilityId takes nothing returns integer
    return &#039;A003&#039; //The Dummy Raise Dead ability
endfunction

constant function GrislyBarrage_DummyUnitId takes nothing returns integer
    return &#039;h000&#039; //The rawcode of the dummy unit
endfunction

constant function GrislyBarrage_CorpseSFXAbilityId takes nothing returns integer
    return &#039;A005&#039;
endfunction

constant function GrislyBarrage_CrowFormId takes nothing returns integer
    return &#039;Amrf&#039; //Medivh&#039;s Crow form ability; you don&#039;t need to change this rawcode unless you
                  //Modified the ability in your map. In that case copy it, reset the copied one,
                  //And use its rawcode here
endfunction

constant function GrislyBarrage_ThrowInterval takes integer Level returns real
    return 0.65 //How often a new corpse is looked for to be thrown
endfunction

constant function GrislyBarrage_Radius takes integer Level returns real
    return 100.00 //The radius of the area at which corpses are thrown
endfunction

constant function GrislyBarrage_CreationEffect takes integer Level returns string
    return &quot;Objects\\Spawnmodels\\Demon\\DemonSmallDeathExplode\\DemonSmallDeathExplode.mdl&quot;
endfunction

constant function GrislyBarrage_CorpseScale takes integer Level returns real
    return 0.75
endfunction

constant function GrislyBarrage_LevitateOnCast takes integer Level returns boolean
    return true //If true, this will levitate a corpse immediately upon casting
endfunction

constant function GrislyBarrage_MinCorpseFlyHeight takes integer Level returns real
    return 275.00 //Minimum height corpses will be levitated to
endfunction

constant function GrislyBarrage_MaxCorpseFlyHeight takes integer Level returns real
    return 325.00 //Maximum height corpses will be levitated to
endfunction

constant function GrislyBarrage_TimeToLevitateCorpse takes integer Level returns real
    return 0.75 //How long it takes a corpse to reach its levitate height
endfunction

constant function GrislyBarrage_TopDelay takes integer Level returns real
    return 0.25 //Corpses will pause for this long after being levitated before being
                //Hurled at the target point
endfunction

constant function GrislyBarrage_MoveCorpseToTargetSpeed takes integer Level returns real
    return 625.00 //How fast the corpse the corpse moves towards its target
endfunction

constant function GrislyBarrage_MoveCorpseToTargetInterval takes integer Level returns real
    return 0.03 //The interval at which the corpse is moved
endfunction

constant function GrislyBarrage_ImpactEffect takes integer Level returns string
    return &quot;Objects\\Spawnmodels\\Demon\\DemonSmallDeathExplode\\DemonSmallDeathExplode.mdl&quot;
endfunction

constant function GrislyBarrage_ImpactRadius takes integer Level returns real
    return 150.00 //The radius of the impact area
endfunction

constant function GrislyBarrage_Damage takes integer Level returns real
    return 65.00+(20.00*Level) //How much damage the spell does on impact
endfunction

function GrislyBarrage_DamageFilter takes unit FilterUnit, player CasterOwner, integer Level returns boolean
    return GetWidgetLife(FilterUnit) &gt; 0.405
endfunction

constant function GrislyBarrage_DamageSFXPath takes integer Level returns string
    return &quot;Objects\\Spawnmodels\\Naga\\NagaBlood\\NagaBloodWindserpent.mdl&quot;
endfunction

constant function GrislyBarrage_DamageSFXAttach takes integer Level returns string
    return &quot;chest&quot;
endfunction



constant function GrislyBarrage_DegreesPerSpinInterval takes nothing returns real
    return 179.00 //How many degrees the levitated corpses spin
endfunction

constant function GrislyBarrage_SpinInterval takes nothing returns real
    return 0.01 //How often the corpses are spun the above number of degrees
endfunction

//*******************************************************************
//*                        End Configuration                        *
//*******************************************************************

function GrislyBarrage_CastConditions takes nothing returns boolean     
    return GetSpellAbilityId() == GrislyBarrage_AbilityId()
endfunction

function GrislyBarrage_RaiseDetectCastConditions takes nothing returns boolean     
    return GetSpellAbilityId() == GrislyBarrage_DummyAbilityId()
endfunction

function GrislyBarrage_ImpactFilter takes nothing returns boolean
    return GrislyBarrage_DamageFilter(GetFilterUnit(), bj_groupEnumOwningPlayer, bj_groupRandomConsidered)
endfunction



function GrislyBarrage_SpinCallbackChild takes nothing returns nothing
    local unit Corpse = GetEnumUnit()
    call SetUnitFacingTimed(Corpse, GetUnitFacing(Corpse)+GrislyBarrage_DegreesPerSpinInterval(), GrislyBarrage_SpinInterval())
    set Corpse = null
endfunction

function GrislyBarrage_SpinCallback takes nothing returns nothing
    call ForGroup(udg_GrislyBarrage_SpinGroup, function GrislyBarrage_SpinCallbackChild)
endfunction

function GrislyBarrage_ThrowCallback takes nothing returns nothing
    local timer T = GetExpiredTimer()
    local integer ArrayIndex = GetCSData(T)
    local unit Corpse = GetArrayUnit(ArrayIndex, 1)
    local integer IterationsLeft = GetArrayInt(ArrayIndex, 5)
    local real XMod = GetArrayReal(ArrayIndex, 2) //If these aren&#039;t set to a variable first
    local real YMod = GetArrayReal(ArrayIndex, 3) //They will bug out
    local real X = GetUnitX(Corpse)
    local real Y = GetUnitY(Corpse)
    local group G
    local unit U
    local real Damage
    local string EffectPath
    local string EffectAttach

    if IterationsLeft &gt; 0 then
        call SetArrayInt(ArrayIndex, 5, IterationsLeft-1)
        call SetUnitX(Corpse, X+XMod)
        call SetUnitY(Corpse, Y+YMod)
    else
        set bj_groupEnumOwningPlayer = GetOwningPlayer(Corpse)
        set bj_groupRandomConsidered = GetArrayInt(ArrayIndex, 4)
        set Damage = GrislyBarrage_Damage(bj_groupRandomConsidered)
        set EffectPath = GrislyBarrage_DamageSFXPath(bj_groupRandomConsidered)
        set EffectAttach = GrislyBarrage_DamageSFXAttach(bj_groupRandomConsidered)
 
        set G = CreateGroup()
        call GroupEnumUnitsInRange(G, X, Y, GrislyBarrage_ImpactRadius(bj_groupRandomConsidered), Condition(function GrislyBarrage_ImpactFilter))
        loop
            set U = FirstOfGroup(G)
            exitwhen U == null
            call UnitDamageTarget(Corpse, U, Damage, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL, null)
            call DestroyEffect(AddSpecialEffectTarget(EffectPath, U, EffectAttach))
            call GroupRemoveUnit(G, U)
        endloop
        call DestroyGroup(G)

        call DestroyEffect(AddSpecialEffect(GrislyBarrage_ImpactEffect(bj_groupRandomConsidered), X, Y))

        call GroupRemoveUnit(udg_GrislyBarrage_SpinGroup, Corpse)
        if FirstOfGroup(udg_GrislyBarrage_SpinGroup) == null then
            call PauseTimer(udg_GrislyBarrage_SpinTimer)
        endif
        call RemoveUnit(Corpse)

        call DestroyArray(ArrayIndex)
        call PauseTimer(T)
        call DestroyTimer(T)
    endif

    set T = null
    set Corpse = null
endfunction

function GrislyBarrage_StartThrowCallback takes nothing returns nothing
    local timer T = GetExpiredTimer()
    local integer ArrayIndex = GetCSData(T)
    local unit Corpse = GetArrayUnit(ArrayIndex, 1)
    local integer Level = GetArrayInt(ArrayIndex, 4)
    local real XMod = GetArrayReal(ArrayIndex, 2) //You must set them to a variable before using these in the
    local real YMod = GetArrayReal(ArrayIndex, 3) //Code, else it will bug out

    call SetArrayInt(ArrayIndex, 5, GetArrayInt(ArrayIndex, 5)-1)
    call SetUnitX(Corpse, GetUnitX(Corpse)+XMod)
    call SetUnitY(Corpse, GetUnitY(Corpse)+YMod)
    call SetUnitFlyHeight(Corpse, 0.00, GrislyBarrage_MoveCorpseToTargetSpeed(Level))

    call PauseTimer(T)
    call TimerStart(T, GrislyBarrage_MoveCorpseToTargetInterval(Level), true, function GrislyBarrage_ThrowCallback)

    set T = null
    set Corpse = null
endfunction

function GrislyBarrage_RaiseDetectCast takes nothing returns nothing     
    local unit U = GetTriggerUnit()
    local unit U2 = GetSpellTargetUnit()
    local location L = GetUnitLoc(U2)
    local unit Corpse = CreateCorpse(GetOwningPlayer(U), GetUnitTypeId(U2), GetUnitX(U2), GetUnitY(U2), GetUnitFacing(U2))
    local integer OtherArrayIndex = GetCSData(U)
    local integer Level = GetArrayInt(OtherArrayIndex, 5)
    local real Height = GetRandomReal(GrislyBarrage_MinCorpseFlyHeight(Level), GrislyBarrage_MaxCorpseFlyHeight(Level))
    local integer CrowFormId = GrislyBarrage_CrowFormId()
    local real Time = GrislyBarrage_TimeToLevitateCorpse(Level)
    local real Speed = GrislyBarrage_MoveCorpseToTargetSpeed(Level)
    local timer T = CreateTimer()
    local integer ArrayIndex = NewArray(6, true)
    local real Offset = GetRandomReal(0.00, GrislyBarrage_Radius(Level))
    local real Angle = GetRandomReal(0.00, 6.28318)
    local real X = GetUnitX(Corpse)
    local real Y = GetUnitY(Corpse)
    local real TX = GetArrayReal(OtherArrayIndex, 2)+Offset*Cos(Angle)
    local real TY = GetArrayReal(OtherArrayIndex, 3)+Offset*Sin(Angle)
    local integer Iterations = R2I(Height/Speed/GrislyBarrage_MoveCorpseToTargetInterval(Level))
    local real Scale = GrislyBarrage_CorpseScale(Level)

    call DestroyEffect(AddSpecialEffect(GrislyBarrage_CreationEffect(Level), X, Y))
    call SetUnitScale(Corpse, Scale, Scale, Scale)
    call SetUnitBlendTime(Corpse, 0)
    call SetUnitAnimation(Corpse, &quot;decay flesh&quot;)
    call GroupAddUnit(bj_suspendDecayFleshGroup, Corpse) //Part of the corpse decay stuff which I don&#039;t entirely understand
    call TimerStart(bj_delayedSuspendDecayTimer, 0.05, false, null)

    if FirstOfGroup(udg_GrislyBarrage_SpinGroup) == null then
        call TimerStart(udg_GrislyBarrage_SpinTimer, GrislyBarrage_SpinInterval(), true, function GrislyBarrage_SpinCallback)
    endif
    call GroupAddUnit(udg_GrislyBarrage_SpinGroup, Corpse)

    if TX &lt; GetRectMinX(bj_mapInitialPlayableArea) then
        set TX = GetRectMinX(bj_mapInitialPlayableArea)
    elseif TX &gt; GetRectMaxX(bj_mapInitialPlayableArea) then
        set TX = GetRectMaxX(bj_mapInitialPlayableArea)
    endif
    if TY &lt; GetRectMinY(bj_mapInitialPlayableArea) then
        set TY = GetRectMinY(bj_mapInitialPlayableArea)
    elseif TY &gt; GetRectMaxY(bj_mapInitialPlayableArea) then
        set TY = GetRectMaxY(bj_mapInitialPlayableArea)
    endif

    set Offset = SquareRoot((X-TX)*(X-TX)+(Y-TY)*(Y-TY))/Iterations
    set Angle = Atan2((TY-Y), (TX-X))
    call SetArrayObject(ArrayIndex, 1, Corpse)
    call SetArrayReal(ArrayIndex, 2, Offset*Cos(Angle))
    call SetArrayReal(ArrayIndex, 3, Offset*Sin(Angle))
    call SetArrayInt(ArrayIndex, 4, Level)
    call SetArrayInt(ArrayIndex, 5, Iterations)

    call SetCSData(T, ArrayIndex)
    call TimerStart(T, Time+GrislyBarrage_TopDelay(Level), false, function GrislyBarrage_StartThrowCallback)

    call UnitAddAbility(Corpse, &#039;Avul&#039;)
    call UnitAddAbility(Corpse, &#039;Aloc&#039;)
    call UnitAddAbility(Corpse, GrislyBarrage_CorpseSFXAbilityId())
    call UnitAddAbility(Corpse, CrowFormId)
    call UnitRemoveAbility(Corpse, CrowFormId)
    call SetUnitFlyHeight(Corpse, Height, Height/Time)

    call RemoveLocation(L)
    set L = null
    set U = null
    set U2 = null
    set Corpse = null
    set T = null
endfunction

function GrislyBarrage_MainCallback takes nothing returns nothing
    local timer T = GetExpiredTimer()
    local integer ArrayIndex = GetCSData(T)
    local unit U = GetArrayUnit(ArrayIndex, 1)

    if GetUnitCurrentOrder(U) == OrderId(GrislyBarrage_ChannelOrderString()) then
        call IssueImmediateOrder(GetArrayUnit(ArrayIndex, 4), &quot;instant&quot;)
    else
        call RemoveUnit(GetArrayUnit(ArrayIndex, 4))

        call PauseTimer(T)
        call DestroyArray(ArrayIndex)
        call DestroyTimer(T)
    endif

    set T = null
    set U = null    
endfunction

function GrislyBarrage_Cast takes nothing returns nothing
    local unit U = GetTriggerUnit()
    local real X = GetUnitX(U)
    local real Y = GetUnitY(U)
    local location L = GetSpellTargetLoc()
    local real X2 = GetLocationX(L)
    local real Y2 = GetLocationY(L)
    local timer T = CreateTimer()
    local integer Level = GetUnitAbilityLevel(U, GrislyBarrage_AbilityId())
    local unit Dummy = CreateUnit(GetOwningPlayer(U), GrislyBarrage_DummyUnitId(), X, Y, 0.00)
    local integer ArrayIndex = GrislyBarrage_DummyAbilityId()

    call UnitAddAbility(Dummy, ArrayIndex)
    call SetUnitAbilityLevel(Dummy, ArrayIndex, Level)
    call UnitRemoveAbility(Dummy, &#039;Amov&#039;)

    set ArrayIndex = NewArray(7, true)
    call SetArrayObject(ArrayIndex, 1, U)
    call SetArrayReal(ArrayIndex, 2, X2)
    call SetArrayReal(ArrayIndex, 3, Y2)
    call SetArrayObject(ArrayIndex, 4, Dummy)
    call SetArrayInt(ArrayIndex, 5, Level)
    call SetArrayObject(ArrayIndex, 6, T)

    call SetCSData(Dummy, ArrayIndex)
    call SetCSData(T, ArrayIndex)
    call TimerStart(T, GrislyBarrage_ThrowInterval(Level), true, function GrislyBarrage_MainCallback)

    if GrislyBarrage_LevitateOnCast(Level) then
        call IssueImmediateOrder(Dummy, &quot;instant&quot;)
    endif

    call RemoveLocation(L)
    set L = null
    set U = null
    set T = null
    set Dummy = null
endfunction

//==========================================================================================
function InitTrig_GrislyBarrage takes nothing returns nothing
    local trigger RaiseDeadDetect = CreateTrigger()

    set gg_trg_GrislyBarrage = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(gg_trg_GrislyBarrage, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(gg_trg_GrislyBarrage, Condition(function GrislyBarrage_CastConditions))
    call TriggerAddAction(gg_trg_GrislyBarrage, function GrislyBarrage_Cast)

    call TriggerRegisterAnyUnitEventBJ(RaiseDeadDetect, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(RaiseDeadDetect, Condition(function GrislyBarrage_RaiseDetectCastConditions))
    call TriggerAddAction(RaiseDeadDetect, function GrislyBarrage_RaiseDetectCast)

    set RaiseDeadDetect = null
endfunction


Spell Download!
(I have included a text file with the spell's code because my code (written on a Mac) gets fucked up in the World Editor.)
 

emjlr3

Change can be a good thing
Reaction score
395
no submissions past pyros will be accepted

contest over

grading will begin if and when i decide to do it alone, since no one else wanted to help

voting may start in the next few days or so, can't really do a poll though since there are too many entries

FYI - 85 deleted posts in this thread, and it is still full of boobery....
 

Demonwrath

Happy[ExtremelyOverCommercializ ed]HolidaysEveryon
Reaction score
47
Umm I have a suggestion ^_^

For the poll, you could lock this thread, then make a new one with links to all of the submitted spells. That what FireEffect did for his texturing contest and that seemed to work out well.

And I hope you find soemone to hel pyour judge, I know yu hosted this contest, but all the spells I think is too much for one person.
 

Pyrogasm

There are some who would use any excuse to ban me.
Reaction score
134
That does seem to be the best option, I think.
 

emjlr3

Change can be a good thing
Reaction score
395
hopefully I find time to post a poll thread in the next day or two

keep your eyes peeled
 
Reaction score
456
I just noticed a typo in my spells description, kinda funny one:

"How far the far the waves will go,
depends on the time spent on channeling.
"
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
My spell's bug can be easily debuged by increasing the cooldown. =_=''
The cooldown that is more than 5 sec.
 

Pyrogasm

There are some who would use any excuse to ban me.
Reaction score
134
I didn't technically vote, just posted my initial thoughts.
 

Pyrogasm

There are some who would use any excuse to ban me.
Reaction score
134
Are you kidding me?! Why would you not vote? Everyone should vote and review each others' spells; to do otherwise would simply show a lack of respect for the other entrants.

The only sensible thing regarding not voting is the inability to vote for yourself.
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
emjlr3 said:
Any and all posts not related to spell voting will be deleted, the poster will be minus repped, and if they are a contestant in the contest, they will be disqualified from this and the next contest, NO EXCEPTIONS
Will we be able to vote?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top