Spellpack Elemental Spells

Magoiche

Member
Elemental Requiem

Elemental Requiem v1.3
by Magoiche




Inner Lightning

GUI/JASS: vJASS
MUI/MPI: MUI and MPI
Leakless?: Yep
Lagless?: Yep
Requirements: NewGen and PolledWait2(Inside the map)
Import Difficult: Medium

Description: Release a high wave of lightning inside the caster. After a fell seconds the lightning will spread over units near it.

Level 1 - 20 damage per lightning.
Level 2 - 40 damage per lightning.
Level 3 - 60 damage per lightning.
Level 4 - 80 damage per lightning.


Screenshots:

Code:
JASS:
//////////////////////////////////////////////
////           Inner Lightning            ////
////          by Magoiche Saika           ////
//////////////////////////////////////////////
////NOTE: Everything that you can't change////
////       in this script you can in the  ////
////              Object Editor.          ////
//////////////////////////////////////////////

scope InnerLightnint initializer Initial

globals
    private constant integer InnerLightningSpellRawData = 'A000'
    // Raw Data of the Inner Lightning spell
    private constant integer LightningSpellRawData = 'A001'
    // Raw Data of the Lightning spell
    private constant integer InnerLightningDummyRawData = 'u001'
    // Razw Data of the Dummy
    private constant real LightningRange = 1500
    // Cast Range of Lightning spell
    private constant real InnerLightningWaitTime = 10.0
    // Time to wait before casting the lightnings
    private constant real InnerLightningDamageModifier = 0.5
    // Percentage of Mana target mana done in damage. 0.5 being 50% per level
    private constant string LightningOrderString = "chainlightning"
    // Lightning Use/Turn On Order Id
    private constant string InnerLightningOnTargetEffect = "Abilities\\Spells\\Orc\\LightningShield\\LightningShieldTarget.mdl"
    // Effect that apears on the target
    private constant string InnerLightningOnTargetEffectAttachmentPoint = "origin"
    // Attachment point of the OnTargetEffect
endglobals

// Dont change anything after this line if you don't know what you are doing.

private function Conditions takes nothing returns boolean
    return GetSpellAbilityId() == InnerLightningSpellRawData
endfunction

private function TargetConditions takes nothing returns boolean
    return IsUnitEnemy( GetFilterUnit(), GetOwningPlayer( GetTriggerUnit() ) ) == true and GetWidgetLife( GetFilterUnit() ) > 0
endfunction

private function Lightning takes nothing returns nothing
    local unit Caster = GetTriggerUnit()
    local unit Dummy = CreateUnit( GetOwningPlayer( Caster ), InnerLightningDummyRawData, GetUnitX( Caster ), GetUnitY( Caster ), 0.0 )
    call UnitApplyTimedLife( Dummy, 'BTLF', 5.0 )
    call UnitAddAbility( Dummy, LightningSpellRawData )
    call SetUnitAbilityLevel( Dummy, LightningSpellRawData, GetUnitAbilityLevel( Caster, InnerLightningSpellRawData ) )
    call IssueTargetOrder( Dummy, LightningOrderString, GetEnumUnit() )
    set Caster = null
    set Dummy = null
endfunction

private function Actions takes nothing returns nothing
    local unit Caster = GetTriggerUnit()
    local effect Effect = AddSpecialEffectTarget( InnerLightningOnTargetEffect, Caster, InnerLightningOnTargetEffectAttachmentPoint )
    local group UnitsNear
    local location CasterLoc = GetUnitLoc( Caster )
    call PolledWait2( InnerLightningWaitTime )
    set UnitsNear = GetUnitsInRangeOfLocMatching( LightningRange, CasterLoc, Condition( function TargetConditions ) )
    call ForGroup( UnitsNear, function Lightning )
    call RemoveLocation( CasterLoc )
    call DestroyGroup( UnitsNear )
    call DestroyEffect( Effect )
    set Caster = null
    set CasterLoc = null
    set Effect = null
    set UnitsNear = null
endfunction

private function Initial takes nothing returns nothing
    local trigger trig = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( trig, Condition( function Conditions ) )
    call TriggerAddAction( trig, function Actions )
    set trig = null
endfunction

endscope

Icy End

GUI/JASS: vJASS
MUI/MPI: MUI and MPI
Leakless?: Yep
Lagless?: Yep
Import Difficult: Medium

Description: Call the powerfull spirits of ice to put an end in this vile world. Put near enemy units in a Frost Cage so they can't move and calls a powerfull Blizzard from the sky.

Level 1 - Frost Cage will last 10 seconds and do 10 damage per second. Blizzard will do 10 waves of 20 damage each.
Level 2 - Frost Cage will last 15 seconds and do 15 damage per second. Blizzard will do 15 waves of 25 damage each.
Level 3 - Frost Cage will last 20 seconds and do 20 damage per second. Blizzard will do 20 waves of 30 damage each.
Level 4 - Frost Cage will last 25 seconds and do 25 damage per second. Blizzard will do 25 waves of 35 damage each.


Screenshots:

