- Joined
- May 4, 2007
- Messages
- 2,260
JASS leak problem and buff question
Guys i have a question, does my spell leak ??? How do i know if a spell leaks ???
Anyway here it is:
The objective of this spell is to deal 500% of agility in damage to an enemy unit and after that slow the enemy unit...
Does my spell leaks in locations ?? and other stuff ?
Another problem i have is, how do i create a buff, that can't be dispelled ??
Example WindWalk, or immolation they have a buff that can't be dispelled... if i slow the target, the buff will be able to be dispelled, and i don't want that, what do i do ?
Guys i have a question, does my spell leak ??? How do i know if a spell leaks ???
Anyway here it is:
JASS:
function FinalStrike_Conds takes nothing returns boolean
return GetSpellAbilityId() == 'AUfn'
endfunction
//============================================
function FinalStrike_Acts takes nothing returns nothing
local unit caster = GetTriggerUnit()
local unit target = GetSpellTargetUnit()
local unit dummy = CreateUnit( GetOwningPlayer(caster), 'h000', GetUnitX(target), GetUnitY(target), 0)
local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIsm\\AIsmTarget.mdl", target, "origin")
local integer damage = GetHeroAgi(caster, true) * 5
local texttag n = CreateTextTag()
call UnitDamageTarget(caster, target, damage, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL, null)
call UnitAddAbility(dummy, 'Aslo')
call IssueTargetOrder(dummy, "slow", target)
call UnitApplyTimedLife(dummy, 'BTLF', 2)
call SetTextTagText(n, I2S(damage), .023 )
call SetTextTagPosUnit( n, target, 0 )
call SetTextTagColor(n, 255, 0, 0, 255 )
call SetTextTagPermanent(n, false)
call SetTextTagVelocity( n, 0, .0277 )
call TriggerSleepAction(2.00)
call DestroyTextTag(n)
call DestroyEffect(e)
set caster = null
set target = null
set dummy = null
set e = null
set n = null
endfunction
//===========================================================================
function InitTrig_Final_Strike takes nothing returns nothing
local trigger FinalStrike = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( FinalStrike, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( FinalStrike, Condition( function FinalStrike_Conds ) )
call TriggerAddAction( FinalStrike, function FinalStrike_Acts )
endfunction
The objective of this spell is to deal 500% of agility in damage to an enemy unit and after that slow the enemy unit...
Does my spell leaks in locations ?? and other stuff ?
Another problem i have is, how do i create a buff, that can't be dispelled ??
Example WindWalk, or immolation they have a buff that can't be dispelled... if i slow the target, the buff will be able to be dispelled, and i don't want that, what do i do ?
Last edited: