Spellpack Random spells (Inspired by Dragonball)

Kazuga

Let the game begin...
Reaction score
110
Kazuga proudly presents:
Heat Doom Attack
Copy
Inner Wrath
Genkidama



Requires:
Newgen
TT
TimedLightning
HAIL


Copy
GUI/Jass? VJass
Leakless? Think so
Laggless? Indeed it is
MUI? Yes
Description:
Copies all the targeted units experiences, skills and outfit for an amount of time. The copy will last for a short amount of time or untill death, when dying the caster will take it's normal form. |cffffcc00 |nLevel 1 - Lasts 10 seconds.|nLevel 2 - Lasts 20 seconds.|nLevel 3 - Lasts 30 seconds.
Code:
JASS:
//*************************************************************************
//*                         Copy by Kazuga                                *
//*************************************************************************



scope Copy initializer InitTrig
globals
    private constant integer raw        =  'A003'           //Ability id
    private constant real speed         =  1               //Time of takeover
    private constant string lightnings  =  "MBUR"         //Lightning  code
    private constant real time          =  10.           //Duritation of effect, time if multiplied with the level of the ability
//*******************************************************************************************
//Hearby follows the effect in the spell, you can change these by changing the effect code.*
//*******************************************************************************************
    private constant string charmFX     =  "Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl"
endglobals

//*****************************************************************
//*                             Warning!                          *
//*               Do not change anything bellow this line!        *
//*                                                               *
//*****************************************************************


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


private function Actions takes nothing returns nothing
    local unit caster = GetTriggerUnit()
    local unit target = GetSpellTargetUnit()
    local unit dummy  = CreateUnit(GetOwningPlayer(caster), GetUnitTypeId(target), GetUnitX(caster), GetUnitY(caster), GetUnitFacing(caster))
   
    call DestroyEffect(AddSpecialEffectTarget(charmFX,caster,"origin"))
    call ShowUnit(caster,false)
    call DestroyEffect(AddSpecialEffectTarget(charmFX,dummy,"origin"))
    call TimedLightning (lightnings, GetUnitX(dummy), GetUnitY(dummy), 0, GetUnitX(target), GetUnitY(target), 0, 2, true, 1, 0)
    call SetWidgetLife(dummy, GetWidgetLife(target))
    call SelectUnit(caster, false)
    call SelectUnit(dummy, true)
    call SetHeroLevel(dummy,GetHeroLevel(target),false)
    call UnitApplyTimedLife(dummy,'BTLF',GetUnitAbilityLevel(caster,'A003')*time)
    call UnitRemoveType(dummy, UNIT_TYPE_SUMMONED)

    loop
        exitwhen GetWidgetLife(dummy)<0.5
        call PolledWait(.5)
    endloop

    call SetUnitPosition(caster,GetUnitX(dummy),GetUnitY(dummy))
    call ShowUnit(caster, true)
    call SelectUnit(dummy, false)
    call SelectUnit(caster, true)
    call RemoveUnit(dummy)

    set caster=null
    set target=null
    set dummy=null
endfunction




//===========================================================================

private function SafeFilt takes nothing returns boolean
    return true
endfunction

private function InitTrig takes nothing returns nothing
    local trigger trig = CreateTrigger()
    local integer i = 0
    loop
        exitwhen i > 15
        call TriggerRegisterPlayerUnitEvent(trig,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,Condition(function SafeFilt))
        set i = i + 1
    endloop
    call TriggerAddCondition (trig, Condition (function Conditions ) )
    call TriggerAddAction (trig, function Actions )
    set trig = null
endfunction

endscope




Screenie:
copypx0.png


Inner Wrath
Requires:
Newgen
HAIL

GUI/Jass? VJass
Leakless? Think so
Laggless? Of course
MUI? Yes
Description:
You release your inner wrath towards everything in the area making explosives appear randomly around you damaging enemy units. |cffffcc00 |nLevel 1 - Deals 100 damage.|nLevel 2 - Deals 200 damage.|nLevel 3 - Deals 300 damage.
Code:
JASS:
//************************************************************************
//*                     Inner Wrath Attack by Kazuga                     *
//************************************************************************



