[Contest] Official Christmas Spell Contest

Reaction score
456
>cool effects uberplayer
Thanks :).. The effects can be totally changed from the spell's Configuration Menu.. from lava terrain to firey explosions.
 
Reaction score
456
No problem with me. Spells are made to be used.

EDIT://Oh, and if you use it in your map, I suggest you to get the right version from it's thread. The version in the spell map doesn't use Cohadar's BorderSafety, so it crashes if a unit goes over map boundaries.
 

DrinkSlurm

Eat Bachelor Chow!
Reaction score
50
Cool Whip

update 12/31/07: Aiming explanation added

Description:
[Pseudo-channeling spell]
Summons a magical tentacle made of ice particles that whips back and forth in an enlarging sine wave shape. The Hero cannot move nor attack nor cast any spells while the whip is active, but the Hero CAN turn and rotate in order to aim the whip. Enemy units that are hit by the whip take up to 20 damage per second and are briefly slowed by 50%.
Level 1 - creates a small whip that extends up to a distance of 630 away and lasts for 6 seconds.
Level 2 - creates a medium whip that extends up to a distance of 810 away and lasts for 8 seconds.
Level 3 - creates a large whip that extends up to a distance of 990 away and lasts for 10 seconds.

Coding: JASS
Requires: vJASS
Uses: ABC by Cohadar, CSSafety by Vexorian
Leaks: Leakless, I hope
Multi Instanceability: MUI
Lag-susceptibility: some potential for lag if there are many simultaneous casts
Import Difficulty: easy (instructions included)

Triggers:
JASS:
//===========================================================================
//================================ SPELL ====================================
//============================ Instructions =================================
//===========================================================================
// MUI; requires vJASS; uses ABC and CSSafety
//===========================================================================
// 1. Go to the Object Editor, and copy + paste the following:
//    Units
//       * Dummy Caster
//       * Whip Segment
//    Abilities
//       * Cool Whip: Add this ability to the Hero; make sure the "Base Order ID"
//         does not conflict with any other spell on the Hero.
//       * Silence (for Dummy): make sure that the buff is set to the custom
//         "Cool Whip (Caster)" buff. This is the buff that will show on the Hero.
//       * Permanent Immolation (for Whip Segment): make sure that the buff is set
//         to the custom "Permanent Immolation (Target)" buff.
//       * Slow Aura (for Whip Segment)
//    Buffs
//       * Cool Whip (Caster)
//       * Permanent Immolation (Target): This buff applies the snowflakes-looking
//         effects on targets that are hit by the whip.
// 2. Copy the following triggers:
//       * ABC: this is Cohadar's ABC Struct Attachment system
//       * This trigger
// 3. Other options:
//       * Hero: Note that you may want to change "Stats - Can Flee" to False to
//         make this skill a little easier to use. Otherwise, while the Hero is
//         silenced, it will tend to run away from enemies since it can't attack. 
// 4. To adjust the balance of the skill, you can change some of the following
//    values:
//    Abilities
//       * Cool Whip: Cooldown, Mana Cost
//       * Permanent Immolation (for Whip Segment): Damage, damage interval, AoE
//       * Slow Aura (for Whip Segment): Attack Speed Factor, Movement Speed Factor, AoE
// 5. Make sure that the rawcodes specified below reference the proper units,
//    abilities, or buffs.
scope CWScope
globals
    constant integer ab_Hero = 'A000' //Ability ID of "Cool Whip"
    constant integer un_Dmmy = 'h000' //Unit ID of "Dummy Caster"
    constant integer ab_Slnc = 'A001' //Ability ID of "Silence (for Dummy)"
//    constant integer bf_Cool = 'B000' //Buff ID of "Cool Whip (Caster)"
    constant integer un_Whip = 'h001' //Unit ID of "Whip Segment"
    constant integer ab_Immo = 'A002' //Ability ID of "Permanent Immolation (for Whip Segment)"
    constant integer ab_Slow = 'A003' //Ability ID of "Slow Aura (for Whip Segment)" 
    group tempgroup = CreateGroup()
