function Trig_Nature_Spirit_Field_Action_Copy_Func002001003 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_Nature_Spirit_Field_Unit)) == true )
endfunction
function Trig_Nature_Spirit_Field_Action_Copy_Func002A takes nothing returns nothing
call UnitDamageTargetBJ( [B]unit1[/B], GetEnumUnit(), ( I2R(GetUnitAbilityLevelSwapped('A00H', [B]unit1[/B])) * ( 5.00 * I2R(GetHeroStatBJ(bj_HEROSTAT_STR, unit1, true)) ) ), ATTACK_TYPE_CHAOS, DAMAGE_TYPE_DIVINE )
call AddSpecialEffectTargetUnitBJ( "origin", GetEnumUnit(), "Units\\NightElf\\Wisp\\WispExplode.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
endfunction
function Trig_Nature_Spirit_Field_Action_Copy_Func004C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, [B]unit1[/B]) >= ( 0.10 * GetUnitStateSwap(UNIT_STATE_MAX_MANA, [B]unit1[/B]) ) ) ) then
return false
endif
return true
endfunction
function Trig_Nature_Spirit_Field_Action_Copy_Actions takes nothing returns nothing
local integer integer1
local [B]unit unit1[/B]
set integer1 = 0
if (integer1 <= 0) then
set integer1 = (integer1 + 1)
set [B]unit1 = udg_Nature_Spirit_Field_Unit[/B]
else
call DoNothing( )
endif
call SetUnitManaBJ( [B]unit1[/B], ( GetUnitStateSwap(UNIT_STATE_MANA, unit1) - ( 0.10 * GetUnitStateSwap(UNIT_STATE_MAX_MANA, [B]unit1[/B]) ) ) )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(500.00, GetUnitLoc(unit1), Condition(function Trig_Nature_Spirit_Field_Action_Copy_Func002001003)), function Trig_Nature_Spirit_Field_Action_Copy_Func002A )
call TriggerSleepAction( 0.50 )
if ( Trig_Nature_Spirit_Field_Action_Copy_Func004C() ) then
call ConditionalTriggerExecute( GetTriggeringTrigger() )
else
call IssueImmediateOrderBJ( [B]unit1[/B], "unimmolation" )
set unit1 = null
endif
endfunction