• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Zephyr Contest #10 - What lies on the other side

Status
Not open for further replies.

Kyrbi0

Arena Moderator
Level 45
Joined
Jul 29, 2008
Messages
9,502
Quick question:
Create an ability that demonstrates a unique way of teleportation or summoning through a portal.
Is that "a unique way of teleportation OR summoning through a portal", or is it supposed to read like "a unique way of (teleportation or summoning) through a portal"?

I'm hoping the former, since I have a neat idea for teleportation, but it doesn't involve a portal specifically. Besides, a dozen different "Portal" entries sounds a little redundant, eh? : )
 
WIP

So far, the idea is that a portal is created at the target point which then causes disruptions around it, damaging units around the portal. If a units mana becomes less than the threshold value, minions will be summoned from the portal. Then after the max rotations of the energy disruption around the portal (which is also the time that the portal requires to be fully opened), a powerful creature will be summoned...

JASS:
/*

    Rift of Mana
    by Adiktuz
    
    Requires: 
    
    -> Nova by Adiktuz
    -> SpellEffectEvent by Bribe
    
*/

library RiftOfMana initializer init requires Nova, SpellEffectEvent

    globals
        private constant integer SPELL_ID = 'A000'
        private constant integer MINION_ID = 'h000'
        private constant integer SUMMON_ID = 'h001'
        private constant string FX_1 = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl"
        private constant string FX_2 = ""
        private constant attacktype AT = ATTACK_TYPE_MAGIC
        private constant damagetype DT = DAMAGE_TYPE_MAGIC
        private constant boolean NO_MP_HIT = false
        private constant boolean ZERO_MP_HIT = true
        private constant key KEY
    endglobals
    
    //Configuration Functions
    
    private function GetRadius takes unit caster, integer level returns real
        return level * 100.0
    endfunction
    
    private function GetNofFX1 takes unit caster, integer level returns real
        return 12.0
    endfunction
    
    private function GetDelayBase takes unit caster, integer level returns real
        return 0.12
    endfunction
    
    private function GetHeight takes unit caster, integer level returns real
        return 10.0
    endfunction
    
    private function GetFAoe takes unit caster, integer level returns real
        return GetHeroInt(caster,true) + 50.0*level
    endfunction
    
    private function GetHPDamage takes unit caster, integer level returns real
        return GetHeroInt(caster,true)*0.1*level
    endfunction
    
    private function GetMPDamage takes unit caster, integer level returns real
        return GetHeroInt(caster,true)*level*1.0
    endfunction
    
    private function GetThreshold takes unit caster, integer level returns real
        return 50.0*level
    endfunction
    
    private function GetScale takes unit caster, integer level returns real
        return 1.0
    endfunction
    
    private function GetMinionDuration takes unit caster, integer level returns real
        return 5.0*level
    endfunction
    
    private function GetSummonDuration takes unit caster, integer level returns real
        return 20.0*level
    endfunction
    
    private function GetRotations takes unit caster, integer level returns integer
        return 5*level
    endfunction
    
    private function Fire takes nothing returns nothing
        local unit u = GetTriggerUnit()
        local integer level = GetUnitAbilityLevel(u,SPELL_ID)
        local integer i = 0
        local integer i2 = 0
        local integer rotations = GetRotations(u,level)
        local real x = GetSpellTargetX()
        local real y = GetSpellTargetY()
        local real delaybase = GetDelayBase(u,level)
        local real offset = GetRadius(u,level)
        local real nfx1 = GetNofFX1(u,level)
        local real angle = (360.0 / nfx1)*bj_DEGTORAD
        local real faoe = GetFAoe(u,level)
        local real scale = GetScale(u,level)
        local real damage = GetHPDamage(u,level)
        local real height = GetHeight(u,level)
        local real delay2 = 0.0
        loop
            exitwhen i2 == rotations
            loop
                exitwhen i == nfx1
                call NovaSystem.SimpleCreateDelay(u, x + Cos(angle*i)*offset, y + Sin(angle*i)*offset, delay2 + delaybase*i, 0.0, faoe, height,/*
                */ damage, scale, FX_1, AT, DT, SPELL_ID)
                set i = i + 1
            endloop
            set i2 = i2 + 1
            set delay2 = i2*delaybase*nfx1
            set i = 0
        endloop
        set u = null
    endfunction
    
    //function that is run when a unit is damaged by the rotating edge of the portal
    //used Static ifs to minimize after-compilation if-then-elses
    
    private function OnDamage takes nothing returns nothing
        local NovaSystem nova = NovaSystem.data
        local integer level = GetUnitAbilityLevel(nova.caster,SPELL_ID)
        local real mana = GetUnitState(nova.filter, UNIT_STATE_MANA)
        local real manadamage = GetMPDamage(nova.caster,level)
        local real threshold = GetThreshold(nova.caster,level)
        call SetUnitState(nova.filter, UNIT_STATE_MANA, mana - manadamage)
        static if NO_MP_HIT then
            static if ZERO_MP_HIT then
                if mana <= threshold then
                    call UnitApplyTimedLife(CreateUnit(nova.owner,MINION_ID,GetUnitX(nova.filter),GetUnitY(nova.filter),0.0), 'BTLF', GetMinionDuration(nova.caster,level))
                endif
            else
                if mana <= threshold and mana > 0.0 then
                    call UnitApplyTimedLife(CreateUnit(nova.owner,MINION_ID,GetUnitX(nova.filter),GetUnitY(nova.filter),0.0), 'BTLF', GetMinionDuration(nova.caster,level))
                endif
            endif
        else
            if GetUnitState(nova.filter, UNIT_STATE_MAX_MANA) > 0.0 then
                static if ZERO_MP_HIT then
                    if mana <= threshold then
                        call UnitApplyTimedLife(CreateUnit(nova.owner,MINION_ID,GetUnitX(nova.filter),GetUnitY(nova.filter),0.0), 'BTLF', GetMinionDuration(nova.caster,level))
                    endif
                else
                    if mana <= threshold and mana > 0.0 then
                        call UnitApplyTimedLife(CreateUnit(nova.owner,MINION_ID,GetUnitX(nova.filter),GetUnitY(nova.filter),0.0), 'BTLF', GetMinionDuration(nova.caster,level))
                    endif
                endif
            endif
        endif
    endfunction
    
    //function that is run when the portal reaches the max number of rotations
    
    private function OnFinish takes nothing returns nothing
        call BJDebugMsg("HERE COMES THE BIG BAD BOSS!!!")
    endfunction
    
    private function init takes nothing returns nothing
        call RegisterSpellEffectEvent(SPELL_ID, function Fire)
        call NovaSystem.RegisterOnDamage(SPELL_ID, function OnDamage)
        call NovaSystem.RegisterOnFinish(KEY, function OnFinish)
    endfunction
    
endlibrary
 
Contest Entry - Adiktuz

Well I guess this would be my entry. Map file is attached.

Description:
JASS:
Creates a portal at the target point that connects to another dimension. The portal
    causes energy disruptions around the area, damaging nearby enemies and saps away
    their mana. If the mana of affected enemies drop below the threshold value, 
    minions are summoned from the portal. When the portal fully opens, a powerful
    creature is summoned then the portal suddenly closes.


attachment.php




JASS:
/*

    Rift of Mana
    by Adiktuz
    
    Requires: 
    
    -> Nova by Adiktuz
    -> SpellEffectEvent by Bribe
    
    Description:
    
    Creates a portal at the target point that connects to another dimension. The portal
    causes energy disruptions around the area, damaging nearby enemies and saps away
    their mana. If the mana of affected enemies drop below the threshold value, 
    minions are summoned from the portal. When the portal fully opens, a powerful
    creature is summoned then the portal suddenly closes.
    
    How to import:
    
    1)Copy the Spell and Nova trigger folders to your map 
    2)Import the dummy.mdx and copy paste the dummy unit in case you don't have one 
    3)Configure to your liking
    
*/

library RiftOfMana initializer init requires Nova, SpellEffectEvent

    //Configuration globals

    globals
        //Rawcode of the spell
        private constant integer SPELL_ID = 'A000' 
        //Rawcode of the minion
        private constant integer MINION_ID = 'h000' 
        //Rawcode of the final summon
        private constant integer SUMMON_ID = 'h001'
        //Path to the special effect that will be used as the "border" of the portal
        private constant string FX_1 = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl"
        //Path to the special effect that will be used as the center of the portal
        private constant string FX_2 = "Abilities\\Spells\\Orc\\Voodoo\\VoodooAura.mdl"
        //Path to the special effect that will be created when the final summoning is done
        private constant string FX_3 = "Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl"
        //Attacktype of the portal's damage
        private constant attacktype AT = ATTACK_TYPE_MAGIC
        //Damagetype of the portal's damage
        private constant damagetype DT = DAMAGE_TYPE_MAGIC
        //Can the portal hit enemies that has no mp value?
        private constant boolean NO_MP_HIT = false
        //Can the portal hit enemies that has zero mp?
        private constant boolean ZERO_MP_HIT = false
        //Do not edit this one
        private constant key KEY
    endglobals
    
    //Configuration Functions
    
    //Returns the radius of the portal, which is the distance of the center of the FX_1
    //from the target point
    private function GetRadius takes unit caster, integer level returns real
        return level * 100.0
    endfunction
    
    //Returnss the number of effects created at the portal's border
    //Remember that each border deals damage
    private function GetNofFX1 takes unit caster, integer level returns real
        return 12.0
    endfunction
    
    //Returns the delay in between the creation of each border
    private function GetDelayBase takes unit caster, integer level returns real
        return 0.12
    endfunction
    
    //Returns the height at which the border models are created
    private function GetHeight takes unit caster, integer level returns real
        return 10.0
    endfunction
    
    //Returns the height at which the portal model is created
    private function GetPortalHeight takes unit caster, integer level returns real
        return 30.0
    endfunction
    
    //Returns the aoe at which each border can deal damage
    private function GetFAoe takes unit caster, integer level returns real
        return GetHeroInt(caster,true) + 50.0*level
    endfunction
    
    //Returns the HP damage dealt by each border
    private function GetHPDamage takes unit caster, integer level returns real
        return GetHeroInt(caster,true)*0.1*level
    endfunction
    
    //Returns the MP damage dealt by each border
    private function GetMPDamage takes unit caster, integer level returns real
        return GetHeroInt(caster,true)*level*1.0
    endfunction
    
    //Returns the value of mana at which if the enemies hit by the border
    //goes below, minions will be summoned
    private function GetThreshold takes unit caster, integer level returns real
        return 50.0*level
    endfunction
    
    //Returns the scale of the border models
    private function GetScale takes unit caster, integer level returns real
        return 1.0
    endfunction
    
    //Returns the scale of the portal model
    private function GetPortalScale takes unit caster, integer level returns real
        return 0.8 + 0.2*level
    endfunction
    
    //Returns the summon duration of the minions
    private function GetMinionDuration takes unit caster, integer level returns real
        return 5.0*level
    endfunction
    
    //Returns the summon duration of the final summon
    private function GetSummonDuration takes unit caster, integer level returns real
        return 20.0*level
    endfunction
    
    //Returns the number of border rotations
    //Portal duration = Rotations*delaybase*NumberOfBorders
    private function GetRotations takes unit caster, integer level returns integer
        return 5*level
    endfunction
    
    //This function fires when the spell is used
    
    private function Fire takes nothing returns nothing
        local unit u = GetTriggerUnit()
        local integer level = GetUnitAbilityLevel(u,SPELL_ID)
        local integer i = 0
        local integer i2 = 0
        local integer rotations = GetRotations(u,level)
        local real x = GetSpellTargetX()
        local real y = GetSpellTargetY()
        local real delaybase = GetDelayBase(u,level)
        local real offset = GetRadius(u,level)
        local real nfx1 = GetNofFX1(u,level)
        local real angle = (360.0 / nfx1)*bj_DEGTORAD
        local real faoe = GetFAoe(u,level)
        local real scale = GetScale(u,level)
        local real damage = GetHPDamage(u,level)
        local real height = GetHeight(u,level)
        local real delay2 = 0.0
        loop
            exitwhen i2 == rotations
            loop
                exitwhen i == nfx1
                call NovaSystem.SimpleCreateDelay(u, x + Cos(angle*i)*offset, y + Sin(angle*i)*offset, delay2 + delaybase*i, 0.0, faoe, height,/*
                */ damage, scale, FX_1, AT, DT, SPELL_ID)
                set i = i + 1
            endloop
            set i2 = i2 + 1
            set delay2 = i2*delaybase*nfx1
            set i = 0
        endloop
        call NovaSystem.create(u, x, y, 0.0, 0.0, GetPortalHeight(u,level), 1, 1, delaybase, delay2,0.0, /*
        */GetPortalScale(u,level), false, false, false, FX_2, AT, DT, false, KEY)
        set u = null
    endfunction
    
    //function that is run when a unit is damaged by the rotating edge of the portal
    //used Static ifs to minimize after-compilation if-then-elses
    //I saved the initial mana and final mana in order to ensure that
    //when the ZERO_MP_HIT is false, the ability will still fire
    //at the case that the target's mana just became zero (meaning it has a non-zero value before hit)
    
    private function OnDamage takes nothing returns nothing
        local NovaSystem nova = NovaSystem.data
        local integer level = GetUnitAbilityLevel(nova.caster,SPELL_ID)
        local real mana = GetUnitState(nova.filter, UNIT_STATE_MANA)
        local real manadamage = GetMPDamage(nova.caster,level)
        local real mana2 = mana - manadamage
        local real threshold = GetThreshold(nova.caster,level)
        local unit u
        call SetUnitState(nova.filter, UNIT_STATE_MANA, mana2)
        static if NO_MP_HIT then
            static if ZERO_MP_HIT then
                if mana2 < threshold then
                    set u = CreateUnit(nova.owner,MINION_ID,GetUnitX(nova.filter),GetUnitY(nova.filter),0.0)
                    call UnitApplyTimedLife(u, 'BTLF', GetMinionDuration(nova.caster,level))
                    call SetUnitExploded(u,true)
                endif
            else
                if mana2 < threshold and mana > 0.0 then 
                    set u = CreateUnit(nova.owner,MINION_ID,GetUnitX(nova.filter),GetUnitY(nova.filter),0.0)
                    call UnitApplyTimedLife(u, 'BTLF', GetMinionDuration(nova.caster,level))
                    call SetUnitExploded(u,true)
                endif
            endif
        else
            if GetUnitState(nova.filter, UNIT_STATE_MAX_MANA) > 0.0 then
                static if ZERO_MP_HIT then
                    if mana2 < threshold then
                        set u = CreateUnit(nova.owner,MINION_ID,GetUnitX(nova.filter),GetUnitY(nova.filter),0.0)
                        call UnitApplyTimedLife(u, 'BTLF', GetMinionDuration(nova.caster,level))
                        call SetUnitExploded(u,true)
                    endif
                else
                    if mana2 < threshold and mana > 0.0 then
                        set u = CreateUnit(nova.owner,MINION_ID,GetUnitX(nova.filter),GetUnitY(nova.filter),0.0)
                        call UnitApplyTimedLife(u, 'BTLF', GetMinionDuration(nova.caster,level))
                        call SetUnitExploded(u,true)
                    endif
                endif
            endif
        endif
        set u = null
    endfunction
    
    //function that is run when the portal reaches the max number of rotations
    
    private function OnFinish takes nothing returns nothing
        local NovaSystem nova = NovaSystem.data
        local unit u = CreateUnit(nova.owner,SUMMON_ID,nova.x,nova.y,0.0)
        call UnitApplyTimedLife(u, 'BTLF', GetSummonDuration(nova.caster,GetUnitAbilityLevel(nova.caster,SPELL_ID)))
        call SetUnitExploded(u,true)
        call DestroyEffect(AddSpecialEffectTarget(FX_3,u,"origin"))
        set u = null
    endfunction
    
    //init function of the library
    //Registers the spellevent and the onDamage and onFinish nova events
    
    private function init takes nothing returns nothing
        call RegisterSpellEffectEvent(SPELL_ID, function Fire)
        call NovaSystem.RegisterOnDamage(SPELL_ID, function OnDamage)
        call NovaSystem.RegisterOnFinish(KEY, function OnFinish)
    endfunction
    
