- Joined
- Jan 31, 2011
- Messages
- 8
JASS:
function SS_heal takes nothing returns nothing
call SetUnitLifeBJ(GetEnumUnit(), GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - udg_healz)
call AddSpecialEffectTargetUnitBJ( "overhead", GetEnumUnit(), "Abilities\\Spells\\Undead\\DeathPact\\DeathPactTarget.mdl" )
endfunction
function SS_matching takes nothing returns boolean
return (IsUnitEnemy( GetFilterUnit(), Player(0)) == true)
endfunction
function SS_matching2 takes nothing returns boolean
return (IsUnitAliveBJ( GetFilterUnit()))
endfunction
function SS_matching3 takes nothing returns boolean
return (GetBooleanAnd( SS_matching(), SS_matching2()))
endfunction
function SS_Cond takes nothing returns boolean
if (not (GetSpellAbilityId() == 'A000')) then
return false
else
return true
endif
endfunction
function SS takes nothing returns nothing
local unit u = GetTriggerUnit()
local real aoe = 600.00
local integer ALevel = GetUnitAbilityLevel(u,'A000')
local integer unitingroup = CountUnitsInGroup(GetUnitsInRangeOfLocMatching( aoe, GetUnitLoc(u), Condition(function SS_matching3)))
local real damage = ((I2R(ALevel) * 10.00) * I2R(unitingroup))
set udg_healz = damage
call AddSpecialEffectTargetUnitBJ( "overhead", u, "Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl" )
call ForGroupBJ( GetUnitsInRangeOfLocMatching( aoe, GetUnitLoc(u), Condition(function SS_matching3)), function SS_heal)
call SetUnitLifeBJ( u, (GetUnitStateSwap(UNIT_STATE_LIFE, u) + udg_healz))
endfunction
//===========================================================================
function InitTrig_SS takes nothing returns nothing
set gg_trg_SS = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(gg_trg_SS, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition( gg_trg_SS, Condition(function SS_Cond))
call TriggerAddAction( gg_trg_SS, function SS )
endfunction
im sori for my impotence but i dont really know how to find out if my triggers are mui..Pls help me.