Code:
JASS:
//////////////////////////////////////////////
////               Icy End                ////
////          by Magoiche Saika           ////
//////////////////////////////////////////////
////NOTE: Everything that you can't change////
////       in this script you can in the  ////
////              Object Editor.          ////
//////////////////////////////////////////////

scope IcyEnd initializer Initial

globals
    private constant integer IcyEndSpellRawData = 'A004'
    // Raw Data of the Icy End spell
    private constant integer FrostCageSpellRawData = 'A006'
    // Raw Data of the Frost Cage spell
    private constant integer BlizzardSpellRawData = 'A005'
    // Raw Data of the Blizzard spell
    private constant integer IcyEndDummyRawData = 'u001'
    // Raw Data of the Dummy
    private constant string BlizzardOrderString = "blizzard"
    // Blizzard Use/Turn On Order Id
    private constant string FrostCageOrderString = "entanglingroots"
    // Frost Cage Use/Turn On Order Id
    private constant real IcyEndAoE = 600
    // AoE of Blizzard and Cast Range of Frost Cage
    private constant real IcyEndDurationBase = 5
    // Base duration of Frostcage
    private constant real IcyEndDurationModifier = 5 
    // Seconds of duration added per spell level.
    // The Final Duration will be DurationBase + ( DurationModifier * Spell Level ). Remember: It must be the same duration of Frost Cage adn the Number of Waves for Blizzard!
endglobals

// Dont change anything after this line if you don't know what you are doing.

private function Conditions takes nothing returns boolean
    return GetSpellAbilityId() == IcyEndSpellRawData
endfunction

private function TargetConditions takes nothing returns boolean
    return IsUnitEnemy( GetFilterUnit(), GetOwningPlayer( GetTriggerUnit() ) ) == true and GetWidgetLife( GetFilterUnit() ) > 0
endfunction

private function FrostCage takes nothing returns nothing
    local unit Caster = GetTriggerUnit()
    local unit Dummy = CreateUnit( GetOwningPlayer( Caster ), IcyEndDummyRawData, GetUnitX( Caster ), GetUnitY( Caster ), 0.0 )
    call UnitApplyTimedLife( Dummy, 'BTLF', IcyEndDurationBase + ( IcyEndDurationModifier * GetUnitAbilityLevel( Caster, IcyEndSpellRawData) ) )
    call UnitAddAbility( Dummy, FrostCageSpellRawData )
    call SetUnitAbilityLevel( Dummy, FrostCageSpellRawData, GetUnitAbilityLevel( Caster, IcyEndSpellRawData ) )
    call IssueTargetOrder( Dummy, FrostCageOrderString, GetEnumUnit() )
    set Caster = null
    set Dummy = null
endfunction

private function Actions takes nothing returns nothing
    local unit Caster = GetTriggerUnit()
    local unit Dummy = CreateUnit( GetOwningPlayer( Caster ), IcyEndDummyRawData, GetUnitX( Caster ), GetUnitY( Caster ), 0.0 )
    local location DummyLoc = GetUnitLoc( Dummy )
    local group UnitsNear = GetUnitsInRangeOfLocMatching( IcyEndAoE, DummyLoc, Condition( function TargetConditions ) )
    call UnitApplyTimedLife( Dummy, 'BFTL', IcyEndDurationBase + ( IcyEndDurationModifier * GetUnitAbilityLevel( Caster, IcyEndSpellRawData) ) )
    call UnitAddAbility( Dummy, BlizzardSpellRawData )
    call SetUnitAbilityLevel( Dummy, BlizzardSpellRawData, GetUnitAbilityLevel( Caster, IcyEndSpellRawData ) )
    call IssuePointOrderLoc( Dummy, BlizzardOrderString, DummyLoc )
    call ForGroup( UnitsNear, function FrostCage )
    call RemoveLocation( DummyLoc )
    call DestroyGroup( UnitsNear )
    set Caster = null
    set Dummy = null
    set DummyLoc = null
    set UnitsNear = null
endfunction

private function Initial takes nothing returns nothing
    local trigger trig = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( trig, Condition( function Conditions ) )
    call TriggerAddAction( trig, function Actions )
    set trig = null
endfunction

endscope

Terra Rage

GUI/JASS: vJASS
MUI/MPI: MUI and MPI
Leakless?: Yep
Lagless?: Yep
Requirements: NewGen and PolledWait2(Inside the map)
Import Difficult: Medium

Description: Summons the fury of earth, causing the ground shake in a eternal rage. Every 0.5 seconds a Earth Stomp will occur, stunning enemies for 2 seconds and dealing damage.

Level 1 - Earth Stomp will deal 150 damage.
Level 2 - Earth Stomp will deal 200 damage.
Level 3 - Earth Stomp will deal 250 damage.
Level 4 - Earth Stomp will deal 300 damage.


Screenshots:

Code:
JASS:
//////////////////////////////////////////////
////              Terra Rage              ////
////          by Magoiche Saika           ////
//////////////////////////////////////////////
////NOTE: Everything that you can't change////
////       in this script you can in the  ////
////              Object Editor.          ////
//////////////////////////////////////////////

scope TerraRage initializer Initial

