Spellpack Volcano Giant Spellpack

scorpion182

New Member
Reaction score
5
This was my submission for the Hive Hero Contest #2. Contains 4 Spells.

1. Tremor

Ability Type: Active
Target Type: None
Effect: Area Damage & Summon

Description:
Slams the ground causing 3 boulders rippled out from the ground and dealing initial damage. When a boulder crushes the ground it takes damage, and summons a lava spawn.

Level 1 - Deals 50 initial damage, 90 damage each boulder.
Level 2 - Deals 100 initial damage, 180 damage each boulder.
Level 3 - Deals 150 initial damage, 270 damage each boulder.



JASS:

//============================================================================================
//Tremor by scorpion182
//2009
//
//Requires :
//- vJASS compiler
//- TimerUtils by Vexorian
//- ParabolicMovement by Moyack
//Importing: You need to copy the following triggers below:
//- This trigger
//- TimerUtils,ParabolicMovement then
//- You need to copy the custom objects from the object editor.
//- Make sure the rawcodes of those objects matches the corresponding 
//  rawcode ids in this spell
//- Make sure you import the dummy.mdx model as well and gives it 
//  the path: war3mapImported\dummy.mdx     
//- Enjoy! Give credit where due!
//============================================================================================
scope VSlaM initializer INIT
//====Config Option===========================================================================
globals 
    private constant integer DUMMY_ID='e000' //dummy unit rawcode
    private constant integer SPELL_ID='A000' //tremor ability rawcode
    private constant real TIME_LIFE=15.0 //lava spawn time life
    private constant real DISTANCE=1500.0 //tremor distance
    private constant real M_H=500. //maximum height
    private constant real INIT_AOE=250. //inital damage AoE
    private constant real SPEED=15.0 //tremor movement speed
    private constant string CASTER_FX="Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl" //caster fx
    private constant string ATT_POINT="origin" //attachment point
    private constant string TREMOR_MISSILE="Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl" //tremor fx
    private constant attacktype AT=ATTACK_TYPE_HERO //attack type
    private constant damagetype DT=DAMAGE_TYPE_NORMAL //damage type
    private constant weapontype WT=WEAPON_TYPE_WHOKNOWS //weapon type
    
    private integer array LAVA[3] 
    private boolexpr b
endglobals

private function LAVA_SPAWN takes nothing returns nothing
    //=======Lava Spawn Config====================================================================
    set LAVA[0]='nlv1' //lava spawn lvl1 rawcode
    set LAVA[1]='nlv2' //lava spawn lvl2 rawcode
    set LAVA[2]='nlv3' //lava spawn lvl3 rawcode
    //============================================================================================
endfunction

private constant function INITIAL_DAMAGE takes integer lvl returns real
    return 50.*lvl //initial damage
endfunction

private constant function TREMOR_DAMAGE takes integer lvl returns real
    return 90.*lvl //tremor damage
endfunction

//============================================================================================
private struct data
    unit caster
    unit array missile[3]
    timer t
    real dist
    real pos
    effect array fx[3]
    real array deg[3]
    
    static method create takes unit c, timer t returns data
        local data d=data.allocate()
        set d.caster=c
        set d.t=t
        set d.dist=0.
        set d.deg[0]=0.
        set d.deg[1]=120.
        set d.deg[2]=-120.
        return d
    endmethod
    
    private method onDestroy takes nothing returns nothing
        local integer i=0
        
        loop
        exitwhen i>2
            call KillUnit(.missile<i>)
            call DestroyEffect(.fx<i>)
            set .missile<i>=null
            set .fx<i>=null
            set i=i+1
        endloop
        
        call ReleaseTimer(.t)
        
    endmethod
endstruct

private function filter takes nothing returns boolean
    return (IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false) and (IsUnitType(GetFilterUnit(), UNIT_TYPE_MAGIC_IMMUNE)==false) and (GetWidgetLife(GetFilterUnit()) &gt; 0.405)
endfunction 

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