scope InnerWrath initializer Lightning
//! runtextmacro HAIL_CreateProperty ("Data", "integer", "private")
globals
private constant integer raw          = 'A002'          //Ability id
private constant integer dummyraw     = 'h000'         //Dummy id
private constant integer damage       = 100           //Damage dealt
private constant real delay           = 0.7          //Delay between explosions
private constant integer explosions   = 7           //Amount of explosions
private constant integer aoe          = 200        //Area of effect of the explosions

//*******************************************************************************************
//Hearby follows the effects in the spell, you can change these by changing the effect code.*
//*******************************************************************************************
private constant string FlameStrikeEffect = "Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeTarget.mdl"
private constant string ExplosionEffect   = "Objects\\Spawnmodels\\Human\\HCancelDeath\\HCancelDeath.mdl"
private constant string volcanoeffect     = "Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl"



//*****************************************************************
//*                             Warning!                          *
//*               Do not change anything bellow this line!        *
//*                                                               *
//*****************************************************************
unit unitx
endglobals
private struct TestStruct
timer Timer
unit caster
integer counter
unit dummy
endstruct

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




function Trig_Explosion_FilterCondition takes nothing returns boolean
    return GetWidgetLife( GetFilterUnit() ) > 0.405 and IsUnitEnemy( GetFilterUnit(), GetOwningPlayer( unitx ) ) == true
    
endfunction

function DamageDealt takes nothing returns nothing
    local unit affected = GetEnumUnit ()
    call UnitDamageTarget(unitx,affected,(damage*I2R(GetUnitAbilityLevel(unitx,raw))),true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)
    set affected = null
endfunction

private function Explosions takes nothing returns nothing
local TestStruct data = GetData (GetExpiredTimer ())
local real x = GetUnitX(data.caster)
local real y = GetUnitY(data.caster)
local real RandomAngle=GetRandomInt(1,360)
local real RandomDistance=GetRandomInt(100,500)
local real x2 = x + RandomDistance * Cos((RandomAngle))
local real y2 = y + RandomDistance * Sin((RandomAngle))
call DestroyEffect(AddSpecialEffect(volcanoeffect,x2,y2))
set unitx = data.caster
set z = CreateGroup()
call GroupEnumUnitsInRange(z,x2,y2,aoe,Condition(function Trig_Explosion_FilterCondition))
call ForGroup(z,function DamageDealt)
call AddSpecialEffect(ExplosionEffect,x2,y2)
  set data.counter = data.counter +1
if data.counter == explosions then
  call RemoveUnit(data.dummy)
  call PauseUnit(data.caster,false)
  call PauseTimer (data.Timer)
  call ResetData (data.Timer)
  call DestroyTimer (data.Timer)
endif

endfunction


private function Actions takes nothing returns nothing
local TestStruct data = TestStruct.create ()
local real facing = GetUnitFacing(GetTriggerUnit())
call DestroyEffect (AddSpecialEffect(volcanoeffect,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit())))
set data.caster = GetTriggerUnit()
set data.dummy = CreateUnit(GetOwningPlayer(GetTriggerUnit()),dummyraw,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),facing)
call SetUnitAnimation(data.dummy,"stand channel")
call SetUnitVertexColor(data.dummy,100,100,100,200)
call TerrainDeformationRippleBJ(explosions,false,GetUnitLoc(data.caster), 1024, 1024, 64, 1, 512)
call PauseUnit(data.caster,true)
set data.Timer = CreateTimer()
call DestroyEffect(AddSpecialEffect(FlameStrikeEffect,GetUnitX(data.caster),GetUnitY(data.caster)))
call TimerStart (data.Timer,delay,true, function Explosions)
call SetData (data.Timer, data)
endfunction


//===========================================================================

private function SafeFilt takes nothing returns boolean
return true
endfunction
private function Lightning takes nothing returns nothing
 local trigger trig = CreateTrigger()
local integer i = 0
loop
    exitwhen i > 15
    call TriggerRegisterPlayerUnitEvent(trig,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,Condition(function SafeFilt))
    set i = i + 1
endloop
 call TriggerAddCondition (trig, Condition (function Conditions ) )
 call TriggerAddAction (trig, function Actions )
 set trig = null
 endfunction

endscope

Screenie:
innerwrathsv7.png


Heat doom attack
Requires:
Newgen
TT
TimedLightning
HAIL

GUI/Jass? VJass
Leakless? Think so
Laggless? Of course
MUI? Yes! :D
Description:
Throws your enemy high up in the air to then flame him with an energy beam dealing damage. |cffffcc00 |nLevel 1 - Deals 100 damage.|nLevel 2 - Deals 200 damage.|nLevel 3 - Deals 300 damage.
Code:
JASS:
//************************************************************************
//*                   Heat Doom Attack by Kazuga                         *
//************************************************************************



scope HeatDoomAttack initializer Lightning
//! runtextmacro HAIL_CreateProperty ("Data", "integer", "private")
globals
private constant integer dummyID = 'h003'            //Dummy id
private constant integer raw     = 'A001'           //Ability id
private constant integer damage  = 100             //Damage dealt
private constant real speed = 0.08                //Speed of the beam creation
private constant string BigExplosion = "Objects\\Spawnmodels\\Human\\HCancelDeath\\HCancelDeath.mdl"
//*****************************************************************
//*                             Warning!                          *
//*               Do not change anything bellow this line!        *
//*                                                               *
//*****************************************************************

endglobals
private struct TestStruct
unit target
timer Timer
timer Timer2
unit caster
real tx
real ty
real height
real ux
real uy
endstruct

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



private function Effect takes unit caster, unit target returns nothing
local real health = 0
set health = GetWidgetLife(target)
if health < damage*I2R(GetUnitAbilityLevel(caster,raw)) then
call SetUnitExploded(target,true)
endif
call UnitDamageTarget(caster,target,(damage*I2R(GetUnitAbilityLevel(caster,raw))),true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)

set health = GetWidgetLife(target)
endfunction


private function Beam takes nothing returns nothing
local TestStruct data = GetData (GetExpiredTimer ())
local unit dummy = null

set data.tx    = GetUnitX(data.caster)
set data.ty    = GetUnitY(data.caster)
set data.height = data.height + 50
set dummy = CreateUnit(GetOwningPlayer(data.caster),dummyID,data.tx,data.ty,0)
call SetUnitFlyHeight(dummy,data.height,0)
set dummy = null
endfunction


private function Actions takes nothing returns nothing
local TestStruct data = TestStruct.create ()
local unit Unit                    = GetTriggerUnit()
local unit target = GetSpellTargetUnit()
local real x = GetUnitX(GetTriggerUnit())
local real y = GetUnitY(GetTriggerUnit())
local unit Explosion(CreateUnit(GetOwningPlayer(Unit),DummyID,x,y,0))
set data.target = (GetSpellTargetUnit())
set data.ux    = GetUnitX(GetSpellTargetUnit())
set data.uy    = GetUnitY(GetSpellTargetUnit())
call PauseUnit(data.target,true)
call PauseUnit(Unit,true)
call SetUnitPathing(Unit,false)
call SetUnitPathing(target,false)
call SetUnitPosition(target,x,y)
call UnitAddAbility(target,'Amrf')
call UnitRemoveAbility(target,'Amrf')
call SetUnitFlyHeight(target,500,500)
call PolledWait(1)
set data.caster = GetTriggerUnit()
set data.Timer = CreateTimer()


call TimerStart (data.Timer,speed,true, function Beam)

call SetData (data.Timer, data)


call PolledWait(0.5)
    call PauseTimer (data.Timer)
    call ResetData (data.Timer)
    call DestroyTimer (data.Timer)
    set Explosion = CreateUnit(GetOwningPlayer(Unit),dummyID,x,y,0)
    call SetUnitFlyHeight(Explosion,GetUnitFlyHeight(data.target),0)
    call SetUnitScalePercent(Explosion,300,300,300)
    call UnitApplyTimedLife(Explosion,'BTLF',0.5)
    set Explosion = null
    call PolledWait(0.5)
    set Explosion = CreateUnit(GetOwningPlayer(Unit),dummyID,x,y,0)
    call SetUnitFlyHeight(Explosion,GetUnitFlyHeight(data.target),0)
    call SetUnitScalePercent(Explosion,300,300,300)
    call UnitApplyTimedLife(Explosion,'BTLF',0.5)
    set Explosion = null
    call PolledWait(0.5)
    set Explosion = CreateUnit(GetOwningPlayer(Unit),dummyID,x,y,0)
    call SetUnitFlyHeight(Explosion,GetUnitFlyHeight(data.target),0)
    call SetUnitScalePercent(Explosion,300,300,300)
    call UnitApplyTimedLife(Explosion,'BTLF',0.5)
    set Explosion = null
    call DestroyEffect(AddSpecialEffectTarget(BigExplosion,data.target,"chest"))
    call SetUnitFlyHeight(data.target,1500,3000)
    call PauseUnit(data.caster,false)
    call PolledWait(1)
    call SetUnitPosition(data.target,data.ux,data.uy)
    call SetUnitFlyHeight(data.target,0,3000)
    call SetUnitPathing(data.caster,true)
    call SetUnitPathing(data.target,true)
    call Effect(data.caster,data.target)
    call PauseUnit(data.target,false)
    