globals
    private constant integer TerraRageRawData = 'A007'
    // Raw Data of the Terra Rage spell
    private constant integer EarthStompRawData = 'A008'
    // Raw Data of the Earth Stomp spell
    private constant integer TerraRageDummyRawData = 'u001'
    // Raw Data of the Dummy
    private constant integer NumberOfEarthStomps = 7
    // Number of Earth Stomps per Spell Level
    private constant integer TerraRageNumberOfEffects = 8
    // Number of Special Effects
    private constant real TerraRageAoE = 500.0
    // AoE of Terra Rage
    private constant real EarthStompWaitInterval = 0.5
    // Seconds between each Earth Stomp
    private constant string EarthStompOrderString = "stomp"
    // Earth Stomp Use/Turn On Order Id
    private constant string TerraRageGroundEffect = "Abilities\\Spells\\Orc\\EarthQuake\\EarthQuakeTarget.mdl"
    // Effect that apears on the ground
    private constant string EarthStompEffect = "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl"
    // Effect that apears on the Earth Stomp Area
endglobals

// Dont change anything after this line if you don't know what you are doing.

private function Conditions takes nothing returns boolean
    return GetSpellAbilityId() == TerraRageRawData
endfunction

private function Actions takes nothing returns nothing
    local unit Caster = GetTriggerUnit()
    local integer LoopAIndex = 0
    local real RandomAngle
    local real RandomReal
    local location RandomLoc
    local real x
    local real y
    local unit Dummy = CreateUnit( GetOwningPlayer( Caster ), TerraRageDummyRawData, GetUnitX( Caster ), GetUnitY( Caster ), 0.0 )
    local effect array Effect
    call UnitApplyTimedLife( Dummy, 'BFTL', 1.0 )
    loop
        exitwhen LoopAIndex >= TerraRageNumberOfEffects
        set RandomReal = GetRandomReal( 0.0, TerraRageAoE + 200 )
        set RandomAngle = GetRandomReal( 0.0 , 360.0 )
        set x = GetUnitX( Dummy ) + RandomReal * Cos( RandomAngle * 3.14159 / 180.0 )
        set y = GetUnitY( Dummy ) + RandomReal * Sin( RandomAngle * 3.14159 / 180.0 )
        set RandomLoc = Location( x, y )
        set Effect[LoopAIndex] = AddSpecialEffectLoc( TerraRageGroundEffect, RandomLoc )
        set LoopAIndex = LoopAIndex + 1
    endloop
    set LoopAIndex = 0
    loop
        exitwhen LoopAIndex >= 7 * GetUnitAbilityLevel( Caster, TerraRageRawData )
        set RandomReal = GetRandomReal( 0.0, TerraRageAoE )
        set RandomAngle = GetRandomReal( 0.0 , 360.0 )
        set x = GetUnitX( Dummy ) + RandomReal * Cos( RandomAngle * 3.14159 / 180.0 )
        set y = GetUnitY( Dummy ) + RandomReal * Sin( RandomAngle * 3.14159 / 180.0 )
        set RandomLoc = Location( x, y )
        set Dummy = CreateUnit( GetOwningPlayer( Caster ), TerraRageDummyRawData, x, y, 0.0 )
        call DestroyEffect( AddSpecialEffectLoc( EarthStompEffect, RandomLoc ) )
        call UnitApplyTimedLife( Dummy, 'BFTL', 5.0 )
        call UnitAddAbility( Dummy, EarthStompRawData )
        call SetUnitAbilityLevel( Dummy, EarthStompRawData, GetUnitAbilityLevel( Caster, TerraRageRawData ) )
        call IssueImmediateOrder( Dummy, EarthStompOrderString )
        call PolledWait2( EarthStompWaitInterval )
        set LoopAIndex = LoopAIndex + 1
    endloop
    set LoopAIndex = 0
    loop
        exitwhen LoopAIndex >= TerraRageNumberOfEffects
        call DestroyEffect( Effect[LoopAIndex] )
        set Effect[LoopAIndex] = null
        set LoopAIndex = LoopAIndex + 1
    endloop
    call RemoveLocation( RandomLoc )
    set Caster = null
    set Dummy = null
    set RandomLoc = null
endfunction

private function Initial takes nothing returns nothing
    local trigger trig = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( trig, Condition( function Conditions ) )
    call TriggerAddAction( trig, function Actions )
    set trig = null
endfunction

endscope

Fiery Fire

GUI/JASS: vJASS
MUI/MPI: MUI and MPI
Leakless?: Yep
Lagless?: Yep
Requirements: NewGen and PolledWait2(Inside the map)
Import Difficult: Medium

Description: The caster enters in a Self Destruction process. After 10 seconds it will explode doing damage to all nearby enemies.

Level 1 - 150 Damage.
Level 2 - 300 Damage.
Level 3 - 450 Damage.
Level 4 - 600 Damage.


Screenshots:

Code:
JASS:
//////////////////////////////////////////////
////              Fiery Fire              ////
////          by Magoiche Saika           ////
//////////////////////////////////////////////
////NOTE: Everything that you can't change////
////       in this script you can in the  ////
////              Object Editor.          ////
//////////////////////////////////////////////

scope FieryFire initializer Initial

globals
    private constant integer FieryFireRawData = 'A003'
    // Raw Data of the Fiery Fire spell
    private constant integer FieryFireDummyRawData = 'u000'
    // Raw Data of the Fire Dummy
    private constant integer FieryFireDamageMultiplier = 150
    // Damage per Spell Level
    private constant real FieryFireAoE = 500.0
    // AoE of FieryFire
    private constant real TimeToExplode = 10.0
    // Seconds to the caster explodes
    private constant attacktype FieryFireAttackType = ATTACK_TYPE_NORMAL
    // Attack Type of the spell
    private constant damagetype FieryFireDamageType = DAMAGE_TYPE_NORMAL
    // Damage Type of the spell
endglobals

// Dont change anything after this line if you don't know what you are doing.

private function Conditions takes nothing returns boolean
    return GetSpellAbilityId() == FieryFireRawData
endfunction

private function TargetConditions takes nothing returns boolean
    return IsUnitEnemy( GetFilterUnit(), GetOwningPlayer( GetTriggerUnit() ) ) == true and GetWidgetLife( GetFilterUnit() ) > 0
endfunction

private function Fire takes nothing returns nothing
    local unit Caster = GetTriggerUnit()
    call UnitDamageTarget( Caster, GetEnumUnit(), FieryFireDamageMultiplier * GetUnitAbilityLevel( Caster, FieryFireRawData ), true, false, FieryFireAttackType, FieryFireDamageType, null )
    set Caster = null
endfunction

private function Actions takes nothing returns nothing
    local unit Caster = GetTriggerUnit()
    local location CasterLoc
    local unit Dummy
    local integer LoopAIndex = 0
    local integer VertexColor = 255
    local group UnitsNear
    loop
        exitwhen LoopAIndex >= 10
        call SetUnitVertexColor( Caster, 255, VertexColor, VertexColor, 255 )
        set VertexColor = VertexColor - 25
        set LoopAIndex = LoopAIndex + 1
        call PolledWait2( TimeToExplode/10.0 )
    endloop
    set  CasterLoc = Location( GetUnitX( Caster ), GetUnitY( Caster ) )
    call UnitDamageTarget( Caster, Caster, 99999999.0, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, null )
    set Dummy = CreateUnit( GetOwningPlayer( Caster ), FieryFireDummyRawData, GetUnitX( Caster ), GetUnitY( Caster ), 0.0 )
    call SetUnitAnimation( Dummy, "birth" )
    call UnitApplyTimedLife( Dummy, 'BTLF', 5.0 )
    set UnitsNear = GetUnitsInRangeOfLocMatching( FieryFireAoE, CasterLoc, Condition( function TargetConditions ) )
    call ForGroup( UnitsNear, function Fire )
    call SetUnitVertexColor( Caster, 255, 255, 255, 255 )
    call DestroyGroup( UnitsNear )
    call RemoveLocation( CasterLoc )
    set Caster = null
    set Dummy = null
    set UnitsNear = null
    set CasterLoc = null
endfunction

private function Initial takes nothing returns nothing
    local trigger trig = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( trig, Condition( function Conditions ) )
    call TriggerAddAction( trig, function Actions )
    set trig = null
endfunction

endscope

Wild Wind

GUI/JASS: vJASS
MUI/MPI: MUI and MPI
Leakless?: Yep
Lagless?: Yep
Requirements: NewGen
Import Difficult: Medium

Description: The Caster make the wind around him enter in a rage state creating tornados around him. Tornadoes can slow and toss enemies in the air.

Level 1 - 2 Tornados. Lasts 10 seconds.
Level 2 - 4 Tornados. Lasts 20 seconds.
Level 3 - 6 Tornados. Lasts 30 seconds.
Level 4 - 8 Tornados. Lasts 40 seconds.


Screenshots:

Code:
JASS:
//////////////////////////////////////////////
////              Wild Wind               ////
////          by Magoiche Saika           ////
//////////////////////////////////////////////
////NOTE: Everything that you can't change////
////       in this script you can in the  ////
////              Object Editor.          ////
//////////////////////////////////////////////

scope WildWind initializer Initial

globals
    private constant integer WildWindRawData = 'A00D'
    // Raw Data of the Wild Wind spell
    private constant integer TornadoDummy = 'u004'
    // Raw Data of the Tornado Dummy
    private constant real NumberOfTornados = 1.5
    // Number of tornados per Spell Level
    private constant real TornadoDuration = 10
    // Duration of tornodos per Spell Level
endglobals

// Dont change anything after this line if you don't know what you are doing.

private function Conditions takes nothing returns boolean
    return GetSpellAbilityId() == WildWindRawData
endfunction

private function Actions takes nothing returns nothing
    local integer LoopAIndex = 0
    local unit Caster = GetTriggerUnit()
    local real x = GetUnitX( Caster )
    local real y = GetUnitY( Caster )
    local real CastAngle = GetUnitFacing( Caster )
    local real RandomReal
    local unit Dummy
    local real DummyX
    local real DummyY
    local real NumberOfTornadosFormula = NumberOfTornados * GetUnitAbilityLevel( Caster, WildWindRawData )
    loop
        exitwhen LoopAIndex >= R2I ( NumberOfTornadosFormula )
        set Dummy = CreateUnit( GetOwningPlayer( Caster ), TornadoDummy, x, y, 0 )
        call UnitApplyTimedLife( Dummy, 'BTFL', TornadoDuration * GetUnitAbilityLevel( Caster, WildWindRawData ) )
        set LoopAIndex = LoopAIndex + 1
    endloop
    set Dummy = null
    set Caster = null
endfunction

private function Initial takes nothing returns nothing
    local trigger trig = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( trig, Condition( function Conditions ) )
    call TriggerAddAction( trig, function Actions )
    set trig = null
endfunction

endscope

Tidal Wave

GUI/JASS: vJASS
MUI/MPI: MUI and MPI
Leakless?: Yep
Lagless?: Yep
Requirements: NewGen
Import Difficult: Medium

Description: Calls the power of the almighty Tidal spirits to crush enemies with pure water essence. Each Wave do 250 damage.

Level 1 - 2 Waves and 700 AoE.
Level 2 - 4 Waves and 900 AoE.
Level 3 - 6 Waves and 1100 AoE.
Level 4 - 8 Waves and 1300 AoE.


Screenshots:

Code:
JASS:
//////////////////////////////////////////////
////             Tidal Wave               ////
////          by Magoiche Saika           ////
//////////////////////////////////////////////
////NOTE: Everything that you can't change////
////       in this script you can in the  ////
////              Object Editor.          ////
//////////////////////////////////////////////

scope TidalWave initializer Initial

globals
    private constant integer TidalWaveRawData = 'A00E'
    // Raw Data of the Tidal Wave spell
    private constant integer CrushingWaveRawData = 'A00F'
    // Raw Data of the Crushing Wave spell
    private constant integer TidalWaveDummy = 'u001'
    // Raw Data of the dummy
    private constant integer TidalWaveNumberOfWaves = 2
    // Number of waves per Spell Level
    private constant string CrushingWaveOrderString = "carrionswarm"
    // Crushing Wave Use/Turn On Order Id
endglobals

// Dont change anything after this line if you don't know what you are doing.

private function Conditions takes nothing returns boolean
    return GetSpellAbilityId() == TidalWaveRawData
endfunction

private function Actions takes nothing returns nothing
    local integer LoopAIndex = 0
    local unit Caster = GetTriggerUnit()
    local real x = GetUnitX( Caster )
    local real y = GetUnitY( Caster )
    local real CastAngle = GetUnitFacing( Caster )
    local unit Dummy
    local integer NumberOfWavesFormula = TidalWaveNumberOfWaves * GetUnitAbilityLevel( Caster, TidalWaveRawData )
    loop
        exitwhen LoopAIndex >= NumberOfWavesFormula
        set CastAngle = CastAngle + 360.0 / NumberOfWavesFormula
        set Dummy = CreateUnit( GetOwningPlayer( Caster ), TidalWaveDummy, x, y, CastAngle )
        call UnitApplyTimedLife( Dummy, 'BTFL', 5.00 )
        call UnitAddAbility( Dummy, CrushingWaveRawData )
        call SetUnitAbilityLevel( Dummy, CrushingWaveRawData, GetUnitAbilityLevel( Caster, TidalWaveRawData ) )
        call IssuePointOrder( Dummy, CrushingWaveOrderString, x, y )
        set LoopAIndex = LoopAIndex + 1
    endloop
    set Dummy = null
    set Caster = null
endfunction

private function Initial takes nothing returns nothing
    local trigger trig = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( trig, Condition( function Conditions ) )
    call TriggerAddAction( trig, function Actions )
    set trig = null
endfunction

endscope

Holy Punishment

GUI/JASS: vJASS
MUI/MPI: MUI and MPI
Leakless?: Yep
Lagless?: Yep
Requirements: NewGen and PolledWait2(Inside the map)
Import Difficult: Medium

Description: Subjugates the target enemy, turning all of its mana into pure unstable holy energy.

Level 1 - Deals ( 0.5 x Current Enemy Mana ) damage.
Level 2 - Deals ( 1.0 x Current Enemy Mana ) damage.
Level 3 - Deals ( 1.5 x Current Enemy Mana ) damage.
Level 4 - Deals ( 2.0 x Current Enemy Mana ) damage.


Screenshots:

Code:
JASS:
//////////////////////////////////////////////
////           Holy Punishment            ////
////          by Magoiche Saika           ////
//////////////////////////////////////////////
////NOTE: Everything that you can't change////
////       in this script you can in the  ////
////              Object Editor.          ////
//////////////////////////////////////////////

scope HolyPunishment initializer Initial

globals
    private constant integer HolyPunishmentSpellRawData = 'A002'
    // Raw Data of the Holy Punishment spell
    private constant real HolyPunishmentWaitTime = 20.0
    // Time to wait before damage is done
    private constant real HolyPunishmentDamageModifier = 0.5
    // Percentage of Mana target mana done in damage. 0.5 being 50% per level
    private constant string HolyPunishmentOnTargetEffect = "Abilities\\Spells\\Human\\DivineShield\\DivineShieldTarget.mdl"
    // Effect that remains on target till the damage is done
    private constant string HolyPunishmentOnDamageEffect = "Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl"
    // Effect that apears on the damage time
    private constant string HolyPunishmentOnTargetEffectAttachmentPoint = "origin"
    // Attachment point of the OnTargetEffect
    private constant string HolyPunishmentOnDamageEffectAttachmentPoint = "origin"
    // Attachment point of the OnDamageEffect
