2902 Posts in 433 Topics - by 2150 Members - Latest Member: wtvr

Warcraft III: MapsModelsSkinsIconsSpellsToolsTutorials
WC3 JASS: Code SnippetsJASS and vJASS Spells and SystemsJass Tutorials
Chat @Discord

Author Topic: Evil Extirpation  (Read 4176 times)

  • Site Owner
  • Administrator
  • Starter - level 4
  • *
  • Posts: 981
  • WC3 Models: 6
  • WC3 Tutorials: 11
  • WC3 Tools: 10
  • WC3 Maps: 11
  • WC3 Skins: 6
  • WC3 Icons: 2
  • WC3 Spells: 5
  • Reputation: 1153
  • Site Admin - I love fix things
    • View Profile
    • Blizzard Modding Information Center
Evil Extirpation
« on: May 13, 2013, 01:01:13 PM »
Evil Extirpation.
By Moyack
2013.

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.

Code: jass  [Select]
  1. /* ==================================================
  2.    ||           EVIL EXTIRPATION SPELL             ||
  3.    ||                By moyackx                    ||
  4.    ||               Version 1.0.                   ||
  5.    ||                   2013                       ||
  6.    ||         For the Zephyr Contest #10:          ||
  7.    ||         What lies on the other side          ||
  8.    ==================================================
  9.    
  10.    Description:
  11.    ------------
  12.    The Evil Messenger extirpates from the land itself
  13.    all the power of Evil, luring from the void ancient
  14.    spirits of Evil. Each of them would attack enemy
  15.    units and, in the process, the evil from nearby enemy
  16.    units is extracted from themselves, dealing some
  17.    additional damage.
  18.    
  19.    How To install:
  20.    ---------------
  21.    1. Copy & paste the "Evil Extirpation" ability, buff
  22.       and effect in your map
  23.    2. Copy this code in your map.
  24.    3. Edit the CONFIGURATION PART with the new Ability
  25.       (ABIL) and unit type summoned (SAUMMON) array.
  26.       Adjust the other values too. Don't forget to set
  27.       the ward classification to the summoned units, that
  28.       will improve the eyecandy.
  29.    4. Enjoy :D
  30.    
  31.    Don't forget this code requires Alloc2 to run
  32.    properly. This code is in this test map or you can
  33.    download it here:
  34.    [url]http://wc3jass.com/5012/snippet-allocloop-aka-alloc-2/[/url]
  35. */
  36.  
  37. library EvilExtirpation initializer init requires Alloc
  38. /* CONFIGURTATION PART */
  39. globals
  40.     private constant integer ABIL = 'A000' // the Ability rawcode
  41.     private constant real    DT   = 0.3    // Sets the periodic Check Frecuency
  42.     private constant real    AOE  = 700.   // Spell Area of Effect
  43.     private constant real    MAXH = 2000.  // Maximum Height flight for spirit units
  44.     private constant real    HRATE= 200.   // Sets the elevation rate
  45.     private constant real    DDUR = 2.5    // Sets the duration of spirits
  46.     private constant boolean ALOC = false  // Defines if we apply locust ability to the spirits
  47.    
  48.     private          integer array SUMMON // the spirit unit type array.
  49. endglobals
  50.  
  51. private function SetSummons takes nothing returns nothing
  52.     /* Here, you can set all the unit types your spell
  53.        will have per level. If your maps has more spell
  54.        levels, simply add  more in this code...
  55.     */
  56.     set SUMMON[1] = 'n001'
  57.     set SUMMON[2] = 'n002'
  58.     set SUMMON[3] = 'n003'
  59. endfunction
  60. /* END CONFIGURATION PART */
  61.  
  62. private struct data extends array
  63.     static timer T = CreateTimer()
  64.     static integer I = 0
  65.     unit caster
  66.     integer order
  67.    
  68.     implement AllocLoop
  69.    
  70.     method destroy takes nothing returns nothing
  71.         set .caster = null
  72.         set thistype.I = thistype.I - 1
  73.         if thistype.I == 0 then
  74.             call PauseTimer(thistype.T)
  75.         endif
  76.         call .deallocate()
  77.     endmethod
  78.    
  79.     static method Loop takes nothing returns nothing
  80.         local unit u
  81.         implement loop
  82.             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))
  83.             call UnitAddType(u, UNIT_TYPE_SUMMONED) // so the summoned unit can have the effects from some dispelling spells...
  84.             call DestroyEffect(AddSpellEffectById(ABIL, EFFECT_TYPE_TARGET, GetUnitX(u), GetUnitY(u)))
  85.             call UnitAddAbility(u, 'Arav') // Add the storm Crow Form ability, to make it fly...
  86.             call SetUnitFlyHeight(u, MAXH, HRATE)
  87.             call UnitApplyTimedLife(u, 0, DDUR)
  88.             if ALOC then
  89.                 call UnitAddAbility(u, 'Aloc')
  90.             endif
  91.             if this.order != GetUnitCurrentOrder(this.caster) then
  92.                 call this.destroy()
  93.             endif
  94.         implement endloop
  95.         set u = null
  96.     endmethod
  97.    
  98.     static method Start takes unit c returns thistype
  99.         local thistype this = thistype.allocate()
  100.         set this.caster = c
  101.         set this.order = GetUnitCurrentOrder(c)
  102.         set thistype.I = thistype.I + 1
  103.         if thistype.I == 1 then
  104.             call TimerStart(thistype.T, DT, true, function thistype.Loop)
  105.         endif
  106.         return this
  107.     endmethod
  108. endstruct
  109.  
  110. private function DoEffect takes nothing returns boolean
  111.     if GetSpellAbilityId() == ABIL then
  112.         call data.Start(GetTriggerUnit())
  113.     endif
  114.     return false
  115. endfunction
  116.  
  117. private function init takes nothing returns nothing
  118.     local trigger t = CreateTrigger()
  119.     call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
  120.     call TriggerAddCondition(t, Condition(function DoEffect))
  121.     set t = null
  122.     call SetSummons()
  123. endfunction
  124.  
  125. endlibrary