set Unit = null
endfunction


//===========================================================================

private function SafeFilt takes nothing returns boolean
return true
endfunction
private function Lightning takes nothing returns nothing
 local trigger trig = CreateTrigger()
local integer i = 0
loop
    exitwhen i > 15
    call TriggerRegisterPlayerUnitEvent(trig,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,Condition(function SafeFilt))
    set i = i + 1
endloop
 call TriggerAddCondition (trig, Condition (function Conditions ) )
 call TriggerAddAction (trig, function Actions )
 set trig = null
 endfunction

endscope
Screenie:
heatdoomattackwy0.png


Genkidama
Requires:
Newgen
TT
TimedLightning
HAIL

GUI/Jass? VJass
Leakless? Think so
Laggless? Of course
MUI? Yes^^
Description:
Gathers energy from all living and uses it to release a huge energy ball into the ground damaging all nearby enemy units.
Code:
JASS:
//***********************************************************
//*                                                         *
//*                    Genkidama by Kazuga                  *
//*                                                         *
//***********************************************************


scope Genkidama initializer Lightning
globals
private constant integer dummyID         = 'h001'        //Dummy raw code
private constant integer DrainLifeDummy  = 'h004'       //Dummy raw code
private constant integer DrainManaDummy  = 'h005'      //Dummy raw code
private constant integer drained         = 30         // Amount of mana and health drained
private constant integer raw             = 'A000'    //Ability raw code
private constant integer aoe             = 500      //Area of effect of the damage
private constant string lightnings       ="HWSB"   //Lightning  code


//*******************************************************************************************
//Hearby follows the effects in the spell, you can change these by changing the effect code.*
//*******************************************************************************************

private constant string ReviveEffect   = "Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl"
private constant string HealingEffect  = "Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl"
private constant string FlameStrikeEffect = "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl"
private constant string FlareEffect = "Abilities\\Spells\\Human\\Flare\\FlareCaster.mdl"
private constant string ExplosionEffect = "Objects\\Spawnmodels\\Human\\HCancelDeath\\HCancelDeath.mdl"
group z
unit Caster
integer damage
integer mana
endglobals
private struct TestStruct
unit caster
endstruct

//***********************************************************
//*                                                         *
//*             Do not change anything bellow               *
//*                                                         *
//***********************************************************

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


function Trig_Genkidama_FilterCondition takes nothing returns boolean
    return GetWidgetLife( GetFilterUnit() ) > 0.405 and IsUnitEnemy( GetFilterUnit(), GetOwningPlayer( Caster ) ) == true
    
endfunction

function Damage takes nothing returns nothing
    local unit affected = GetEnumUnit ()
    local real currentmana = GetUnitState(affected,UNIT_STATE_MANA)
    call SetUnitState(affected,UNIT_STATE_MANA,currentmana-mana)
    call UnitDamageTarget(Caster,affected,(damage*I2R(GetUnitAbilityLevel(Caster,raw))),true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)
    call DestroyEffect(AddSpecialEffectTarget(HealingEffect,affected,"origin"))  
  set affected = null
endfunction

function Drain takes nothing returns nothing
    local unit affected = GetEnumUnit ()
    local unit dummyLife = CreateUnit(GetOwningPlayer(Caster),DrainLifeDummy,GetUnitX(Caster),GetUnitY(Caster),0)
    local unit dummyMana = CreateUnit(GetOwningPlayer(Caster),DrainManaDummy,GetUnitX(Caster),GetUnitY(Caster),0)
    call IssueTargetOrder(dummyLife,"drain",affected)
    call IssueTargetOrder(dummyMana,"drain",affected)
    call UnitApplyTimedLife(dummyLife,'BTLF',3)
    call UnitApplyTimedLife(dummyMana,'BTLF',3)
    set affected = null
endfunction