endglobals

// Dont change anything after this line if you don't know what you are doing.

private function Conditions takes nothing returns boolean
    return GetSpellAbilityId() == HolyPunishmentSpellRawData
endfunction

private function Actions takes nothing returns nothing
    local unit Caster = GetTriggerUnit()
    local unit Target = GetSpellTargetUnit()
    local real Mana
    local effect Effect = AddSpecialEffectTarget( HolyPunishmentOnTargetEffect, Target, HolyPunishmentOnTargetEffectAttachmentPoint )
    call PolledWait2( HolyPunishmentWaitTime )
    set Mana = GetUnitState( Target, UNIT_STATE_MANA )
    call SetUnitState( Target, UNIT_STATE_MANA, 0.0 )
    call UnitDamageTarget( Caster, Target, Mana * ( HolyPunishmentDamageModifier * GetUnitAbilityLevel( Caster, HolyPunishmentSpellRawData ) ), true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, null )
    call DestroyEffect( AddSpecialEffectTarget( HolyPunishmentOnDamageEffect, Target, HolyPunishmentOnDamageEffectAttachmentPoint ) )
    call DestroyEffect( Effect )
    set Caster = null
    set Target = null
    set Effect = null
endfunction

private function Initial takes nothing returns nothing
    local trigger trig = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( trig, Condition( function Conditions ) )
    call TriggerAddAction( trig, function Actions )
    set trig = null
endfunction

endscope

Afterdark

GUI/JASS: vJASS
MUI/MPI: MUI and MPI
Leakless?: Yep
Lagless?: Yep
Import Difficult: Medium

Description: The darkness inside the caster is so powerfull that it still exists even if the caster dies. Deals damage to enemies and heal allies.

Level 1 - Deals 4 damage to enemies and heal 2 HP for allies.
Level 2 - Deals 12 damage to enemies and heal 6 HP for allies.
Level 3 - Deals 20 damage to enemies and heal 10 HP for allies.
Level 4 - Deals 28 damage to enemies and heal 14 HP for allies.


Screenshots:

Code:
JASS:
//////////////////////////////////////////////
////              Afterdark               ////
////          by Magoiche Saika           ////
//////////////////////////////////////////////
////NOTE: Everything that you can't change////
////       in this script you can in the  ////
////              Object Editor.          ////
//////////////////////////////////////////////

scope Afterdark initializer Initial

globals
    private constant integer AfterdarkSpellRawData = 'A009'
    // Raw Data of the Afterdark spell
    private constant integer DarkShotRawData = 'A00A'
    // Raw Data of the Dark Shot spell
    private constant integer DarkHealRawData = 'A00B'
    // Raw Data of the Dark Heal spell
    private constant integer DarkSwarmRawData = 'A00C'
    // Raw Data of the Dark Swarm spell
    private constant real AfterdarkDuration = 20.0
    // Duration of the Spell. Recommended to be the same duration as Dark Swarm
    private constant integer AffterdarkDummyRawData = 'u002'
    // Raw Data of the Dark dummy
    private constant string DarkSwarmOrderId = "Locustswarm"
    // Dark Swarm Use/Turn On Order Id
endglobals

// Dont change anything after this line if you don't know what you are doing.

private function Conditions takes nothing returns boolean
	return GetUnitAbilityLevel( GetTriggerUnit(), AfterdarkSpellRawData ) > 0
endfunction

private function Actions takes nothing returns nothing
    local unit Caster = GetTriggerUnit()
    local unit Dummy = CreateUnit( GetOwningPlayer( Caster ), AffterdarkDummyRawData, GetUnitX( Caster ), GetUnitY( Caster ), 0.00 )
    call SetUnitColor( Dummy, ConvertPlayerColor(12) )
    call UnitAddAbility( Dummy, DarkSwarmRawData )
    call SetUnitAbilityLevel( Dummy, DarkSwarmRawData, GetUnitAbilityLevel( Caster, AfterdarkSpellRawData ) )
    call IssueImmediateOrder( Dummy, DarkSwarmOrderId )
    call UnitApplyTimedLife( Dummy, 'BTLF', AfterdarkDuration )
    call UnitAddAbility( Dummy, DarkShotRawData )
    call SetUnitAbilityLevel( Dummy, DarkShotRawData, GetUnitAbilityLevel( Caster, AfterdarkSpellRawData ) )
    call UnitAddAbility( Dummy, DarkHealRawData )
    call SetUnitAbilityLevel( Dummy, DarkHealRawData, GetUnitAbilityLevel( Caster, AfterdarkSpellRawData ) )
    set Caster = null
    set Dummy = null
endfunction

private function Initial takes nothing returns nothing
    local trigger trig = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddCondition( trig, Condition( function Conditions ) )
    call TriggerAddAction( trig, function Actions )
    set trig = null
endfunction

endscope

Requiem

GUI/JASS: vJASS
MUI/MPI: MUI and MPI
Leakless?: Yep
Lagless?: Yep
Import Difficult: Medium

