//TESH.scrollpos=0
//TESH.alwaysfold=0
Name | Type | is_array | initial_value |
//TESH.scrollpos=51
//TESH.alwaysfold=0
function Trig_Icey_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A001' ) ) then
return false
endif
return true
endfunction
function IceyDoDamage takes unit whichUnit, real radius, location loc, real amount, attacktype whichAttack, damagetype whichDamage, boolexpr filter returns nothing
local group g = CreateGroup()
local unit e = null
call GroupEnumUnitsInRangeOfLoc(g, loc, radius, filter)
loop
set e = FirstOfGroup(g)
exitwhen (e == null)
call UnitDamageTarget(whichUnit, e, amount, true, false, whichAttack, whichDamage, WEAPON_TYPE_WHOKNOWS)
call GroupRemoveUnit(g, e)
endloop
call DestroyGroup(g)
set g = null
endfunction
constant function IceyFilter takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) and not IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) and not IsUnitType(GetFilterUnit(), UNIT_TYPE_MAGIC_IMMUNE) and GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) > 0.405
endfunction
function Trig_Icey_Actions takes nothing returns nothing
//Local variable declarations
local boolexpr bx = Filter(function IceyFilter)
local location array LocPoint
local unit Caster = null
local player Owner = null
local effect Exef = null
local unit array Ice
local integer SkL
local integer Radius
local integer Damage
//Declarations ends here
//Setting
set Caster = GetSpellAbilityUnit()
set Owner = GetOwningPlayer( Caster )
set SkL = GetUnitAbilityLevelSwapped('A001', Caster)
// On the "Radius" variable you can set the RADIUS OF AREA OF EFFECT
set Radius = 600
// On the "Damage" variable you can set the AMOUNT OF DAMAGE DEALT and the MULTIPLIER like by adding / 2 or something
set Damage = SkL * 50
set LocPoint[1] = GetUnitLoc(Caster)
set LocPoint[2] = GetSpellTargetLoc()
set LocPoint[3] = PolarProjectionBJ(LocPoint[1], 400.00, AngleBetweenPoints(LocPoint[1], LocPoint[2]))
set LocPoint[4] = PolarProjectionBJ(LocPoint[1], 200.00, AngleBetweenPoints(LocPoint[2], LocPoint[1]))
set LocPoint[5] = PolarProjectionBJ(LocPoint[4], 200.00, AngleBetweenPoints(LocPoint[2], LocPoint[1]))
//Settings end
call AddSpecialEffectLoc( "Objects\\Spawnmodels\\NightElf\\NEDeathSmall\\NEDeathSmall.mdl", LocPoint[1] )
set Exef = GetLastCreatedEffectBJ()
call PauseUnit( Caster, true )
call CameraSetEQNoiseForPlayer( Owner, 20.00 )
call CameraSetTargetNoiseForPlayer( Owner, 15.00, 200.00 )
call TriggerSleepAction( 0.09 )
call CreateNUnitsAtLoc( 1, 'h002', Owner, LocPoint[3], ( AngleBetweenPoints(LocPoint[1], LocPoint[3]) + 1 ) )
set Ice[1] = GetLastCreatedUnit() // this is a unit variable
call CreateNUnitsAtLoc( 1, 'h002', Owner, LocPoint[5], ( AngleBetweenPoints(LocPoint[1], LocPoint[5]) + 1 ) )
set Ice[2] = GetLastCreatedUnit()// this is a unit variable
call IceyDoDamage(Caster, Radius, LocPoint[1], Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, bx)
call UnitApplyTimedLife( Ice[1], 'BTLF', 4 )
call UnitApplyTimedLife( Ice[2], 'BTLF', 4 )
call TriggerSleepAction( 0.01 )
call SetUnitFacingTimed( Ice[1], (AngleBetweenPoints(LocPoint[1], LocPoint[5])), 0.45 )
call SetUnitFacingTimed( Ice[2], (AngleBetweenPoints(LocPoint[1], LocPoint[3])), 0.45 )
call IceyDoDamage(Caster, Radius, LocPoint[1], Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, bx)
call TriggerSleepAction( 0.45 )
call SetUnitFacingTimed( Ice[1], ( AngleBetweenPoints(LocPoint[1], LocPoint[3]) - 1 ), 0.45 )
call SetUnitFacingTimed( Ice[2], ( AngleBetweenPoints(LocPoint[1], LocPoint[5]) - 1 ), 0.45 )
call IceyDoDamage(Caster, Radius, LocPoint[1], Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, bx)
call TriggerSleepAction( 0.45 )
call SetUnitFacingTimed( Ice[1], ( AngleBetweenPoints(LocPoint[1], LocPoint[5]) - 2), 0.45 )
call SetUnitFacingTimed( Ice[2], (AngleBetweenPoints(LocPoint[1], LocPoint[3]) - 2), 0.45 )
call IceyDoDamage(Caster, Radius, LocPoint[1], Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, bx)
call TriggerSleepAction( 0.45 )
call IceyDoDamage(Caster, Radius, LocPoint[1], Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, bx)
call PauseUnit( Caster, false )
call CameraClearNoiseForPlayer( Owner )
// Handles remove \\
call DestroyBoolExpr(bx)
call DestroyEffect( Exef )
call RemoveLocation(LocPoint[1])
call RemoveLocation(LocPoint[2])
call RemoveLocation(LocPoint[3])
call RemoveLocation(LocPoint[4])
call RemoveLocation(LocPoint[5])
set LocPoint[1] = null
set LocPoint[2] = null
set LocPoint[3] = null
set LocPoint[4] = null
set LocPoint[5] = null
set Ice[1] = null
set Ice[2] = null
set Caster = null
set Owner = null
set bx = null
endfunction
//===========================================================================
constant function IcyDummyBool takes nothing returns boolean
return true
endfunction
function InitTrig_Icey takes nothing returns nothing
local filterfunc ff = Filter(function IcyDummyBool)
local integer i = 0
set gg_trg_Icey = CreateTrigger( )
loop
exitwhen (i >= bj_MAX_PLAYER_SLOTS)
call TriggerRegisterPlayerUnitEvent(gg_trg_Icey, Player(i), EVENT_PLAYER_UNIT_SPELL_EFFECT, ff)
set i = i + 1
endloop
call TriggerAddCondition( gg_trg_Icey, Condition( function Trig_Icey_Conditions ) )
call TriggerAddAction( gg_trg_Icey, function Trig_Icey_Actions )
set ff = null
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
call SetUnitLifePercentBJ( gg_unit_H000_0000, 100 )
call SetUnitManaPercentBJ( gg_unit_H000_0000, 100 )
call UnitResetCooldown( gg_unit_H000_0000 )
call SetUnitLifePercentBJ( gg_unit_H000_0001, 100 )
call SetUnitManaPercentBJ( gg_unit_H000_0001, 100 )
call UnitResetCooldown( gg_unit_H000_0001 )
endfunction
//===========================================================================
function InitTrig_Resets takes nothing returns nothing
set gg_trg_Resets = CreateTrigger( )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_Resets, Player(0) )
call TriggerAddAction( gg_trg_Resets, function Trig_Untitled_Trigger_001_Actions )
endfunction