private function Actions takes nothing returns nothing
local TestStruct data = TestStruct.create ()
local real x = GetUnitX(GetTriggerUnit())
local real y = GetUnitY(GetTriggerUnit())
local unit dummy = null
local location temploc




local real x2 = x + 300 * Cos((45))
local real y2 = y + 300 * Sin((45))

local real x3 = x + 300 * Cos((90))
local real y3 = y + 300 * Sin((90))

local real x4 = x + 300 * Cos((0))
local real y4 = y + 300 * Sin((0))

local real x5 = x + 300 * Cos((135))
local real y5 = y + 300 * Sin((135))

local real x6 = x + 300 * Cos((-45))
local real y6 = y + 300 * Sin((-45))

local real x7 = x + 300 * Cos((180))
local real y7 = y + 300 * Sin((180))
local integer GroupAmount
set data.caster = GetTriggerUnit()
set Caster = data.caster
call PauseUnit(GetTriggerUnit(),true)
set z = CreateGroup()
call GroupEnumUnitsInRange(z,x,y,aoe,Condition(function Trig_Genkidama_FilterCondition))
call ForGroup(z,function Drain) 

call PolledWait(3)
call DestroyEffect(AddSpecialEffect(ReviveEffect,x,y))
call TimedLightning (lightnings, x2, y2, 0, x, y, 0, 1., true, 1, 0)

call TimedLightning (lightnings, x3, y3, 0, x, y, 0, 1., true, 1, 0)

call TimedLightning (lightnings, x4, y4, 0, x, y, 0, 1., true, 1, 0)

call TimedLightning (lightnings, x5, y5, 0, x, y, 0, 1., true, 1, 0)

call TimedLightning (lightnings, x6, y6, 0, x, y, 0, 1., true, 1, 0)

call TimedLightning (lightnings, x7, y7, 0, x, y, 0, 1., true, 1, 0)

call PolledWait(0.5)
set data.caster = GetTriggerUnit()
set temploc = GetUnitLoc(data.caster)



call SetUnitInvulnerable(data.caster,true)
call UnitAddAbility(data.caster,'Amrf')
call UnitRemoveAbility(data.caster,'Amrf')
call DestroyEffect(AddSpecialEffect(FlareEffect,x,y))
call SetUnitFlyHeight(data.caster,1000,1000)
call PolledWait(1)
call ShowUnitHide(data.caster)
set dummy = CreateUnit(GetOwningPlayer(data.caster),dummyID,x,y,0)
call SetUnitFlyHeight(dummy,0,500)
call PolledWait(2)
call KillUnit(dummy)


call TerrainDeformationRippleBJ(1,false,temploc, 1024, 1024, 64, 1, 512)
call AddSpecialEffect(ExplosionEffect,x,y)
call AddSpecialEffect(FlameStrikeEffect,x,y)
call ShowUnitShow(data.caster)
call SetUnitFlyHeight(data.caster,0,500)
set Caster = GetTriggerUnit()
set GroupAmount = CountUnitsInGroup(z)
set damage = GroupAmount * drained * 3
set mana   = damage
call DestroyGroup(z)
set z = CreateGroup()
call GroupEnumUnitsInRange(z,x,y,aoe,Condition(function Trig_Genkidama_FilterCondition))
call ForGroup(z,function Damage) 
call DestroyGroup(z)
call PolledWait(1)
call PauseUnit(data.caster,false)
call SetUnitInvulnerable(data.caster,false)
call SelectUnitForPlayerSingle(data.caster,GetOwningPlayer(data.caster))


endfunction

//===========================================================================
private function SafeFilt takes nothing returns boolean
return true
endfunction
private function Lightning takes nothing returns nothing
 local trigger trig = CreateTrigger()
local integer i = 0
loop
    exitwhen i > 15
    call TriggerRegisterPlayerUnitEvent(trig,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,Condition(function SafeFilt))
    set i = i + 1
endloop
 call TriggerAddCondition (trig, Condition (function Conditions ) )
 call TriggerAddAction (trig, function Actions )
 set trig = null
 endfunction

endscope
Screenie:
genkidamaxy6.png


Leaks and bugg reports are most welcome, as is criticisism and feedback.:thup:

Thanks to all who helped me with these spells.:)

Edit: Code updated
Edit: Heat doom attack, inner wrath and genkidama updated.

Genkidama now damages depending on the amount of units around you and really drains energy from them. It also burns their mana the same amount as damage.