endlibrary
 

Attachments

  • RiftOfMana.PNG
    RiftOfMana.PNG
    1.8 MB · Views: 445
  • ZC 10 - Rift Of Mana.w3x
    65.8 KB · Views: 87
Level 30
Joined
Nov 29, 2012
Messages
6,637
WiP #2

Nether Gate

1 Level

Description:
Summons a nether gate at the targeted point. After 5 seconds, it will unleash force summoning 3 Avatars namely: Avatar of Chaos, Void, and Hell. The Avatars lasts for 25 seconds and when they disappear they will bring forth explosion, dealing 250 damage to the enemies around the Avatars.



  • Nether Gate Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Nether Gate
    • Actions
      • Set Target_Point[0] = (Target point of ability being cast)
      • Unit - Create 1 Hell Gate for (Owner of (Triggering unit)) at Target_Point[0] facing 270.00 degrees
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Set LastCreated_Unit[1] = (Last created unit)
      • Animation - Play LastCreated_Unit[1]'s birth animation
      • Custom script: call RemoveLocation( udg_Target_Point[0] )



  • Nether Gate Summon
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Hell Gate
    • Actions
      • Set Target_Point[0] = (Position of (Dying unit))
      • Set Target_Point[1] = (Target_Point[0] offset by (-200.00, -100.00))
      • Unit - Create 1 Avatar of the Hell for (Owner of (Triggering unit)) at Target_Point[1] facing 270.00 degrees
      • Set LastCreated_Unit[2] = (Last created unit)
      • Set Target_Point[6] = (Position of LastCreated_Unit[2])
      • Set Target_Point[2] = (Target_Point[0] offset by (0.00, -100.00))
      • Unit - Add a 25.00 second Generic expiration timer to (Last created unit)
      • Special Effect - Create a special effect at Target_Point[0] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Unit - Create 1 Avatar of the Void for (Owner of (Triggering unit)) at Target_Point[2] facing Default building facing degrees
      • Unit - Add a 25.00 second Generic expiration timer to (Last created unit)
      • Set LastCreated_Unit[3] = (Last created unit)
      • Set Target_Point[7] = (Position of LastCreated_Unit[3])
      • Set Target_Point[3] = (Target_Point[0] offset by (200.00, -100.00))
      • Special Effect - Create a special effect at Target_Point[0] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Unit - Create 1 Avatar of the Chaos for (Owner of (Triggering unit)) at Target_Point[3] facing Default building facing degrees
      • Unit - Add a 25.00 second Generic expiration timer to (Last created unit)
      • Set LastCreated_Unit[4] = (Last created unit)
      • Set Target_Point[8] = (Position of LastCreated_Unit[4])
      • Special Effect - Create a special effect at Target_Point[0] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Custom script: call RemoveLocation( udg_Target_Point[0] )
      • Custom script: call RemoveLocation( udg_Target_Point[1] )
      • Custom script: call RemoveLocation( udg_Target_Point[2] )
      • Custom script: call RemoveLocation( udg_Target_Point[3] )
      • Custom script: call RemoveLocation( udg_Target_Point[5] )



  • Nether Gate End
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Dying unit)) Equal to Avatar of the Void
          • (Unit-type of (Dying unit)) Equal to Avatar of the Chaos
          • (Unit-type of (Dying unit)) Equal to Avatar of the Hell
    • Actions
      • Set Target_Point[0] = (Position of (Dying unit))
      • Special Effect - Create a special effect at Target_Point[0] using Abilities\Spells\Other\Doom\DoomDeath.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 450.00 of Target_Point[0] matching ((((Matching unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True) and (((Matching unit) is alive) Equal to True))) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Dying unit) to damage (Picked unit), dealing 250.00 damage of attack type Spells and damage type Normal
      • Custom script: call RemoveLocation( udg_Target_Point[0] )
      • Unit - Remove (Dying unit) from the game


