Warcraft 3 documentation
vJASS & Zinc Documentation
For the latest documentation about how it works vJASS and Zinc language layers for Warcraft III, please follow these links:
Jasshelper documentation - Zinc documentation - WC3 Optimizer documentation

Evil Extirpation No New Posts Warcraft III Spells and Systems

Started by
moyack

0 Members and 1 Guest are viewing this topic.

Rating

Average Score - 5 / 5

« Created: October 08, 2017, 11:27:05 PM by moyack »

Evil Extirpation
on: May 13, 2013, 01:01:13 PM

Related Topics or Resources



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
  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]https://wc3modding.info/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 UnitAddAbility(u, 'Arav') // Add the storm Crow Form ability, to make it fly...
  85.             call SetUnitFlyHeight(u, MAXH, HRATE)
  86.             call UnitApplyTimedLife(u, 0, DDUR)
  87.             if ALOC then
  88.                 call UnitAddAbility(u, 'Aloc')
  89.             endif
  90.             if this.order != GetUnitCurrentOrder(this.caster) then
  91.                 call this.destroy()
  92.             endif
  93.         implement endloop
  94.         set u = null
  95.     endmethod
  96.    
  97.     static method Start takes unit c returns thistype
  98.         local thistype this = thistype.allocate()
  99.         set this.caster = c
  100.         set this.order = GetUnitCurrentOrder(c)
  101.         set thistype.I = thistype.I + 1
  102.         if thistype.I == 1 then
  103.             call TimerStart(thistype.T, DT, true, function thistype.Loop)
  104.         endif
  105.         return this
  106.     endmethod
  107. endstruct
  108.  
  109. private function DoEffect takes nothing returns boolean
  110.     if GetSpellAbilityId() == ABIL then
  111.         call data.Start(GetTriggerUnit())
  112.     endif
  113.     return false
  114. endfunction
  115.  
  116. private function init takes nothing returns nothing
  117.     local trigger t = CreateTrigger()
  118.     call TriggerAddCondition(t, Condition(function DoEffect))
  119.     set t = null
  120.     call SetSummons()
  121. endfunction
  122.  
  123. endlibrary
« Last Edit: January 06, 2020, 12:43:05 PM by moyack »



Evil Extirpation
Reply #1 on: May 13, 2013, 07:23:08 PM

Shouldn't this be in the media boss?



gucci mane


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.


Evil Extirpation
Reply #3 on: May 29, 2013, 08:55:55 PM

Ok, moved to the submission section and awaiting approval.


 

* Random Spells & Systems

Started by Judash137

Replies: 0
Views: 6722
Warcraft III Models

Started by Wojannnn

Replies: 0
Views: 1251
Warcraft III Models

Started by Wojannnn

Replies: 0
Views: 1307
Warcraft III Models

Started by Wojannnn

Replies: 0
Views: 1443
Warcraft III Models
Vivir aprendiendo.co - A place for learning stuff, in Spanish   Chaos Realm - The world of Game modders and wc3 addicts   Diplo, a gaming community   Power of Corruption, an altered melee featuring Naga and Demon. Play it now!!!   WC3JASS.com - The JASS Vault + vJASS and Zinc   Jetcraft - A Starcraft II mod   WormTastic Clan (wTc)   Warcraft RESOURCES Reforged: Modelos, mapas, proyectos y mas...