Heat doom attack now have alot more eye candy, is fully working and mui.

Inner wrath now damages correctly, also added some eyecandy.
 

Attachments

  • Spellpack.w3x
    60.6 KB · Views: 302

trb92

Throwing science at the wall to see what sticks
Reaction score
142
In Genkidama
JASS:
globals
private constant integer dummyID       = 'h001'      //Dummy raw code
private constant integer raw           = 'A000'     //Ability raw codeprivate constant integer damage        = 400       //Damage dealt to each unitprivate constant integer aoe           = 500      //Area of effect of the damageprivate constant string lightnings     ="HWSB"   //Lightning  code
group z //Make me private
unit Caster //Make me private
endglobals


In InnerWrath
JASS:
globals
private constant integer raw          = 'A002'          //Ability id
private constant integer dummyraw     = 'h000'         //Dummy id
private constant integer damage       = 100           //Damage dealt
private constant real delay           = 0.7          //Delay between explosions
private constant integer explosions   = 7           //Amount of explosions
private constant integer aoe          = 200        //Area of effect of the explosions
unit unitx //Make me private
endglobals
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Yet again I think you should involve the source of the effects in the global blocks, in case someone would want to change them easily.
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
I went ahead and optimized the first code for you. You are getting much better! :)

Your codes get cleaner each time, but there are a still a few pointless functions and BJs here and there. Also, some indenting would seriously help for readability and it will be more configurable from that readability.

Here, I removed a few BJs, added a configurable string for the fx, removed a few pointless stuff, and indented the code. There isn't much to be explained, I'll do the others later by editing this post:
JASS:
//*************************************************************************
//*                         Copy by Kazuga                                *
//*************************************************************************



scope Copy initializer InitTrig
globals
    private constant integer raw        =  'A003'           //Ability id
    private constant real speed         =  1               //Time of takeover
    private constant string lightnings  =  "MBUR"         //Lightning  code
    private constant real time          =  10.           //Duritation of effect, time if multiplied with the level of the ability
    private constant string charmFX     =  "Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl"
endglobals

//*****************************************************************
//*                             Warning!                          *
//*               Do not change anything bellow this line!        *
//*                                                               *
//*****************************************************************


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


private function Actions takes nothing returns nothing
    local unit caster = GetTriggerUnit()
    local unit target = GetSpellTargetUnit()
    local unit dummy  = CreateUnit(GetOwningPlayer(caster), GetUnitTypeId(target), GetUnitX(caster), GetUnitY(caster), GetUnitFacing(caster))
    
    call DestroyEffect(AddSpecialEffectTarget(charmFX,caster,"origin"))
    call ShowUnit(caster,false)
    call DestroyEffect(AddSpecialEffectTarget(charmFX,dummy,"origin"))
    call TimedLightning (lightnings, GetUnitX(dummy), GetUnitY(dummy), 0, GetUnitX(target), GetUnitY(target), 0, 2, true, 1, 0)
    call SetWidgetLife(dummy, GetWidgetLife(target))
    call SelectUnit(caster, false)
    call SelectUnit(dummy, true)
    call SetHeroLevel(dummy,GetHeroLevel(target),false)
    call UnitApplyTimedLife(dummy,'BTLF',GetUnitAbilityLevel(caster,'A003')*time)
    call UnitRemoveType(dummy, UNIT_TYPE_SUMMONED)

    loop
        exitwhen GetWidgetLife(dummy)<0.5
        call PolledWait(.5)
    endloop

    call SetUnitPosition(caster,GetUnitX(dummy),GetUnitY(dummy))
    call ShowUnit(caster, true)
    call SelectUnit(dummy, false)
    call SelectUnit(caster, true)
    call RemoveUnit(dummy)

    set caster=null
    set target=null
    set dummy=null
endfunction




//===========================================================================

private function SafeFilt takes nothing returns boolean
    return true
endfunction 

private function InitTrig takes nothing returns nothing
    local trigger trig = CreateTrigger()
    local integer i = 0
    loop
        exitwhen i > 15
        call TriggerRegisterPlayerUnitEvent(trig,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,Condition(function SafeFilt))
        set i = i + 1
    endloop
    call TriggerAddCondition (trig, Condition (function Conditions ) )
    call TriggerAddAction (trig, function Actions )
    set trig = null
endfunction

endscope


It requires only NewGen and the TimedLightning thing.
 