private function Move takes nothing returns nothing
    local timer t=GetExpiredTimer()
    local data d=data(GetTimerData(t))
    local real x 
    local real y 
    local integer i=0
    local group g
    local unit PickedUnit
    local integer lvl=GetUnitAbilityLevel(d.caster,SPELL_ID)
    local real dmg=TREMOR_DAMAGE(lvl) 
    
    if (d.pos &gt; 0) then
        loop
        exitwhen i&gt;2
            call SetUnitPosition(d.missile<i>, GetUnitX(d.missile<i>) + SPEED * Cos(bj_DEGTORAD*(GetUnitFacing(d.missile<i>)+d.deg<i>)), GetUnitY(d.missile<i>) + SPEED * Sin(bj_DEGTORAD*(GetUnitFacing(d.missile<i>)+d.deg<i>)))
            set d.pos = d.pos - SPEED
            call SetUnitFlyHeight(d.missile<i>, ParabolaZ(M_H, d.dist, d.pos), 0)
            set i=i+1
        endloop
        call TimerStart(t,0.03125,false,function Move)
    else
        set i=0
        loop
        exitwhen i&gt;2 
            set PickedUnit=CreateUnit(GetOwningPlayer(d.missile<i>),LAVA[lvl-1],GetUnitX(d.missile<i>),GetUnitY(d.missile<i>),GetUnitFacing(d.missile<i>))
            call UnitApplyTimedLife(PickedUnit,&#039;BTLF&#039;,TIME_LIFE)
            set g=CreateGroup()
            call GroupEnumUnitsInRange(g,GetUnitX(d.missile<i>),GetUnitY(d.missile<i>),200.,b)
        
            loop
            set PickedUnit = FirstOfGroup(g)
            exitwhen PickedUnit==null
                if IsUnitEnemy(PickedUnit,GetOwningPlayer(d.caster)) then
                    call UnitDamageTarget(d.caster,PickedUnit, dmg, true, false, AT, DT, WT)
                endif
            call GroupRemoveUnit(g, PickedUnit)
            endloop
        
            call DestroyGroup(g)
        
            set i=i+1
        endloop
        
        call d.destroy()
    endif
    
    set t=null
endfunction

private function Actions takes nothing returns nothing
    local data d
    local timer t=NewTimer()
    local unit caster=GetSpellAbilityUnit()
    local real x=GetUnitX(caster) + DISTANCE * Cos(GetUnitFacing(caster) * bj_DEGTORAD)
    local real y=GetUnitY(caster) + DISTANCE * Sin(GetUnitFacing(caster) * bj_DEGTORAD)
    local real dx = x - GetUnitX(caster)
    local real dy = y - GetUnitY(caster)
    local integer i=0
    local group g
    local unit f
    local integer lvl=GetUnitAbilityLevel(caster,SPELL_ID)
    local real dmg=INITIAL_DAMAGE(lvl)
   
    set g=CreateGroup()
    call GroupEnumUnitsInRange(g,GetUnitX(caster),GetUnitY(caster),INIT_AOE,b)
        
    loop
        set f = FirstOfGroup(g)
    exitwhen f==null
        if IsUnitEnemy(f,GetOwningPlayer(caster)) then
            call UnitDamageTarget(caster,f, dmg, true, false, AT, DT, WT)
        endif
            call GroupRemoveUnit(g, f)
    endloop
        
    call DestroyGroup(g)
   
    set d=d.create(GetSpellAbilityUnit(),t)
    call DestroyEffect(AddSpecialEffectTarget(CASTER_FX,caster,ATT_POINT))
    
    loop
    exitwhen i&gt;2
        set d.missile<i>=CreateUnit(GetOwningPlayer(caster),DUMMY_ID,GetUnitX(caster),GetUnitY(caster),GetUnitFacing(caster))
        call SetUnitScale(d.missile<i>,2.,2.,2.)
        set d.fx<i>=AddSpecialEffectTarget(TREMOR_MISSILE,d.missile<i>,&quot;origin&quot;)
        set i=i+1
    endloop
    
    set d.dist=SquareRoot(dx * dx + dy * dy)
    set d.pos=d.dist
    call SetTimerData(t,integer(d))
    call TimerStart(t,0.03125,false,function Move)
    
    set f=null
    set g=null
    set caster=null
    set t=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 Conditions ) )
    call TriggerAddAction(t, function Actions )

    call LAVA_SPAWN()
    set b=Condition(function filter)
    
    set t=null
endfunction
endscope
</i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i>



2. Magma Crush

Ability Type: Active
Target Type: None
Effect: Area Damage

Description:
Slams the ground, tossing nearby enemy units into the air. Deals damage on impact.

Level 1 - Deals 60 damage.
Level 2 - Deals 100 damage.
Level 3 - Deals 140 damage.



JASS:

//============================================================================================
//Magma Crush by scorpion182
//2009
//
//Requires :
//- vJASS compiler
//- TimerUtils by Vexorian
//- ParabolicMovement by Moyack
//Importing: You need to copy the following triggers below:
//- This trigger
//- TimerUtils,ParabolicMovement, then
//- You need to copy the custom objects from the object editor.
//- Make sure the rawcodes of those objects matches the corresponding 
//  rawcode ids in this spell
//- Make sure you import the dummy.mdx model as well and gives it 
//  the path: war3mapImported\dummy.mdx     
//- Enjoy! Give credit where due!
//============================================================================================
scope MC initializer init
//====Config Option===========================================================================
globals 
    private constant integer DUMMY_ID=&#039;e000&#039; //dummy unit rawcode
    private constant integer SPELL_ID=&#039;A001&#039; //tremor ability rawcode
    private constant string CASTER_FX=&quot;Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl&quot; //caster fx
    private constant string VICTIM_FX1=&quot;Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl&quot; //victim fx1
    private constant string VICTIM_FX2=&quot;Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl&quot; //victim fx2
    private constant string C_ATT_POINT=&quot;origin&quot; //caster attachment point
    private constant string V_ATT_POINT=&quot;origin&quot; //target attachment point
    private constant attacktype AT=ATTACK_TYPE_HERO //attack type
    private constant damagetype DT=DAMAGE_TYPE_NORMAL //damage type
    private constant weapontype WT=WEAPON_TYPE_WHOKNOWS //weapon type
    private constant real MAX_HEIGHT=500. //maximum height
    private constant real SPEED=15 //target movement when fly
    private constant real RANGE=350. //aoe
endglobals

private constant function INITIAL_DAMAGE takes integer lvl returns real
    return 20+40.*lvl //initial damage
endfunction
//============================================================================================
private struct data
    unit caster
    timer t
    group victim
    real pos
    real dis
    
    static method create takes unit c, timer t returns data
        local data d=data.allocate()
        
        set d.caster=c
        set d.t=t
        set d.victim=CreateGroup()
        set d.pos=MAX_HEIGHT
        set d.dis=MAX_HEIGHT
        
        return d
    endmethod

    private method onDestroy takes nothing returns nothing
        local unit f
        
        loop
            set f=FirstOfGroup(.victim)
        exitwhen f==null
            call GroupRemoveUnit(.victim,f)
            call PauseUnit(f,false)
            call SetUnitAnimation(f,&quot;stand&quot;)
        endloop
        
        call DestroyGroup(.victim)
        call ReleaseTimer(.t)
        
    endmethod

endstruct

private function CopyGroup takes group g returns group
        set bj_groupAddGroupDest = CreateGroup()
        call ForGroup(g, function GroupAddGroupEnum)
        return bj_groupAddGroupDest
endfunction

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

private function filter takes nothing returns boolean
	return (IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false) and (IsUnitType(GetFilterUnit(), UNIT_TYPE_MAGIC_IMMUNE)==false) and (GetWidgetLife(GetFilterUnit()) &gt; 0.405)
endfunction

private function Start takes nothing returns nothing
    local timer t=GetExpiredTimer()
    local data d=data(GetTimerData(t))
    local unit f
    local group g=CreateGroup()
    local integer lvl=GetUnitAbilityLevel(d.caster,SPELL_ID)
    local real dmg=INITIAL_DAMAGE(lvl)
    
    set g=CopyGroup(d.victim)
    
    if (d.pos &gt; 0) then
        set d.pos = d.pos - SPEED
        
        loop
            set f=FirstOfGroup(g)
        exitwhen f==null
            call GroupRemoveUnit(g,f)
            call SetUnitFlyHeight(f, ParabolaZ(MAX_HEIGHT, d.dis, d.pos), 0)
        endloop
        
        call TimerStart(t,0.03125,false,function Start)
    else
        
        loop
            set f=FirstOfGroup(g)
        exitwhen f==null
            call GroupRemoveUnit(g,f)
            call SetUnitFlyHeight(f,0,0)
            call DestroyEffect(AddSpecialEffectTarget(VICTIM_FX1,f,V_ATT_POINT))
            call DestroyEffect(AddSpecialEffectTarget(VICTIM_FX2,f,V_ATT_POINT))
            call UnitDamageTarget(d.caster,f, dmg, true, false, AT, DT, WT)
        endloop
        
        call d.destroy()
    endif
    
    
    call DestroyGroup(g)
    
    set f=null
    set g=null
    set t=null
endfunction

private function Actions takes nothing returns nothing
    local timer t=NewTimer()
    local data d=data.create(GetTriggerUnit(),t)
    local boolexpr b=Condition(function filter)
    local group g=CreateGroup()
    local unit f
    
    set f=CreateUnit(GetOwningPlayer(d.caster),DUMMY_ID,GetUnitX(d.caster),GetUnitY(d.caster),0)
    call UnitApplyTimedLife(f,&#039;BTLF&#039;,0.3)
    call SetUnitScale(f,2.0,2.0,2.0)
    call SetTimerData(t,integer(d))
    call GroupEnumUnitsInRange(d.victim,GetUnitX(d.caster),GetUnitY(d.caster),RANGE,b)
    set g=CopyGroup(d.victim)
    
    call DestroyEffect(AddSpecialEffectTarget(CASTER_FX,f,C_ATT_POINT))
    
    loop
    set f=FirstOfGroup(g)
    exitwhen f==null
        call GroupRemoveUnit(g,f)
        if (IsUnitEnemy(f,GetOwningPlayer(d.caster))) then
            call PauseUnit(f,true)
            call SetUnitAnimation(f,&quot;death&quot;)
            call UnitAddAbility(f,&#039;Amrf&#039;)
            call UnitRemoveAbility(f,&#039;Amrf&#039;)
        else
            call GroupRemoveUnit(d.victim,f)
        endif
    endloop
    
    
    call TimerStart(t,0.03125,false,function Start)
    call DestroyGroup(g)
    
    set f=null
    set g=null
    set b=null
    set t=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 Conditions ) )
    call TriggerAddAction(t, function Actions )
    
    set t=null
endfunction
endscope

3. Enrage



Ability Type: Passive
Effect: Area Damage, Knockback, Remove Buffs

Description:
Grocklar has a 10% chance to unleash his rage aura. Knocking back nearby enemy units, and remove all negative buffs from him.

Level 1 - Deals 75 knockback damage.
Level 2 - Deals 100 knockback damage.
Level 3 - Deals 125 knockback damage.

JASS:

//============================================================================================
//Enrage by scorpion182
//2009
//
//Requires :
//- vJASS compiler
//- TimerUtils by Vexorian
//- Knockback System by Rising Dusk
//
//Importing: You need to copy the following triggers below:
//- This trigger
//- TimerUtils, Knockback, then
//- You need to copy the custom objects from the object editor.
//- Make sure the rawcodes of those objects matches the corresponding 
//  rawcode ids in this spell
//- Make sure you import the dummy.mdx model as well and gives it 
//  the path: war3mapImported\dummy.mdx     
//- Enjoy! Give credit where due!
//============================================================================================
scope ENR initializer init
//====Config Option===========================================================================
globals 
    private constant integer DUMMY_ID=&#039;e000&#039; //dummy unit rawcode
    private constant integer SPELL_ID=&#039;A005&#039; //Enrage ability rawcode
    private constant string CASTER_FX=&quot;Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdl&quot; //caster fx
    private constant string ATT_POINT=&quot;origin&quot; //caster&#039;s attachment point
    private constant attacktype AT=ATTACK_TYPE_HERO //attack type
    private constant damagetype DT=DAMAGE_TYPE_NORMAL //damage type
    private constant weapontype WT=WEAPON_TYPE_WHOKNOWS //weapon type
    private constant integer CHANCE=10 //10% chance
    private constant real RANGE=350.0 //aoe
    private constant real STARTSPEED=800. //knockback start speed
    private constant real DECREMENT=40. //knockback decrement
    
endglobals

private constant function INITIAL_DAMAGE takes integer lvl returns real
    return 50+25.*lvl //initial damage
endfunction
//============================================================================================
private function Conditions takes nothing returns boolean
    local integer i=GetRandomInt(1,100)
    return GetUnitAbilityLevel(GetTriggerUnit(),SPELL_ID) &gt; 0 and i&lt;=CHANCE
endfunction

private function filter takes nothing returns boolean
    return (IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false) and (IsUnitType(GetFilterUnit(), UNIT_TYPE_MAGIC_IMMUNE)==false) and (GetWidgetLife(GetFilterUnit()) &gt; 0.405)
endfunction 

private function Actions takes nothing returns nothing
    local unit caster=GetTriggerUnit()
    local unit f=CreateUnit(GetOwningPlayer(caster),DUMMY_ID,GetUnitX(caster),GetUnitY(caster),0)
    local real a
    local group g=CreateGroup()
    local boolexpr b=Condition(function filter)
    local integer lvl=GetUnitAbilityLevel(caster,SPELL_ID)
    local real dmg=INITIAL_DAMAGE(lvl)
    
    call UnitApplyTimedLife(f,&#039;BTLF&#039;,0.5)
    call SetUnitScale(f,2.0,2.0,2.0)
    call DestroyEffect(AddSpecialEffectTarget(CASTER_FX,caster,ATT_POINT))
    call UnitRemoveBuffs(caster,false,true)
    
    call GroupEnumUnitsInRange(g,GetUnitX(caster),GetUnitY(caster),RANGE,b)
    
    loop 
        set f=FirstOfGroup(g)
    exitwhen f==null
        call GroupRemoveUnit(g,f)
        if (IsUnitEnemy(f,GetOwningPlayer(caster))) then
            set a = 57.29582 * Atan2(GetUnitY(f) - GetUnitY(caster), GetUnitX(f) - GetUnitX(caster))
            call UnitDamageTarget(caster,f, dmg, true, false, AT, DT, WT)
            call KnockbackTarget(caster, f, a, STARTSPEED, DECREMENT, true, false, false)
        endif
    endloop
    
    call DestroyGroup(g)
    call DestroyBoolExpr(b)
    
    set b=null
    set f=null
    set g=null
    set caster=null
endfunction

//===========================================================================
private function init takes nothing returns nothing
    local trigger t = CreateTrigger(  )
    
    call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_ATTACKED )
    call TriggerAddCondition(t, Condition( function Conditions ) )
    call TriggerAddAction(t, function Actions )
    
    set t=null
endfunction
endscope

4. Meteor Shower



Ability Type: Channeling
Target Type: None
Effect: Area Damage, Ignite

Description:
Calls massive meteors fall from the sky, dealing massive damage and ignite to anyone who is directly hit by it.

JASS:

//============================================================================================
//Meteor Shower by scorpion182
//2009
//
//Requires :
//- vJASS compiler
//- TimerUtils by Vexorian
//
//Importing: You need to copy the following triggers below:
//- This trigger
//- TimerUtils, then
//- You need to copy the custom objects from the object editor.
//- Make sure the rawcodes of those objects matches the corresponding 
//  rawcode ids in this spell
//- Make sure you import the dummy.mdx model as well and gives it 
//  the path: war3mapImported\dummy.mdx     
//- Enjoy! Give credit where due!
//============================================================================================
scope MS initializer Init
//====Config Option===========================================================================
globals 
    private constant integer DUMMY_ID=&#039;e000&#039; //dummy unit rawcode
    private constant integer DUMMY_M_ID=&#039;h000&#039; //storm launcher unit
    private constant integer SPELL_ID=&#039;A002&#039; //meteor shower ability rawcode
    private constant integer DUMMY_SPELL=&#039;A003&#039; //meteor shower dummy ability rawcode
    private constant integer IGNITE=&#039;A004&#039;  //ignite rawcode
    private constant string ORDER=&quot;dispel&quot;
    private constant real AOE=600. //spell aoe
    private constant real METEOR_RANGE=175.0 //meteor aoe
    private constant attacktype AT=ATTACK_TYPE_HERO //attack type
    private constant damagetype DT=DAMAGE_TYPE_NORMAL //damage type
    private constant weapontype WT=WEAPON_TYPE_WHOKNOWS //weapon type

    private boolexpr b
endglobals

private constant function INITIAL_DAMAGE takes integer lvl returns real
    return 50.*lvl //initial damage
endfunction
//============================================================================================
private struct data
    unit caster
    timer t1
    
    static method create takes unit c, timer t1 returns data
        local data d=data.allocate()
        set d.caster=c
        set d.t1=t1
        
        return d
    endmethod
    
    private method onDestroy takes nothing returns nothing
        call ReleaseTimer(.t1)
        
    endmethod
endstruct

private function filter takes nothing returns boolean
	return (IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false) and (IsUnitType(GetFilterUnit(), UNIT_TYPE_MAGIC_IMMUNE)==false) and (GetWidgetLife(GetFilterUnit()) &gt; 0.405)
endfunction

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

private function Shower takes nothing returns nothing
    local timer time=GetExpiredTimer()
    local data d=data(GetTimerData(time))
    local unit c
    local unit t
    local integer i =0
    local real an = GetRandomReal ( 1 , 360 )
    local real dis = GetRandomReal ( 1 , AOE )
    local real rad = an *0.01734216
    local real x = GetUnitX (d.caster) + dis * Cos ( rad )
    local real y = GetUnitY (d.caster) + dis * Sin ( rad )
    local group grp=CreateGroup()
    local unit PickedUnit
    local integer lvl=GetUnitAbilityLevel(d.caster,SPELL_ID)
    
        if GetUnitCurrentOrder(d.caster) == OrderId(ORDER) then
            set c = CreateUnit( GetOwningPlayer(d.caster ),DUMMY_M_ID,x ,y , 0 )
            call SetUnitScale(c,2.,2.,2.)
            call UnitApplyTimedLife(c,&#039;BTLF&#039;,1.0)
            call SetUnitFlyHeight(c,2000,0)
            call UnitAddAbility( c , &#039;Avul&#039; )

            set an = GetRandomReal ( 1 , 360 )
            set dis = GetRandomReal ( 1 , AOE )
            set rad = an *0.01734216
            set x = GetUnitX (d.caster) + dis * Cos ( rad )
            set y = GetUnitY (d.caster) + dis * Sin ( rad )        
        
            set t = CreateUnit(GetOwningPlayer(d.caster),DUMMY_M_ID, x , y , 0 )
            call UnitApplyTimedLife(t,&#039;BTLF&#039;,1.0)
            call UnitRemoveAbility( t , &#039;Aloc&#039; )
            call UnitAddAbility( c, DUMMY_SPELL )
            call IssueTargetOrder( c,&quot;thunderbolt&quot;, t)
            call GroupEnumUnitsInRange(grp,x,y,METEOR_RANGE,b)
            loop
            set PickedUnit = FirstOfGroup(grp)
            exitwhen PickedUnit==null
            if IsUnitEnemy(PickedUnit,GetOwningPlayer(d.caster)) then
                set t = CreateUnit(GetOwningPlayer(d.caster),DUMMY_ID, x , y , 0 )
                call UnitApplyTimedLife(t,&#039;BTLF&#039;,0.3)
                call UnitAddAbility(t,IGNITE)
                call SetUnitAbilityLevel(t,IGNITE,GetUnitAbilityLevel(d.caster,SPELL_ID))
                call IssueTargetOrder(t,&quot;acidbomb&quot;,PickedUnit)
                call UnitDamageTarget(d.caster,PickedUnit,INITIAL_DAMAGE(lvl),true, false, AT, DT, WT)
            endif
            call GroupRemoveUnit(grp, PickedUnit)
            endloop
        call DestroyGroup(grp)
        call TimerStart(time,0.3,false,function Shower)
        else
        call d.destroy()
        endif
    
    set grp=null
    set PickedUnit=null
    set c=null
    set t=null
    set time=null
endfunction

private function Actions takes nothing returns nothing
    local timer t1=NewTimer()
    local data d=data.create(GetSpellAbilityUnit(),t1)
    
    call SetTimerData(t1,integer(d))
    call TimerStart(t1,0.0,false,function Shower)
    
    set t1=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 Conditions ) )
    call TriggerAddAction(t, function Actions )
    
    set b=Condition(function filter)
    
    set t=null
endfunction
endscope

Credits:
Spells:
- scorpion182

Systems:
- Vexorian (TimerUtils)
- Rising_Dusk (Knockback)
- By Moyack and Spec

Models:
- Vexorian (dummy.mdx)

Skins:
- evilwart-dragon (mountain.blp)

Icons:

- KelThuzad (BTNBloodlust)
- FrIkY (BTNFireImpact)
- anarchianbedlam (BTNRagnarok)
- Mr.Goblin (BTNRainoffire)

History
v1.0-First Release
v1.1-Some Optimizations
v1.2-Use Better Parabolic Function & More Optimizations
 

Attachments

  • Volcano Giant v1.2.w3x
    349.1 KB · Views: 273

BlackRose

Forum User
Reaction score
239
When a boulder crushes the ground it takes damage
Knocking back nearby enemy units

Tremor:
JASS:
    private constant integer BUFF_T_LIFE=&#039;BTLF&#039; //buff time life rawcode

Why do anyone need to configure that lol?
JASS:
private function filter takes nothing returns boolean
    if(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))then
                return false
        endif
    if (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) &lt;= 0) then
                return false
        endif
    return true
endfunction 
// return not IsUnitType( BUILDING <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile    :)" loading="lazy" data-shortname=":)" />) and not IsUnitType( DEAD <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite3" alt=":(" title="Frown    :(" loading="lazy" data-shortname=":(" />)

? Can't the // stuff work?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Can't this:
JASS:
private function filter takes nothing returns boolean
    if(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))then
                return false
        endif
    if (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) &lt;= 0) then
                return false
        endif
    return true
endfunction


Just be:
JASS:
private function filter takes nothing returns boolean
    return (IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)) and (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) &lt;= 0.405) then
endfunction


:S

Code:
    local real x=GetUnitX(caster) + [COLOR="Red"]500.[/COLOR] * Cos(GetUnitFacing(caster) * bj_DEGTORAD)
    local real y=GetUnitY(caster) + [COLOR="Red"]500.[/COLOR] * Sin(GetUnitFacing(caster) * bj_DEGTORAD)

Maybe a cinfigurable :eek: :D
 

Romek

Super Moderator
Reaction score
963
IsUnitType can cause bugs when used in a 'filter', without being compared to true/false.
Add '== true'.

GetWidgetLife > GetUnitState(UNIT_STATE_LIFE)

> 0.01
Too low. Make it ~0.03125

Also, ALL the configuration should be at the TOP of the script. Not down in the init function. =|
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Tremor:

Some configurables:
[JASS call GroupEnumUnitsInRange(g,GetUnitX(caster),GetUnitY(caster),250.,b)
[/JASS]

250.

JASS:
    call DestroyEffect(AddSpecialEffectTarget(CASTER_FX,caster,&quot;origin&quot;))


"origin"

JASS:
        call TimerStart(t,0.01,false,function Move)


Use 0.03125. instead ;)