Description: Conjure the wrath of the immortal requiem forces uppon the enemies. Affected units will be either silenced or slowed or cursed or have their armor reduced.

Level 1 - Effects lasts 10 seconds.
Level 2 - Effects lasts 12 seconds.
Level 3 - Effects lasts 14 seconds.
Level 4 - Effects lasts 16 seconds.


Screenshots:

Code:
JASS:
//////////////////////////////////////////////
////               Requiem                ////
////          by Magoiche Saika           ////
//////////////////////////////////////////////
////NOTE: Everything that you can't change////
////       in this script you can in the  ////
////              Object Editor.          ////
//////////////////////////////////////////////

scope Requiem initializer Initial

globals
    private constant integer RequiemSpellRawData = 'A00G'
    // Raw Data of the Requiem spell
    private constant integer RequiemDummyRawData = 'u001'
    // Raw Data of the Dark dummy
    private constant integer RequiemAoE = 700
    // AoE of the Spell. Remember to see if the cast range of the other spells are equal or bigger than this value
    // Dont Change the Lines bellow please
    integer array RequiemSpellsRawData
    string array RequiemSpellsOrderID
    string array RequiemSpellsEffect
    string array RequiemSpellsAttachmentPoints
    // Dont Change the Lines Above please
    constant integer RequiemNumberOfSpells = 4
    // Total number of spells
endglobals

private function Spells takes nothing returns nothing
    set RequiemSpellsRawData[0] = 'A00H'
    set RequiemSpellsOrderID[0] = "faeriefire"
    set RequiemSpellsEffect[0] = "Abilities\\Spells\\Undead\\UndeadMine\\UndeadMineCircle.mdl"
    set RequiemSpellsAttachmentPoints[0] = "origin"
    set RequiemSpellsRawData[1] = 'A00I'
    set RequiemSpellsOrderID[1] = "curse"
    set RequiemSpellsEffect[1] = "Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl"
    set RequiemSpellsAttachmentPoints[1] = "origin"
    set RequiemSpellsRawData[2] = 'A00J'
    set RequiemSpellsOrderID[2] = "slow"
    set RequiemSpellsEffect[2] = "Objects\\Spawnmodels\\NightElf\\EntBirthTarget\\EntBirthTarget.mdl"
    set RequiemSpellsAttachmentPoints[2] = "origin"
    set RequiemSpellsRawData[3] = 'A00K'
    set RequiemSpellsOrderID[3] = "soulburn"
    set RequiemSpellsEffect[3] = "Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl"
    set RequiemSpellsAttachmentPoints[3] = "origin"
endfunction

// To make the spell works propely you have to
// put the Spell Raw Data with the right Spell Order ID
// effect path and attachment point.
// Just change them to the right ones. Its easy.
// To add more spells just add 4 lines bellow the linw 18
// There lines must be like these:
// set RequiemSpellsRawData[4] = 'Spell Raw Data'
// set RequiemSpellsOrderID[4] = "Spell Order Id"
// set RequiemSpellsEffect[4] = "Patch to the effect"
// RequiemSpellsAttachmentPoints[4] = "Attachment Point"
// NOTE: I call it debufs but it can be any Unit Target spells
// REMEMBER: There must be two "\\". If you juts copy the path from the
// object editor there will be only one "\" so remember to put two '\\'

// Dont change anything after this line if you don't know what you are doing.

private function Conditions takes nothing returns boolean
    return GetSpellAbilityId() == RequiemSpellRawData
endfunction

private function TargetConditions takes nothing returns boolean
    return IsUnitEnemy( GetFilterUnit(), GetOwningPlayer( GetTriggerUnit() ) ) == true and GetWidgetLife( GetFilterUnit() ) > 0
endfunction

private function Debuff takes nothing returns nothing
    local integer RandomNumber = GetRandomInt( 0, RequiemNumberOfSpells - 1 )
    local unit Caster = GetTriggerUnit()
    local unit Target = GetEnumUnit()
    local unit Dummy = CreateUnit( GetOwningPlayer( Caster ), RequiemDummyRawData, GetUnitX( Caster ), GetUnitY( Caster ), 0.0 )
    call UnitApplyTimedLife( Dummy, 'BTLF', 5.0 )
    call UnitAddAbility( Dummy, RequiemSpellsRawData[RandomNumber] )
    call SetUnitAbilityLevel( Dummy, RequiemSpellsRawData[RandomNumber], GetUnitAbilityLevel( Caster, RequiemSpellRawData ) )
    call IssueTargetOrder( Dummy, RequiemSpellsOrderID[RandomNumber], Target )
    call DestroyEffect( AddSpecialEffectTarget( RequiemSpellsEffect[RandomNumber], Target, RequiemSpellsAttachmentPoints[RandomNumber] ) )
    set Caster = null
    set Target = null
    set Dummy = null
endfunction