Will maybe add some after effects when the spell ends and not just dealing damage. Also, I might change the range of the explosion, dealing damage.
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
Here's my wip (not configurable yet/ not fully MUI yet):


  • ZS Config
    • Events
      • Map initialization
    • Conditions
    • Actions



  • ZS Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Zephyr Strike
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ZS_MaxIndex Equal to 0
        • Then - Actions
          • -------- If no instance is running, we turn on the loop --------
          • Trigger - Turn on ZS Loop <gen>
        • Else - Actions
      • Set ZS_MaxIndex = (ZS_MaxIndex + 1)
      • Set ZS_Caster[ZS_MaxIndex] = (Triggering unit)
      • Set ZS_CasterLoc[ZS_MaxIndex] = (Position of ZS_Caster[ZS_MaxIndex])
      • Set ZS_TempPlayer[ZS_MaxIndex] = (Owner of ZS_Caster[ZS_MaxIndex])
      • Set ZS_Counter[ZS_MaxIndex] = 0



  • ZS Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer ZS_CurrentIndex) from 1 to ZS_MaxIndex, do (Actions)
        • Loop - Actions
          • Set ZS_Counter[ZS_CurrentIndex] = (ZS_Counter[ZS_CurrentIndex] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ZS_Counter[ZS_CurrentIndex] Equal to 30
            • Then - Actions
              • -------- [START] Circle War Stomp [START] --------
              • Set ZS_CasterLoc[ZS_CurrentIndex] = (Position of ZS_Caster[ZS_CurrentIndex])
              • For each (Integer ZS_CirclInt) from 1 to 6, do (Actions)
                • Loop - Actions
                  • Set ZS_TempPoint[ZS_CurrentIndex] = (ZS_CasterLoc[ZS_CurrentIndex] offset by 300.00 towards ((Real(ZS_CirclInt)) x (360.00 / 6.00)) degrees)
                  • Unit - Create 1 ZS_Dummy for ZS_TempPlayer[ZS_CurrentIndex] at ZS_TempPoint[ZS_CurrentIndex] facing Default building facing degrees
                  • Set ZS_Dummy[ZS_CirclInt] = (Last created unit)
                  • Unit - Add a 1.00 second Generic expiration timer to ZS_Dummy[ZS_CirclInt]
              • Set ZS_TempGroup1[ZS_CurrentIndex] = (Units within 300.00 of ZS_CasterLoc[ZS_CurrentIndex] matching (((Matching unit) belongs to an enemy of ZS_TempPlayer[ZS_CurrentIndex]) Equal to True))
              • Unit Group - Pick every unit in ZS_TempGroup1[ZS_CurrentIndex] and do (Actions)
                • Loop - Actions
                  • Unit - Cause ZS_Caster[ZS_CurrentIndex] to damage (Picked unit), dealing 100.00 damage of attack type Chaos and damage type Divine
              • Custom script: call DestroyGroup(udg_ZS_TempGroup1[udg_ZS_CurrentIndex])
              • Custom script: call RemoveLocation(udg_ZS_TempPoint[udg_ZS_CurrentIndex])
              • -------- [END] Circle War Stomp [END] --------
              • -------- [START] Omnislash[START] --------
              • For each (Integer ZS_LoopInt) from 1 to 8, do (Actions)
                • Loop - Actions
                  • Set ZS_TempGroup1[ZS_CurrentIndex] = (Units within 600.00 of ZS_CasterLoc[ZS_CurrentIndex] 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 ZS_TempPlayer[ZS_CurrentIndex]) Equal to True) and
                  • Set ZS_TempGroup2[ZS_CurrentIndex] = (Random 1 units from ZS_TempGroup1[ZS_CurrentIndex])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Number of units in ZS_TempGroup1[ZS_CurrentIndex]) Greater than 0
                    • Then - Actions
                      • Unit Group - Pick every unit in ZS_TempGroup2[ZS_CurrentIndex] and do (Actions)
                        • Loop - Actions
                          • Set ZS_PickedUnit[ZS_CurrentIndex] = (Picked unit)
                          • Set ZS_PickedUnitLoc[ZS_CurrentIndex] = (Position of ZS_PickedUnit[ZS_CurrentIndex])
                          • Custom script: call SetUnitPositionLoc( udg_ZS_Caster[udg_ZS_CurrentIndex], udg_ZS_PickedUnitLoc[udg_ZS_CurrentIndex])
                          • Custom script: call RemoveLocation( udg_ZS_PickedUnitLoc[udg_ZS_CurrentIndex])
                          • Animation - Play ZS_Caster[ZS_CurrentIndex]'s attack animation
                          • Unit - Cause ZS_Caster[ZS_CurrentIndex] to damage ZS_PickedUnit[ZS_CurrentIndex], dealing 500.00 damage of attack type Chaos and damage type Divine
                          • Special Effect - Create a special effect attached to the weapon of ZS_Caster[ZS_CurrentIndex] using Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl
                          • Special Effect - Destroy (Last created special effect)
                      • Custom script: call DestroyGroup( udg_ZS_TempGroup1[udg_ZS_CurrentIndex])
                      • Custom script: call DestroyGroup( udg_ZS_TempGroup2[udg_ZS_CurrentIndex])
                    • Else - Actions
                      • Custom script: call DestroyGroup( udg_ZS_TempGroup1[udg_ZS_CurrentIndex])
                      • Custom script: call DestroyGroup( udg_ZS_TempGroup2[udg_ZS_CurrentIndex])
                      • -------- [END] Omnislash[END] --------
            • Else - Actions
 
