Immolation
Member
- Reaction score
- 20
Pestilence
Conjures several pestilential clouds that move to the target point and damage units that touch them.
GUI/vJASS= vJASS
Leakless?= Yes(I hope).
Lagless= Yes.
MUI/MPI?= MUI
Changelog:
v1.2a
-Fixed spacing.
v1.2
-Updated code.
-Removed not needed triggers.
v1.1a
-Updated code.
v1.1:
-Replaced all locations with coordinates.
-Uses natives only now
v1.00:
-Initial release.
Code:GUI/vJASS= vJASS
Leakless?= Yes(I hope).
Lagless= Yes.
MUI/MPI?= MUI
Changelog:
v1.2a
-Fixed spacing.
v1.2
-Updated code.
-Removed not needed triggers.
v1.1a
-Updated code.
v1.1:
-Replaced all locations with coordinates.
-Uses natives only now
v1.00:
-Initial release.
JASS:
scope Pestilence initializer Init
//-------------------------------------------------------------
// Pestilence by Immolation
//-------------------------------------------------------------
// Description:
//---------------------------
// Calls forth pestilential clouds causing damage to struck enemies.
// What do I need to import it in my map?
//---------------------------
// You need to download JASS NewGen, available at the following links:
// -http://www.thehelper.net/forums/showthread.php?t=73936-
// -http://www.wc3c.net/showthread.php?t=90999-
//Install it and then read the following paragraph.
// How do I put it in my map?
//---------------------------
// 1. Copy:
// a. The "Pestilence" ability.
// b. The "Pestilence(Wave)" ability.
// c. Export the "dummy.mdx" file and import it back into your map.
// d. Copy the "Dummy Unit" into your map.
// e. Copy this trigger.
// 2. Press CTRL + D while in Abilities section in Object Editor to find out the rawcode of:
// a. The "Pestilence" ability. Change the SPELL_ID to the rawcode that you find(it's 'A000' in this map).
// b. The "Pestilence(Wave)" ability. Change the DUMMY_SPELL_ID to the rawcode that you find(it's 'A001' in this map).
// c. The "Dummy Unit" unit. Change the DUMMY_UNITID to the rawcode that you find(it's 'n000' in this map).
// 3. You have succesfully imported the spell <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" />
// Changelog:
//---------------------------
// v1.2a:
// -Fixed spacing.
//
// v1.2:
// -Updated code.
// -Removed not needed triggers.
//
// v1.1a:
// -Updated code.
//
// v1.1:
// -Replaced all locations with coordinates.
// -Uses natives only now <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" />
//
// v1.00:
// -Initial release.
//---------------------------
// TheHelper.net
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// LIST OF CONFIGURABLES
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//About Configurables:
// You can configure most of the spell in the object editor, but for amount of rays called
// and the rawcode of the abilities(and the dummy unit) check the map header.
globals
private constant integer SPELL_ID = 039;A000039; //Rawcode of the "Pestilence" ability.
private constant integer DUMMY_SPELLID = 039;A001039; //Rawcode of the "Pestilence(Wave)" ability.
private constant integer DUMMY_UNITID = 039;n000039; //Rawcode of the "Dummy Unit".
private constant real DUMMY_DURATION = 5.00 //Duration of dummy unit.
private constant real DUMMY_HEIGHT = 100.00 //Height of dummy unit.
private constant real WAVES_DEGREE = 5.00 //Degree difference between each wave.
//A number between 24 and 5 is suggested.
//Note however that 24 creates a perfect circle.
private constant integer WAVES_PER_LEVEL = 1 //Additional waves gained for each level of the spell.
private constant integer WAVES_BASE = 0 //Standard amount of waves; without counting the spell level.
endglobals
//Regarding Waves:
// Each wave counts as 2 waves since the spell is symmetrical.
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
private function Cond takes nothing returns boolean
return GetSpellAbilityId() == SPELL_ID
endfunction
private function Main takes nothing returns nothing
local unit caster = GetTriggerUnit()
local player p = GetOwningPlayer(caster)
local real x = GetUnitX(caster)
local real y = GetUnitY(caster)
local real degree = GetUnitFacing(caster)
local real x2 = x + 100.00 * Cos(degree * bj_DEGTORAD)
local real y2 = y + 100.00 * Sin(degree * bj_DEGTORAD)
local integer level = GetUnitAbilityLevel(caster, SPELL_ID)
local integer start = 1
local integer end = ((WAVES_PER_LEVEL * level) + WAVES_BASE)
local unit dummy = CreateUnit(p, DUMMY_UNITID, x, y, 0)
call UnitAddAbility(dummy, DUMMY_SPELLID)
call SetUnitFlyHeight(dummy, DUMMY_HEIGHT, 0)
call UnitApplyTimedLife(dummy, 039;BTLF039;, DUMMY_DURATION)
call IssuePointOrder(dummy, "carrionswarm", x2, y2)
loop
exitwhen start > end
set degree = (degree + WAVES_DEGREE)
set x2 = x + 100.00 * Cos(degree * bj_DEGTORAD)
set y2 = y + 100.00 * Sin(degree * bj_DEGTORAD)
set dummy = CreateUnit(p, DUMMY_UNITID, x, y, 0)
call UnitAddAbility(dummy, DUMMY_SPELLID)
call SetUnitFlyHeight(dummy, DUMMY_HEIGHT, 0)
call UnitApplyTimedLife(dummy, 039;BTLF039;, DUMMY_DURATION)
call IssuePointOrder(dummy, "carrionswarm", x2, y2)
set start = start + 1
endloop
set degree = GetUnitFacing(GetTriggerUnit())
set start = 1
set end = ((WAVES_PER_LEVEL * level) + WAVES_BASE)
loop
exitwhen start > end
set degree = (degree - WAVES_DEGREE)
set x2 = x + 100.00 * Cos(degree * bj_DEGTORAD)
set y2 = y + 100.00 * Sin(degree * bj_DEGTORAD)
set dummy = CreateUnit(p, DUMMY_UNITID, x, y, 0)
call UnitAddAbility(dummy, DUMMY_SPELLID)
call SetUnitFlyHeight(dummy, DUMMY_HEIGHT, 0)
call UnitApplyTimedLife(dummy, 039;BTLF039;, DUMMY_DURATION)
call IssuePointOrder(dummy, "carrionswarm", x2, y2)
set start = start + 1
endloop
set caster = null
set dummy = null
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 Cond))
call TriggerAddAction(t, function Main)
endfunction
endscope
I feel bad for those poor turtles ç_ç
Comment and rate