« Last Edit: February 25, 2016, 08:58:40 AM by moyack »

We can give you full hosting for your projects, a complete page!!

A custom altered melee map where you can play Naga and Demons. Check it out!!
Use Dropbox...

  • aka Drunken_Jackal
  • Recognized User
  • Rookie - level 4
  • *
  • Posts: 179
  • WC3 Models: 0
  • WC3 Tutorials: 0
  • WC3 Tools: 0
  • WC3 Maps: 0
  • WC3 Skins: 0
  • WC3 Icons: 0
  • WC3 Spells: 0
  • Reputation: 558
    • View Profile
Evil Extirpation
« Reply #1 on: May 13, 2013, 07:23:08 PM »
Shouldn't this be in the media boss?


gucci mane

  • Site Owner
  • Administrator
  • Starter - level 4
  • *
  • Posts: 981
  • WC3 Models: 6
  • WC3 Tutorials: 11
  • WC3 Tools: 10
  • WC3 Maps: 11
  • WC3 Skins: 6
  • WC3 Icons: 2
  • WC3 Spells: 5
  • Reputation: 1153
  • Site Admin - I love fix things
    • View Profile
    • Blizzard Modding Information Center
Evil Extirpation
« Reply #2 on: May 14, 2013, 09:31:23 AM »
Shouldn't this be in the media boss?
In theory, yes. I'm working in passing the spells into actual threads, because this type of content requires much more text than a model/skin/icon resource.

We can give you full hosting for your projects, a complete page!!

A custom altered melee map where you can play Naga and Demons. Check it out!!
Use Dropbox...

  • Site Owner
  • Administrator
  • Starter - level 4
  • *
  • Posts: 981
  • WC3 Models: 6
  • WC3 Tutorials: 11
  • WC3 Tools: 10
  • WC3 Maps: 11
  • WC3 Skins: 6
  • WC3 Icons: 2
  • WC3 Spells: 5
  • Reputation: 1153
  • Site Admin - I love fix things
    • View Profile
    • Blizzard Modding Information Center
Evil Extirpation
« Reply #3 on: May 29, 2013, 08:55:55 PM »
Ok, moved to the submission section and awaiting approval.

We can give you full hosting for your projects, a complete page!!

A custom altered melee map where you can play Naga and Demons. Check it out!!
Use Dropbox...

 

Blizzard Modding Information Center Starcraft II Modding Information Center Wacraft III Modding Information Center WC3JASS.com - The JASS Vault Chronicles of Darkness - A Warcraft III mod Jetcraft - A Starcraft II mod Troll Smash - A Warcraft III Arena
  Mod DB - Change the Game Power of Corruption - A Warcraft III altered melee map Chaos Realm - The world of Game modders and wc3 addicts Follow us on Facebook!!