Kazuga

Let the game begin...
Reaction score
110
Trb92, how do you mean make them private?

Larcenist, fixed:thup:

Purgeandfire, thanks!:thup:

(Updating...)
Edit: Updated :)
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
JASS:
//*****************************************************************
//*                             Warning!                          *
//*               Do not change anything bellow this line!        *
//*                                                               *
//*****************************************************************


I just have to point out that the words "below" and "bellow" have got quite different meanings, in this case it should be below ^^

Also take Purge's advice and start indenting your codes just to make them easier to read.
 

AdamGriffith

You can change this now in User CP.
Reaction score
69
In the copy trigger you have this:
JASS:
endscope



endscope


Now I don't know vJass. But I believe their should only be one.
 

Kazuga

Let the game begin...
Reaction score
110
Hm ye the second one was left over when I updated the code, it doesn't look like that in the trigger:) Fixed, thanks for pointing that out:thup:
 

trb92

Throwing science at the wall to see what sticks
Reaction score
142
>Trb92, how do you mean make them private?
Add the word "private" before them, just like you would to any function/struct/other global within a scope or library.
 

Kazuga

Let the game begin...
Reaction score
110
Hm if I add it like this "private group z" I get the error "undeclared variable" but if also put "private z" infront of every z I get syntax error =/
Also what diffrence does it make? Just curius:)
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
If you don't, then it can lead to name clashing. (For example, another spell or something containing a group called "z")

Are you sure you have it like this: (Don't do anything else, simply add the private prefix)
JASS:
private group z
 

Kazuga

Let the game begin...
Reaction score
110
JASS:
private group z

= "Undeclared variable "z""

Edit: With clashing, you mean that one trigger can start run the other's (like with gui loops when you use for each integer a and use waits)?
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
No, I just simply meant that it will cause a syntax error if the user has another global named "z". :p (Not a GUI variable, because those have a udg_ prefix)
 
1

131ackout

Guest
Looks awesome Dragonball skills.

Although I am aware that I feel weird about Inner Wrath, because I thought you meant it different from my favorite anime tv show..

But they're all awesome. :p
 

Kazuga

Let the game begin...
Reaction score
110
Ty^^ The only one I'm not satisfied with is Heat Doom Attack, it should be a greater sort of beam and it's not even mui atm...
 

Sim

Forum Administrator
Staff member
Reaction score
534
> You release your inner wrath towards everything in the area making explosives appear randomly around you damaging enemy units.

I casted this spell 3 times and the Beastmaster never got damaged even once. Problem is, ogres and such units around me were utterly destroyed.

> Throws your enemy high up in the air to then flame him with an energy beam dealing damage.

If you move or anything while casting this spell the target will never reach the ground and your hero will get slightly teleported on the side.
Additionnally, there should be an explosion or something. It looks really weird...

> Gathers energy from all living and uses it to release a huge energy ball into the ground damaging all nearby enemy units.

I would love if this spell effectively "gathered" energy from "all" living. At the moment it doesn't do such thing, it simply explodes for 400 damage.
It should drain hp and/or mana from nearby friendly and enemy units alike, and the more drained hp/mana, the more damage!
Though, this spell would be a little hard to make. :)

Good job, but still numerous flaws to fix. Copy was nice indeed. You have some work!

Good luck. ;)
 

Kazuga

Let the game begin...
Reaction score
110
>I casted this spell 3 times and the Beastmaster never got damaged even once. Problem is, ogres and such units around me were utterly destroyed.
Hm, should I lower the area wich the random point can occure within?

>If you move or anything while casting this spell the target will never reach the ground and your hero will get slightly teleported on the side.
Additionnally, there should be an explosion or something. It looks really weird...
Ye this is the spell I have had the most problem in making, I will see what I can do..

>I would love if this spell effectively "gathered" energy from "all" living. At the moment it doesn't do such thing, it simply explodes for 400 damage.
It should drain hp and/or mana from nearby friendly and enemy units alike, and the more drained hp/mana, the more damage!
Though, this spell would be a little hard to make. :)

Ye I can do the drain life part but I have no idea how to damage the units the amount of damage drained =/

>Good job, but still numerous flaws to fix. Copy was nice indeed. You have some work!
Yes indeed:rolleyes: (Altough I'm working on 3 other spells atm too, guess I should really try to learn too finish something before starting with the next one^^)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top