Magma Crush:

Some configurables:
JASS:
            call DestroyEffect(AddSpecialEffectTarget(VICTIM_FX1,f,&quot;origin&quot;))


"origin" :D

JASS:
d.height&lt;500.


500.

JASS:
    set d.height=d.height+10.0


10.0

Also, 0.03125 for the timers here too :D

Enrage:

Some configurables:
JASS:
    call DestroyEffect(AddSpecialEffectTarget(CASTER_FX,caster,&quot;origin&quot;))


... You guessed it, "origin" :p

JASS:
            call KnockbackTarget(caster, f, a, 800, 40, true, false, false)


Don't know what that function takes, but 800 and 40 might be configurables :D

Meteor Shower:

Some configurables:
JASS:
            call SetUnitFlyHeight(c,2000,10000)


2000 and 10000 ;) Might wanna do it slowly or something :S

First, why not do these calculations on the comp before ??
JASS:
            set rad = an *3.14159/180


just type 0.01734216

and, also... why are you setting it twice, to the same value... you're setting it inside the loop too :p

and, don't believe struct member needs to be nulled :S

JASS:
        set .caster=null
        set .t1=null
 

Komaqtion

You can change this now in User CP.
Reaction score
469
1. No it isn't... It's 3 times slower, but that isn't noticable and it gives great efficiency :D

2. Are you sure you know what I'm talking about ?? :S
I'm talking about you setting the "rad" variable to the same value twice, and not setting it to anything else anywhere else :D
 

scorpion182

New Member
Reaction score
5
UPDATED!

set an = GetRandomReal ( 1 , 360 )
set dis = GetRandomReal ( 1 , AOE )
set rad = an *0.01734216

@Komaqtion
Because an (angle) get randomized again, then i must set the rad twice :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top