endglobals

//###########################################################################
//############## This is the CSSafety system by Vexorian ####################
globals
    private timer array T
    private integer N = 0
endglobals

private function NewTimer takes nothing returns timer
    if (N==0) then
        return CreateTimer()
    endif
    set N=N-1
    return T[N]
endfunction

private function ReleaseTimer takes timer t returns nothing
    call PauseTimer(t)
    if (N==8191) then
        debug call BJDebugMsg("Warning: Timer stack is full, destroying timer!!")
//stack is full, the map already has much more troubles than the chance of bug
        call DestroyTimer(t)
    else
    set T[N]=t
    set N=N+1
    endif    
endfunction
//####################### end of the CSSafety system ########################
//###########################################################################

//===========================================================================
struct CWstruct
    unit hero
    integer c1
    integer c2
    group cwgroup
endstruct
//===========================================================================
function CW_Cond takes nothing returns boolean
    return GetSpellAbilityId() == ab_Hero
endfunction

function CW_TimerActions takes nothing returns nothing
    local CWstruct data
    local timer t = GetExpiredTimer()
    local real heroX
    local real heroY
    local real face_rad
    local unit u
    local integer cv
    local real dX
    local real dY
    local real dist
    local real ang_rad
    local real X
    local real Y
//Retrieve values from struct "data" that is attached to the timer "t"
    set data = GetTimerStructA(t)
    set heroX = GetUnitX(data.hero)
    set heroY = GetUnitY(data.hero)
    set face_rad = GetUnitFacing(data.hero) * 0.01745
    call SetUnitAnimation(data.hero, "spell")
    call GroupAddGroup(data.cwgroup, tempgroup)
    loop
        set u = FirstOfGroup(tempgroup)
        exitwhen u == null
        set cv = GetUnitUserData(u)
        set dX = cv * 30.00
        set dY = Sin(cv * 0.52360) * cv * (IAbsBJ(ModuloInteger((data.c1 + 10), 40) - 20) - 10)
        set dist = SquareRoot(dX * dX + dY * dY)
        set ang_rad = Atan2(dY, dX) + face_rad
        set X = heroX + dist * Cos(ang_rad)
        set Y = heroY + dist * Sin(ang_rad)
        call SetUnitPosition(u, X, Y)
        call GroupRemoveUnit(tempgroup, u)
    endloop
    set data.c1 = data.c1 + 1
//If Hero is dead, set value of data.c1 to data.c2 and kill whip segments
    if GetUnitState(data.hero, UNIT_STATE_LIFE) <= 0 then
        set data.c1 = data.c2
        call GroupAddGroup(data.cwgroup, tempgroup)
        loop
            set u = FirstOfGroup(tempgroup)
            exitwhen u == null
            call KillUnit(u)
            call GroupRemoveUnit(tempgroup, u)
        endloop
    endif
//If data.c1 has reached the value of data.c2, stop repeating timer and reset Hero's animation
    if data.c1 >= data.c2 then
        if GetUnitState(data.hero, UNIT_STATE_LIFE) <= 0 then
            call SetUnitAnimation(data.hero, "death")
        else
            call SetUnitAnimation(data.hero, "stand")
        endif
        call ClearTimerStructA(t)
        call data.destroy()
        call ReleaseTimer(t)
    endif
endfunction

function CW_Actions takes nothing returns nothing
    local CWstruct data = CWstruct.create()
    local real heroX
    local real heroY
    local real face_rad
    local real X
    local real Y
    local integer i = 1
    local integer whipcount
    local real dur
    local unit u 
    local timer t = NewTimer()
    local group cwgroup