Level 15
Joined
Feb 15, 2006
Messages
851
Contest Entry: FINAL. by Moyackx

Ok, this is my final version. Some tweaks has been done to expand configurability and eyecandy.

Evil Extirpation.
By Moyack
2013.

image

Description.

The Evil Messenger extirpates from the land itself all the power of Evil, luring from the void ancient spirits of Evil. Each of them would attack enemy units and, in the process, the evil from nearby enemy units is extracted from themselves, dealing some additional damage.

Level 1 - Deals additional 5 damage, lasts 15 seconds.
Level 2 - Deals additional 8 damage, lasts 20 seconds.
Level 3 - Deals additional 11 damage, lasts 25 seconds.


Video.


Requirements


Spell Code.

JASS:
/* ==================================================
   ||           EVIL EXTIRPATION SPELL             ||
   ||                By moyackx                    ||
   ||               Version 1.0.                   ||
   ||                   2013                       ||
   ||         For the Zephyr Contest #10:          ||
   ||         What lies on the other side          ||
   ==================================================
   
   Description:
   ------------
   The Evil Messenger extirpates from the land itself 
   all the power of Evil, luring from the void ancient 
   spirits of Evil. Each of them would attack enemy 
   units and, in the process, the evil from nearby enemy 
   units is extracted from themselves, dealing some 
   additional damage.
   
   How To install:
   ---------------
   1. Copy & paste the "Evil Extirpation" ability, buff
      and effect in your map
   2. Copy this code in your map.
   3. Edit the CONFIGURATION PART with the new Ability
      (ABIL) and unit type summoned (SAUMMON) array. 
      Adjust the other values too. Don't forget to set 
      the ward classification to the summoned units, that
      will improve the eyecandy.
   4. Enjoy :D
   
   Don't forget this code requires Alloc2 to run
   properly. This code is in this test map or you can
   download it here:
   [url]http://wc3jass.com/5012/snippet-allocloop-aka-alloc-2/[/url]
*/