private function Actions takes nothing returns nothing
    local unit Caster = GetTriggerUnit()
    local real x = GetUnitX( Caster )
    local real y = GetUnitY( Caster )
    local location CasterLoc = Location( x, y )
    local group UnitsNear = GetUnitsInRangeOfLocMatching( RequiemAoE, CasterLoc, Condition( function TargetConditions ) )
    call ForGroup( UnitsNear, function Debuff )
    call DestroyGroup( UnitsNear )
    call RemoveLocation( CasterLoc )
    set Caster = null
    set UnitsNear = null
    set CasterLoc = null
endfunction

private function Initial takes nothing returns nothing
    local trigger trig = CreateTrigger()
    call Spells()
    call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_SPELL_ENDCAST )
    call TriggerAddCondition( trig, Condition( function Conditions ) )
    call TriggerAddAction( trig, function Actions )
    set trig = null
endfunction

endscope



Notes
- These are some of my first spells in VJASS. So don't kill me if i did a very very dumb error. x.x

Credits
- Vexorian for the PolledWait2


Changelog
v1.0 - Created and Submited the Spellpack
v1.1 - Fized some bugs in Terra Rage and switched from GetUnitLoc() to X and Y cordinates in Tera Rage and Fiery Fire.
v1.2 - Script optmization in all spells. Add the Wind spell Wild Wind and the water spell Tidal Wave.
v1.3 - Small changes in all scripts. Add the Neutral spell Requiem. Changed the spellpack name to Elemental Requiem
 

UndeadDragon

Super Moderator
Staff member
>Firey Fire

Well, I would hope that fire was firey :p

They look good. Have not tested yet, but they look pretty interesting, especially for your first JASS spells.
 

Magoiche

Member
Its Fiery!
The Fire is Fiery!

Oh rly?
Ya rly!

Anyway, I need some ideas for the Water spell. =O
I am doing right now the Wind one.
I think later tonight or maybe tomorow i add it to this post.
 

Naga'sShadow

Ultra Cool Member
Neat ideas.

If you use X and Y coordinates instead of locations you can inline your code a bid more, runs faster as you call fewer functions. Either way I didn't notice any massive leaks so gj.
 

Magoiche

Member
Version 1.2 is LIVE! u.u

- 2 New Spells( Water and Wind )
- Script Optimization on every Spell

Hope ou like it!

=D
 

Magoiche

Member
Version 1.3 is LIVE!

- A new spell: Requiem
- Small(but effective) changes in every spell

Hope you like it!


What can i say?
I will cry! T.T

143 views but only 2 comments and 2~5 downloads?!
I will cry!

Come On people. My spells are realy that bad?
If they are. Say it! Then i will change everything is needed to make these spells be good spells.
I don't think taht i am the only who think like that.
I see much good spells, systems, snipets, whatever it is.
And they are good! But they don't gets the attention it deserves.
Comment people!
There is nothing better to a person who make things(anythings)
to see people giving feedback to their works.
At least, i think that way.

Comment please! T.T
(And thanks if you read it)

i.i
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • tom_mai78101 tom_mai78101:
    Would like to get some annual forum statistics report.
  • The Helper The Helper:
    there are stats in the xenforo forum admin section and we have matomo stats we started collecting beginning of the year so we will not have annual on that until next year
  • The Helper The Helper:
    I thought you had keys to the bathroom Tom? Ghan does Tom have access to the stats thread in the bathroom
  • The Helper The Helper:
    since I started jacking with the bots on the site we doubled our page views on the site in a week lol
  • The Helper The Helper:
    I have been having lots of fun
  • The Helper The Helper:
    we have had like 6000 views of the American Airlines economy class thread in the last week
  • The Helper The Helper:
    I ought to stick a travel affiliate link or something on that page to try and monetize that they are just going there and leaving it might even be bots I am not sure
  • The Helper The Helper:
    I just got into it with the Atari VCS Facebook Moderator I started trolling him and almost got banned
  • The Helper The Helper:
    They deleted one of my posts one time so I was trolling him on a help post I put up because I am evil I guess and bored and the guy handled it well I loved his attitude Atari has a good social media presence even if they do not have many games.
  • The Helper The Helper:
    The French Atari they call them even though they are like totally based in America they just have French Money coming in. Gotta love it
  • Ghan Ghan:
    Microsoft buying Activision Blizzard holy crap!
  • The Helper The Helper:
    I know right holy cow
  • Accname Accname:
    Thats not going to save it.
  • The Helper The Helper:
    It might
  • The Helper The Helper:
    They are going to use alot of that IP in the Metaverse
  • The Helper The Helper:
    I found a new section of the stats that is freaking interesting!
  • The Helper The Helper:
    oh yeah this is what I was looking for good job matomo! These are some sweet stats I am learning the interface on it too!
  • The Helper The Helper:
    If anyone ever asks later how I found out about it was watching the site bots but not watching what they were doing but asking myself why they were here?
  • The Helper The Helper:
    there must be a reason and ok that is it
  • The Helper The Helper:
    the past and the future all come together into one
  • The Helper The Helper:
    the search engines are what built thehelper.net the search engines will make it big again maybe
  • The Helper The Helper:
    the real question is are 5 million links better than 60 real good links?
  • The Helper The Helper:
    the answer is 60 lol
  • The Helper The Helper:
    unless you put 100k links on it lol then you get something

    Members online

    No members online now.

    Affiliates

    Hive Workshop NUON Dome
    Top