//Set struct values for use in other functions
    set data.hero = GetTriggerUnit()
    set data.cwgroup = CreateGroup()
    set data.c1 = 0
    set heroX = GetUnitX(data.hero)
    set heroY = GetUnitY(data.hero)
    set face_rad = GetUnitFacing(data.hero) * 0.01745
    set whipcount = GetUnitAbilityLevel(data.hero, ab_Hero) * 6 + 15
    set dur = GetUnitAbilityLevel(data.hero, ab_Hero) * 2.00 + 4.00
    set u = CreateUnit(GetOwningPlayer(data.hero), un_Dmmy, heroX, heroY, 0)
    call UnitApplyTimedLife(u, 'BTLF', 1.00)
    call UnitAddAbility(u, ab_Slnc)
    call SetUnitAbilityLevel(u, ab_Slnc, GetUnitAbilityLevel(data.hero, ab_Hero))
    call IssuePointOrder(u, "silence", heroX, heroY)
    call SetUnitAnimation(data.hero, "spell")
    set u = null
    loop
        exitwhen i > whipcount
        set X = heroX + i * 30.00 * Cos(face_rad)
        set Y = heroY + i * 30.00 * Sin(face_rad)
        set u = CreateUnit(GetOwningPlayer(data.hero), un_Whip, X, Y, 0) 
        call UnitApplyTimedLife(u, 'BTLF', dur)
        call SetUnitTimeScale(u, 0.20)
        call UnitAddAbility(u, ab_Immo)
        call UnitAddAbility(u, ab_Slow)
        call SetUnitUserData(u, i)
        call GroupAddUnit(data.cwgroup, u)
        set u = null
        set i = i + 1
    endloop
//Set one more struct value for use in other functions
    set data.c2 = R2I(dur / 0.03)
//Assign struct values "data" to the timer "t"
    call SetTimerStructA(t, data)
    call TimerStart(t, 0.03, true, function CW_TimerActions)
//Null local variables
    set t = null
endfunction