library EvilExtirpation initializer init requires Alloc
/* CONFIGURTATION PART */
globals
    private constant integer ABIL = 'A000' // the Ability rawcode
    private constant real    DT   = 0.3    // Sets the periodic Check Frecuency
    private constant real    AOE  = 700.   // Spell Area of Effect
    private constant real    MAXH = 2000.  // Maximum Height flight for spirit units
    private constant real    HRATE= 200.   // Sets the elevation rate
    private constant real    DDUR = 2.5    // Sets the duration of spirits
    private constant boolean ALOC = false  // Defines if we apply locust ability to the spirits
    
    private          integer array SUMMON // the spirit unit type array.
endglobals

private function SetSummons takes nothing returns nothing
    /* Here, you can set all the unit types your spell
       will have per level. If your maps has more spell
       levels, simply add  more in this code...
    */ 
    set SUMMON[1] = 'n001'
    set SUMMON[2] = 'n002'
    set SUMMON[3] = 'n003'
endfunction
/* END CONFIGURATION PART */

private struct data extends array
    static timer T = CreateTimer()
    static integer I = 0
    unit caster
    integer order
    
    implement AllocLoop
    
    method destroy takes nothing returns nothing
        set .caster = null
        set thistype.I = thistype.I - 1
        if thistype.I == 0 then
            call PauseTimer(thistype.T)
        endif
        call .deallocate()
    endmethod
    
    static method Loop takes nothing returns nothing
        local unit u
        implement loop
            set u = CreateUnit(GetOwningPlayer(this.caster), SUMMON[GetUnitAbilityLevel(this.caster, ABIL)], GetUnitX(this.caster) + GetRandomReal(-AOE, AOE), GetUnitY(this.caster) + GetRandomReal(-AOE, AOE), GetRandomReal(0, 360))
            call UnitAddType(u, UNIT_TYPE_SUMMONED) // so the summoned unit can have the effects from some dispelling spells...
            call DestroyEffect(AddSpellEffectById(ABIL, EFFECT_TYPE_TARGET, GetUnitX(u), GetUnitY(u)))
            call UnitAddAbility(u, 'Arav') // Add the storm Crow Form ability, to make it fly...
            call SetUnitFlyHeight(u, MAXH, HRATE)
            call UnitApplyTimedLife(u, 0, DDUR)
            if ALOC then
                call UnitAddAbility(u, 'Aloc')
            endif
            if this.order != GetUnitCurrentOrder(this.caster) then
                call this.destroy()
            endif
        implement endloop
        set u = null
    endmethod
    
    static method Start takes unit c returns thistype
        local thistype this = thistype.allocate()
        set this.caster = c
        set this.order = GetUnitCurrentOrder(c)
        set thistype.I = thistype.I + 1
        if thistype.I == 1 then
            call TimerStart(thistype.T, DT, true, function thistype.Loop)
        endif
        return this
    endmethod
