waaaks!
Zinctified
- Reaction score
- 255
System: Caster System
Spell: JASS
Spell: MUI
Spell: not JESP
Import: Average
Juxtapose: (DotA Spell) Each attack has a chance to create a heros image.
3%|6%|9%
Life Steal: The hero steals life on his target, followed by a minor life steal per second.
100 life stolen, 20 life stolen per second
200 life stolen, 40 life stolen per second
300 life stolen, 60 life stolen per second
Death Ritual: The hero cast death rituals on the target location, enemy units affected by the radius shall be burned, whenever a burned unit dies, a Doom Guard is summoned from the dead body.
1000 cast range 100 radius
1150 cast range 200 radius
1300 cast range 300 radius
it is hard to get the screenshot right
EDIT: Update 1 finish
EDIT: Update 2 finish
feedbacks are welcome
Spell: JASS
Spell: MUI
Spell: not JESP
Import: Average
Juxtapose: (DotA Spell) Each attack has a chance to create a heros image.
3%|6%|9%
JASS:
constant function buffid takes nothing returns integer
return 039;B000039; // buff id for juxtapose
endfunction
constant function juxtapose takes nothing returns integer
return 039;A007039; //raw code data for juxtapose
endfunction
constant function illusion takes nothing returns integer
return 039;A008039; //raw code data for illusion item ability
endfunction
constant function percent takes nothing returns integer
return 3 // percent used to summon illusion
endfunction
function Trig_Juxtapose_Conditions takes nothing returns boolean
return ( UnitHasBuffBJ(GetAttacker(), buffid()) == true )
endfunction
function Trig_Juxtapose_Actions takes nothing returns nothing
local unit d = GetAttacker() //Attacking unit
local integer l
local integer i
set l = GetUnitAbilityLevel( d, juxtapose())
set i = l*percent()
if ( GetRandomInt(1, 100) <= i ) then
call CasterCastAbility(GetOwningPlayer(d), illusion(), "852274", d, false)
else
endif
set d = null
endfunction
//===========================================================================
function InitTrig_Juxtapose takes nothing returns nothing
set gg_trg_Juxtapose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Juxtapose, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Juxtapose, Condition( function Trig_Juxtapose_Conditions ) )
call TriggerAddAction( gg_trg_Juxtapose, function Trig_Juxtapose_Actions )
endfunction
Life Steal: The hero steals life on his target, followed by a minor life steal per second.
100 life stolen, 20 life stolen per second
200 life stolen, 40 life stolen per second
300 life stolen, 60 life stolen per second
JASS:
constant function rawcode takes nothing returns integer
//rawcode of spell used
return 039;A009039;
endfunction
constant function actions takes nothing returns string
//change the words inside "" to your actions
return "Life_Steal_Actions"
endfunction
constant function heal1 takes nothing returns integer
//the value healed the hero formula: value x level of ability
return 100
endfunction
constant function heal2 takes nothing returns integer
//the heal and damage value in the loops
return 20
endfunction
constant function speed takes nothing returns integer
//change this value to the missile speed of your spell
return 1000
endfunction
constant function delay takes nothing returns real
//dealy on how long the loop recycles
return 0.75
endfunction
constant function sfx takes nothing returns string
//special effect in damaging and healing you
return "Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl"
endfunction
function InitTrig_Life_Steal takes nothing returns nothing
call OnAbilityEffect( rawcode(), actions() )
endfunction
function Life_Steal_Actions takes nothing returns nothing
local unit u = GetTriggerUnit() // Triggering unit
local unit t = GetSpellTargetUnit() // Target unit of spell
local location loc1 = GetUnitLoc(u) // position of triggering unit
local location loc2 = GetUnitLoc(t) // position of target
local integer dmg1
local integer dmg2
local integer l
local integer n
local real i
local real wait
set l = GetUnitAbilityLevel( u, rawcode())
set dmg1 = l*heal1()
set wait = DistanceBetweenPoints( loc1, loc2) / speed()
call PolledWait(wait)
call SetUnitLifeBJ( u, ( GetUnitStateSwap(UNIT_STATE_LIFE, u) + dmg1 ) )
set i = 0
set n = 10 // how many times the loops recycle
call RemoveLocation(loc1)
call RemoveLocation(loc2)
loop
exitwhen i>n
set dmg2 = l*heal2()
set loc1 = GetUnitLoc(u)
set loc2 = GetUnitLoc(t)
call DestroyEffect( AddSpecialEffectLoc( sfx(), loc1 ))
call DestroyEffect( AddSpecialEffectLoc( sfx(), loc2 ))
call SetUnitLifeBJ( u, ( GetUnitStateSwap(UNIT_STATE_LIFE, u) + dmg2 ) )
call DamageUnitByTypes( u, t, dmg2, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL)
if ( IsUnitDeadBJ(t) == true ) then
set i = i+10
else
set i = i+1
endif
call RemoveLocation(loc1)
call RemoveLocation(loc2)
call PolledWait(delay())
endloop
set loc1 = null
set loc2 = null
set u = null
set t = null
endfunction
Death Ritual: The hero cast death rituals on the target location, enemy units affected by the radius shall be burned, whenever a burned unit dies, a Doom Guard is summoned from the dead body.
1000 cast range 100 radius
1150 cast range 200 radius
1300 cast range 300 radius
it is hard to get the screenshot right
JASS:
constant function ritualcode takes nothing returns integer
//raw code for spell used
return 039;A00B039;
endfunction
constant function ritualrad takes nothing returns integer
//unit affected radius
return 100 // 100 x level of ability
endfunction
constant function ritualanim takes nothing returns string
//animation you want to do when casters cast this
return "attack"
endfunction
constant function ritualsfx takes nothing returns string
//special effect missile used
return "Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilMissile.mdl"
endfunction
constant function ritualspeed takes nothing returns integer
//speed of the special effect thrown
return 1000
endfunction
constant function ritualarc takes nothing returns real
//arc of the missile works like editor
return 0.05
endfunction
constant function ritualz1 takes nothing returns real
//starting height of the missile when cast
return 60.0
endfunction
constant function ritualz2 takes nothing returns real
//end height of the missile
return 0.0
endfunction
constant function ritualdamage takes nothing returns real
//damage dealt to units when the missile reaches the destination
return 0.0
endfunction
constant function ritualdoom takes nothing returns integer
//rawcode of the spell casted on enemy units
return 039;A00C039;
endfunction
constant function ritualdoomid takes nothing returns string
//order string of the spell used by the dummy
return "doom"
endfunction
function Trig_Ritual_Conditions takes nothing returns boolean
return ( GetSpellAbilityId() == ritualcode() )
endfunction
function Ritual_NoTrig takes nothing returns boolean
return (GetTriggerUnit() != GetFilterUnit())
endfunction
globals
boolexpr Ritual_Filter = null
endglobals
function Trig_Ritual_Actions takes nothing returns nothing
local group g = CreateGroup()
local unit u = GetTriggerUnit()
local location start = GetUnitLoc(u)
local location tar = GetSpellTargetLoc()
local real x = GetLocationX(tar)
local real y = GetLocationY(tar)
local integer dopt
local real wait
local integer lvl1
local real lvl2
set lvl1 = GetUnitAbilityLevel( u, ritualcode() )
set lvl2 = lvl1*ritualrad()
set dopt = DamageTypes(ATTACK_TYPE_SIEGE,DAMAGE_TYPE_FORCE)
set dopt = dopt + DamageOnlyTo(UNIT_TYPE_GROUND) + DamageOnlyVisibles()
call SetUnitAnimation(u, ritualanim())
call DamagingProjectileLaunchAOELoc( u, ritualsfx(), ritualspeed(), ritualarc(), start, ritualz1(), tar, ritualz2(), lvl2, ritualdamage(), false, dopt )
set wait = DistanceBetweenPoints( start, tar ) / ritualspeed()
call PolledWait(wait)
call CS_EnumUnitsInAOE(g, x, y, lvl2, Ritual_Filter)
call CasterCastAbilityGroup( GetOwningPlayer(u), ritualdoom(), ritualdoomid(), g, false)
call DestroyGroup(g)
call RemoveLocation(start)
call RemoveLocation(tar)
set start = null
set tar = null
set g = null
set u = null
endfunction
//===========================================================================
function InitTrig_Ritual takes nothing returns nothing
set Ritual_Filter = Condition(function Ritual_NoTrig)
set gg_trg_Ritual = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ritual, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Ritual, Condition( function Trig_Ritual_Conditions ) )
call TriggerAddAction( gg_trg_Ritual, function Trig_Ritual_Actions )
endfunction
EDIT: Update 1 finish
EDIT: Update 2 finish
feedbacks are welcome