//===========================================================================
function InitTrig_CoolWhip takes nothing returns nothing
    set gg_trg_CoolWhip = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(gg_trg_CoolWhip, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(gg_trg_CoolWhip, Condition(function CW_Cond))
    call TriggerAddAction(gg_trg_CoolWhip, function CW_Actions)
endfunction
endscope

Screenshot:


My name is DrinkSlurm, and I approve this message.

Note: A comment has been made about how difficult it is to aim the whip. Here's an explanation:

When the spell is cast, a dummy casts a modified Silence on the Hero. The modified Silence disables attacks and spells and sets movement speed to 0. During this time, if you try to move to a specific point and if there is some kind of obstruction in the way, the Hero will try to go around the obstruction due to the pathing AI. That is why the Hero sometimes appears to face a different direction from your click point.

To aim the spell properly, you need to take the pathing AI into consideration. Click directly on the nearest enemy unit and the Hero will turn to face it directly--no problem (assuming there are no other pathing obstructions in the way). If you want to face another direction, you must click on the ground between your Hero and any obstructions. Once you get used to it, aim the whip should not be a problem.
 

Attachments

  • [Contest Entry] Cool Whip v1.00.w3x
    64.8 KB · Views: 261

Bloodydood

New Member
Reaction score
14
Bloodydood's X-mas Spell Contest Entry

Ice Cage

Leakless? 99% yes .
Eyecandy? 85% yes.
Complicated? 70% yes.
Pure Pwnage? 101% yes.

No screenshots for you!
 

Attachments

  • Bloodydood's Christmas Spell Contest Entry - Ice Cage.w3x
    43.1 KB · Views: 253

The Undaddy

Creating with the power of rage
Reaction score
55
Kind of an update to my spell,improved the tooltip and stuff.I changed the map in the original post,thats ok,right?
 

Pyrogasm

There are some who would use any excuse to ban me.
Reaction score
134
I think this should be cleared up: The deadline is 12:00 AM, but...
  • Is it the midnight between the 25th and the 26th?
  • Or is it the midnight between the 26th and the 27th?
  • What time-zone? (I would assume EST)
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
The deadline is 2 weeks from now, December 26th, 2007 at midnight.

That's the night between the 26th and the 27th. GMT? Unless Emjlr3 says otherwises -5 GMT.
 

emjlr3

Change can be a good thing
Reaction score
395
roughly 16 hours left, as per my Eastern US Time
 

Trollvottel

never aging title
Reaction score
262
Überplayer your spell can push enemys out of the map... you should fix it until the deadline.
 
Reaction score
456
Thanks, you're not the first one who noticed. Hope the deadline is not too soon..
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
I guess I need a better submission, here it is.

Shiva Faerie

Spawn Shiva Faeries that protects the caster. Any unit came upon the faeries will suffer damage and disabling of movement.

Faerie Summoned - Level x 3
Faerie Moving Radius - Level x 300
Damage - Level x 50 per second
Movement Disable Duration - Level x 1
Duration - Level x 10 second


sfql8.png


JASS:
scope ShivaFaerie

//===================================================================================
//                                    Shiva Faerie                                 
//                                by kentchow75/~GaLs
//===================================================================================
//
// Implemention Instruction
// 
//--------------------------------------------------------------------------------
// -Object Needed to be copied from Object Editor to your map.
//  [ Ability ]
//  1. Shiva Faerie [R]
//  2. Frozening [F] [Shiva Faerie]
//
//  [ Buff ]
//  1. Frozen [Shiva Faerie]
//
//  [ Unit ]
//  1. Dummy Frozer [Shiva Faerie]
//  2. Shiva Faerie [Shiva Faerie]
//--------------------------------------------------------------------------------
// -Trigger  
//  1. Copy this whole trigger to your map.
//  2. Copy the HSAS trigger to your map if you don't have 1 in your map. (HSAS v3.30 or above required)
//  3. CSSafety
//--------------------------------------------------------------------------------
// -Requirements
//  1. Jass NewGen WorldEditor from <a href="http://www.wc3campaigns.net" target="_blank" class="link link--external" rel="nofollow ugc noopener">www.wc3campaigns.net</a>. ( v4b and above )
//--------------------------------------------------------------------------------
// -Credits
//  1. Thanks to PandaMine for his brilliant HSAS system.
//--------------------------------------------------------------------------------
//===================================================================================
//  Implementation End                                 
//===================================================================================

globals

//*******************************************************************************************
//  Configuration  (This is where you need to edit to make the spell works in your map)
//*******************************************************************************************
//=================================================================
// &lt;- Rawcode -&gt; //

    private constant integer SF_ID = &#039;A000&#039;
    //Rawcode of the Shiva Faerie [R]. (Ability)
    
    private constant integer SF_FROZENING = &#039;A001&#039;
    //Rawcode of the Frozening [F] [Shiva Faerie]. (Ability)
    
    private constant integer SF_FAERIE = &#039;h000&#039;
    //Rawcode of Shiva Faerie. (Unit)
    
    private constant integer SF_FROZER = &#039;h001&#039;
    //Rawcode of Dummy Frozer [Shiva Faerie]. (Unit)
    
    private constant integer SF_FROZENID = &#039;B000&#039;
    //Rawcode of the Frozen [Shiva Faerie]. (Buff)
    
// &lt;- Rawcode End -&gt;//    
//=================================================================
// &lt;- Speed -&gt; //
    
    private constant real SF_FLYSPEED = .04
    // Flying speed of those faeries. (The lower the number is, the faster it flies.)

//&lt;- Speed End -&gt;//
//=================================================================
endglobals

//=================================================================
// &lt;- Faerie Number -&gt; //

private constant function FaerieNum takes integer lvl returns integer
    return lvl * 3 //The formula for calculating how many faerie to be created. (Level x 3)
endfunction
//=================================================================

//=================================================================
// &lt;- Maximun Radius -&gt; //

private constant function MaxRadius takes integer lvl returns real
    return lvl * 300. //The max radius of how far the faerie will fly around you. (Level x 300)
endfunction
//=================================================================

//=================================================================
// &lt;- Duration -&gt; //
private constant function Duration takes integer lvl returns real
    return lvl * 10. //How long will the spell effect last. (Level x 10 second)
endfunction
//=================================================================

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

// -----------------------&gt; Do not edit anything below this line. &lt;-----------------------//
// -----------------------&gt; Do not edit anything below this line. &lt;-----------------------//
// -----------------------&gt; Do not edit anything below this line. &lt;-----------------------//

private struct ShiFae
unit caster
unit array Faerie[300]
integer level
integer MaxFaerie
real MaxRad
real Dura
real cx
real cy
real array fnx[300]
real array fny[300]
trigger froze
timer Fmove
timer DS

    //---------------------------------------------------------------------------------------
    method offsetX takes real source, real dist, real angle returns real
        return source + dist * Cos(angle * bj_DEGTORAD)
    endmethod
    
    method offsetY takes real source, real dist, real angle returns real
        return source + dist * Sin(angle * bj_DEGTORAD)
    endmethod
    
    method AngBtwReal takes real x1, real y1, real x2, real y2 returns real
        return bj_RADTODEG * Atan2(y2 - y1, x2 - x1)
    endmethod
    
    method DistBtwReal takes real x1, real y1, real x2, real y2 returns real
    local real dx = x2 - x1
    local real dy = y2 - y1
        return SquareRoot(dx * dx + dy * dy)
    endmethod
    //---------------------------------------------------------------------------------------


    static method create takes unit cas returns ShiFae
    local ShiFae sf = ShiFae.allocate()
    
        set sf.caster = cas
        set sf.level = GetUnitAbilityLevel(cas,SF_ID)
        set sf.cx = GetWidgetX(cas)
        set sf.cy = GetWidgetY(cas)
        set sf.froze = CreateTrigger()
        set sf.Fmove = CreateTimer()
        set sf.DS = CreateTimer()
        set sf.MaxFaerie = FaerieNum(sf.level)
        set sf.MaxRad = MaxRadius(sf.level)
        set sf.Dura  = Duration(sf.level)
        
            call AttachStruct1(sf.froze,sf)
        
    return sf
    endmethod
    
    method onDestroy takes nothing returns nothing
        call DestroyTrigger(.froze)
        call PauseTimer(.Fmove)
        call DestroyTimer(.Fmove)
        call DestroyTimer(.DS)
    endmethod
    
    static method frozeAct takes nothing returns nothing
    local trigger t = GetTriggeringTrigger()
    local ShiFae sf = GetAttachedStruct1(t)
    local unit u 
    
        if GetUnitAbilityLevel(GetTriggerUnit(),SF_FROZENID) == 0 then
        set u = CreateUnit(GetOwningPlayer(sf.caster),SF_FROZER,GetWidgetX(GetTriggerUnit()),GetWidgetY(GetTriggerUnit()),GetUnitFacing(GetTriggerUnit()))
            call UnitAddAbility(u,SF_FROZENING)
            call SetUnitAbilityLevel(u,SF_FROZENING,sf.level)
            call UnitApplyTimedLife(u,&#039;BTLF&#039;,1)
            call IssueTargetOrder(u,&quot;entanglingroots&quot;,GetTriggerUnit())
        endif
        
    set u = null
    set t = null
    endmethod
    
    static method DSAct takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local ShiFae sf = GetAttachedStruct1(t)
    
        call sf.destroy()
    
    set t = null
    endmethod
    
endstruct

//-----------------------------------------------------------------------
private function FmoveAct takes nothing returns nothing
local timer t = GetExpiredTimer()
local ShiFae sf = GetAttachedStruct1(t)
local integer start = 1
local real fx
local real fy
local real randomAngle
local real randomRadius
local real DBR //(Distance Between Real)
local real ABR //(Angle Between Real)

    loop
    exitwhen start&gt;sf.MaxFaerie
        set fx = GetWidgetX(sf.Faerie[start])
        set fy = GetWidgetY(sf.Faerie[start])
        set DBR = sf.DistBtwReal(fx,fy,sf.fnx[start],sf.fny[start])
        
        if  DBR &lt;= 50 then
            set randomAngle = GetRandomReal(0,360)
            set randomRadius = GetRandomReal(0,sf.MaxRad)
            set sf.fnx[start] = sf.offsetX(GetUnitX(sf.caster),randomRadius,randomAngle)   
            set sf.fny[start] = sf.offsetY(GetUnitY(sf.caster),randomRadius,randomAngle)
                        
            set ABR = sf.AngBtwReal(fx,fy,sf.fnx[start],sf.fny[start])
            if fx != sf.fnx[start] then
                call SetUnitX(sf.Faerie[start],sf.offsetX(fx,12,ABR))
            endif
            if fy != sf.fny[start] then
                call SetUnitY(sf.Faerie[start],sf.offsetY(fy,12,ABR))
            endif
        endif
            
        if DBR !=0 then
            set ABR = sf.AngBtwReal(fx,fy,sf.fnx[start],sf.fny[start])
            if fx != sf.fnx[start] then
                call SetUnitX(sf.Faerie[start],sf.offsetX(fx,12,ABR))
            
            endif
            if fy != sf.fny[start] then
                call SetUnitY(sf.Faerie[start],sf.offsetY(fy,12,ABR))                                
            endif
        endif

    set start = start+1
    endloop

set t = null
endfunction

private function SFCond takes nothing returns boolean
    return GetSpellAbilityId() == SF_ID
endfunction

private function SFAct takes nothing returns nothing
local ShiFae sf = ShiFae.create(GetSpellAbilityUnit())
local integer start = 1
local real randomAngle
local real randomRadius
    
    //&lt;- Create Faerie -&gt;//
    loop
    exitwhen start&gt;sf.MaxFaerie
            
        set sf.Faerie[start] = CreateUnit(GetOwningPlayer(sf.caster),SF_FAERIE,sf.cx,sf.cy,GetRandomReal(0,360))
        call UnitApplyTimedLife(sf.Faerie[start],&#039;BTLF&#039;,sf.Dura)
        
        call TriggerRegisterUnitInRange(sf.froze,sf.Faerie[start],100,null)
        
        set randomAngle = GetRandomReal(0,360)
        set randomRadius = GetRandomReal(0,sf.MaxRad)
        set sf.fnx[start] = sf.offsetX(GetUnitX(sf.Faerie[start]),randomRadius,randomAngle)
        set sf.fny[start] = sf.offsetY(GetUnitY(sf.Faerie[start]),randomRadius,randomAngle)
        
        
    set start = start+1
    endloop
    //&lt;- Create Faerie End -&gt;//
    
    call TriggerAddAction(sf.froze,function ShiFae.frozeAct)
    
    call AttachStruct1(sf.Fmove,sf)
    call AttachStruct1(sf.DS,sf)
    call TimerStart(sf.Fmove,SF_FLYSPEED,true,function FmoveAct)
    call TimerStart(sf.DS,sf.Dura,false,function ShiFae.DSAct)

endfunction

//===========================================================================
function InitTrig_Shiva_Faerie takes nothing returns nothing
local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(t,Condition(function SFCond))
    call TriggerAddAction(t, function SFAct)
set t = null
endfunction

endscope



Download Here!

Sorry Cohadar, don't angry with me. :eek:
 

Trollvottel

never aging title
Reaction score
262
Question: you could use a normal carrion swarm and add bash to the locust and change the arts, couldn't you?
 
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