function Trig_Touch_of_Nature_Copy_2_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A003' ) ) then
return false
endif
return true
endfunction
function Trig_Touch_of_Nature_Copy_2_Actions takes nothing returns nothing
local unit ut = GetSpellTargetUnit()
local unit uc = GetTriggerUnit()
local texttag tag = GetLastCreatedTextTag()
if GetUnitLifePercent(ut) <= 33.00 and GetRandomInt(1, 100) <= 10 + 10 * GetUnitAbilityLevel(uc, 'A003') then
call SetUnitLifePercentBJ(ut, 100 )
call SetUnitManaPercentBJ(ut, 100 )
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl", ut, "origin" ))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Invisibility\\InvisibilityTarget.mdl", ut, "origin" ))
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\NightElf\\EntBirthTarget\\EntBirthTarget.mdl", ut, "origin" ))
call CreateTextTagUnitBJ( "TRIGSTR_067", ut, 0, 10, 0.00, 60.00, 0.00, 0 )
call SetTextTagPermanent (tag, false)
call SetTextTagVelocity (tag, 64, 90 )
call SetTextTagFadepoint (tag, 2.00 )
call SetTextTagLifespan (tag, 3.50 )
else
call SetUnitLifeBJ(ut, ( I2R(R2I(GetUnitStateSwap(UNIT_STATE_LIFE, ut))) + ( 120.00 * I2R(GetUnitAbilityLevelSwapped('A003', uc)) ) ) )
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\NightElf\\NEDeathSmall\\NEDeathSmall.mdl", ut, "origin" ))
endif
call UnitAddAbility (ut, 'A001')
call SetUnitAbilityLevelSwapped( 'A001', ut, GetUnitAbilityLevelSwapped('A003', uc) )
call UnitAddAbility (ut, 'A004')
call SetUnitAbilityLevelSwapped( 'A004', ut, GetUnitAbilityLevelSwapped('A003', uc) )
call UnitAddAbility (ut, 'A002')
call SetUnitAbilityLevelSwapped( 'A002', ut, GetUnitAbilityLevelSwapped('A003', uc) )
call PolledWait( 10.00 )
call UnitRemoveAbility (ut, 'A001')
call UnitRemoveAbility (ut, 'A004')
call UnitRemoveAbility(ut, 'A002')
set ut = null
set uc = null
set tag = null
endfunction
//===========================================================================
function InitTrig_Touch_of_Nature_Copy_2 takes nothing returns nothing
set gg_trg_Touch_of_Nature_Copy_2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Touch_of_Nature_Copy_2, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Touch_of_Nature_Copy_2, Condition( function Trig_Touch_of_Nature_Copy_2_Conditions ) )
call TriggerAddAction( gg_trg_Touch_of_Nature_Copy_2, function Trig_Touch_of_Nature_Copy_2_Actions )
endfunction