endstruct

private function DoEffect takes nothing returns boolean
    if GetSpellAbilityId() == ABIL then
        call data.Start(GetTriggerUnit())
    endif
    return false
endfunction

private function init takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(t, Condition(function DoEffect))
    set t = null
    call SetSummons()
endfunction

endlibrary
 

Attachments

  • Evil Extirpation.w3x
    30.8 KB · Views: 74
Last edited:
Level 20
Joined
Apr 14, 2012
Messages
2,901
Ahhh nice to see more spells are being submitted :')
I've got too busy with college, dang !
If I submit my spell, probably it would not be on par with the others because I (hope to make it) just for fun lulz @.@"

It will be sure more fun than mine. I made mine for competition and just look at what happened to it...

Anyways I'm curious to see your spell defskull, you make cool spells for me.
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
Maybe but Its ok If I dont reach that level and also this is just for fun.

I know you joined this contest for fun, you emphasized that fact multiple times before. I just asked because the ones that joined are already beyond us in terms of coding experience, so that kind of rendered what you said earlier that you'd be 'dead' if any more 'pros' joined in question.

But anyways good luck to your entry too =)
Have fun XD
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
I know you joined this contest for fun, you emphasized that fact multiple times before. I just asked because the ones that joined are already beyond us in terms of coding experience, so that kind of rendered what you said earlier that you'd be 'dead' if any more 'pros' joined in question.

But anyways good luck to your entry too =)
Have fun XD

Good luck, bro!
 
Final Entry

There's nothing much to do here.

  • CD Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Chaotic Deception
    • Actions
      • Set TempPoint = (Target point of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Terrain pathing at TempPoint of type Walkability is off) Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: ...
          • Sound - Play Error <gen> at 100.00% volume, attached to (Triggering unit)
          • Unit - Order (Triggering unit) to Stop
        • Else - Actions
          • Set OffsetLoc = (Position of (Triggering unit))
          • Unit - Create 1 Dummy for Player 1 (Red) at OffsetLoc facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Special Effect - Create a special effect attached to the chest of (Last created unit) using Abilities\Spells\Orc\Disenchant\DisenchantSpecialArt.mdl
          • Unit - Create 1 Dummy for Player 1 (Red) at TempPoint facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Special Effect - Create a special effect attached to the chest of (Last created unit) using Abilities\Spells\Orc\Disenchant\DisenchantSpecialArt.mdl
          • Set CD_CasterEffect[CD_Index[0]] = (Last created special effect)
          • Unit - Turn collision for (Triggering unit) Off
          • Unit - Move (Triggering unit) instantly to TempPoint
          • Unit - Turn collision for (Triggering unit) On
          • Set TempReal = ((Distance between OffsetLoc and TempPoint) / 3.00)
          • For each (Integer TempInteger) from 1 to 3, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CD_Index[1] Equal to 0
                • Then - Actions
                  • Set CD_Index[0] = 0
                  • Trigger - Turn on CD Loop <gen>
                • Else - Actions
              • Set CD_Index[0] = (CD_Index[0] + 1)
              • Set CD_Index[1] = (CD_Index[1] + 1)
              • Set CD_Angle[CD_Index[0]] = ((Facing of (Triggering unit)) - 180.00)
              • Set CD_AttackType[CD_Index[0]] = Chaos
              • Set CD_Caster[CD_Index[0]] = (Triggering unit)
              • Set CD_CasterPos[CD_Index[0]] = (Position of (Triggering unit))
              • Set CD_Condition[CD_Index[0]] = True
              • Set CD_Damage[CD_Index[0]] = ((Real((Agility of CD_Caster[CD_Index[0]] (Include bonuses)))) / 2.25)
              • Set CD_DamageType[CD_Index[0]] = Universal
              • Set CD_Range[CD_Index[0]] = 200.00
              • Set CD_Speed[CD_Index[0]] = 40.00
              • Set CD_StopLoc[CD_Index[0]] = 25.00
              • Set CD_TargetPoint[CD_Index[0]] = (Target point of ability being cast)
              • Set TempPoint = (OffsetLoc offset by TempReal towards (Angle from OffsetLoc to TempPoint) degrees)
              • Set CD_Group[CD_Index[0]] = (Units within (TempReal x 2.00) of TempPoint matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))))
              • Custom script: call RemoveLocation(udg_OffsetLoc)
      • Custom script: call RemoveLocation(udg_TempPoint)
  • CD Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer CD_Index[2]) from 1 to CD_Index[0], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CD_Condition[CD_Index[2]] Equal to True
            • Then - Actions
              • Set CD_Range[CD_Index[2]] = (CD_Range[CD_Index[2]] - 25.00)
              • Unit Group - Pick every unit in CD_Group[CD_Index[2]] and do (Actions)
                • Loop - Actions
                  • Set TempPoint = (Position of (Picked unit))
                  • Set OffsetLoc = (TempPoint offset by CD_Speed[CD_Index[2]] towards CD_Angle[CD_Index[2]] degrees)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Terrain pathing at OffsetLoc of type Walkability is off) Equal to True
                    • Then - Actions
                    • Else - Actions
                      • Unit - Move (Picked unit) instantly to OffsetLoc, facing (Angle from TempPoint to CD_TargetPoint[CD_Index[2]]) degrees
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) is Ethereal) Equal to True
                    • Then - Actions
                      • Unit - Cause CD_Caster[CD_Index[2]] to damage (Picked unit), dealing CD_Damage[CD_Index[2]] damage of attack type Spells and damage type Force
                    • Else - Actions
                      • Unit - Cause CD_Caster[CD_Index[2]] to damage (Picked unit), dealing CD_Damage[CD_Index[2]] damage of attack type CD_AttackType[CD_Index[2]] and damage type CD_DamageType[CD_Index[2]]
                  • Special Effect - Create a special effect attached to the origin of (Picked unit) using CD_Effect[1]
                  • Special Effect - Destroy (Last created special effect)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CD_Range[CD_Index[2]] Less than CD_StopLoc[CD_Index[2]]
                • Then - Actions
                  • Set CD_Condition[CD_Index[2]] = False
                  • Set CD_Index[1] = (CD_Index[1] - 1)
                  • Special Effect - Destroy CD_CasterEffect[2]
                  • Custom script: call RemoveLocation(udg_CD_TargetPoint[udg_CD_Index[2]])
                  • Custom script: call RemoveLocation(udg_CD_CasterPos[udg_CD_Index[2]])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CD_Index[1] Equal to 0
                    • Then - Actions
                      • Set CD_Index[0] = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
                • Else - Actions
            • Else - Actions

Forgot credits!

- Kitabatake


//If a judge has issues with my stack-indexing, I'd rather quit.
 

Attachments

  • Chaotic Deception.w3x
    244.9 KB · Views: 109
Last edited:
Level 30
Joined
Nov 29, 2012
Messages
6,637
Maybe I should also submit here my WiP #2 map..... Just some notes, it is not yet finished. I am stll gonna add some more after effects when the spell ended.

I am really bad in knowing if my map is an MUI so I dont know but I hope it is....
 

Attachments

  • Spell WiP 1 Nether Gate.w3x
    504.7 KB · Views: 52
Status
Not open for further replies.
Top