Name | Type | is_array | initial_value |
Damage | real | No | |
Damage_Org | real | No | |
Dummy_1 | unit | No | |
Dummy_2 | unit | No | |
Explode_Area | real | No | |
Explode_Model | string | No | |
I | integer | No | |
Integer_A | integer | No | |
Integer_B | integer | No | |
Integer_c | integer | No | |
Integer_d | integer | No | |
Integer_e | integer | No | |
Integer_f | integer | No | |
l_1 | lightning | No | |
l_2 | lightning | No | |
Lom_Ability | abilcode | No | |
Lom_Ability_Caster | unit | No | |
Lom_Ability_Point | location | No | |
Lom_Caster_Point | location | No | |
Lom_Integer | integer | No | |
Lom_Integer_2 | integer | No | |
Lom_Integer_3 | integer | No | |
Lom_Integer_4 | integer | No | |
Lom_Unit | unit | No | |
Lom_Unit_2 | unit | No | |
Lom_Unit_Group | group | No | |
Lom_Unit_Point | location | No | |
Lom_Unit_Type_Fire | unitcode | No | |
Lom_Unit_Type_Frost | unitcode | No | |
S_1 | effect | No | |
S_2 | effect | No | |
S_3 | effect | No | |
S_4 | effect | No | |
S_5 | effect | No | |
S_6 | effect | No | |
Special_1 | string | No | |
Special_2 | string | No | |
Trg_1 | trigger | No | |
Trg_2 | trigger | No | |
Trg_3 | trigger | No | |
Trg_4 | trigger | No |
// Legacy of Magic v 1.03 Created by Lord Mahdi.
// If you want a safe ability, dont edit these triggers
// For Import frist active "automatically create unknown variables while pasting trigger data" in "Prefences" and then copy all of triggers in "Legacy of Magic" folder to your map.
// Enjoy!
function Trig_Legacy_of_Magic_Start_and_End_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == udg_Lom_Ability ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h002' ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func001A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_Start_and_End_Func001Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func042Func002Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func042Func002A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_Start_and_End_Func042Func002Func001C() ) then
call UnitDamageTargetBJ( udg_Lom_Ability_Caster, GetEnumUnit(), udg_Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func042Func005Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func042Func005A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_Start_and_End_Func042Func005Func001C() ) then
call UnitDamageTargetBJ( udg_Lom_Ability_Caster, GetEnumUnit(), udg_Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func042Func008Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func042Func008A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_Start_and_End_Func042Func008Func001C() ) then
call UnitDamageTargetBJ( udg_Lom_Ability_Caster, GetEnumUnit(), udg_Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func042Func011Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func042Func011A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_Start_and_End_Func042Func011Func001C() ) then
call UnitDamageTargetBJ( udg_Lom_Ability_Caster, GetEnumUnit(), udg_Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func042Func016Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func042Func016A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_Start_and_End_Func042Func016Func001C() ) then
call UnitDamageTargetBJ( udg_Lom_Ability_Caster, GetEnumUnit(), udg_Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func042Func019Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func042Func019A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_Start_and_End_Func042Func019Func001C() ) then
call UnitDamageTargetBJ( udg_Lom_Ability_Caster, GetEnumUnit(), udg_Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func042Func022Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func042Func022A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_Start_and_End_Func042Func022Func001C() ) then
call UnitDamageTargetBJ( udg_Lom_Ability_Caster, GetEnumUnit(), udg_Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func042Func025Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func042Func025A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_Start_and_End_Func042Func025Func001C() ) then
call UnitDamageTargetBJ( udg_Lom_Ability_Caster, GetEnumUnit(), udg_Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func054Func003Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func054Func003A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_Start_and_End_Func054Func003Func001C() ) then
call UnitDamageTargetBJ( udg_Lom_Ability_Caster, GetEnumUnit(), udg_Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func054Func006Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func054Func006A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_Start_and_End_Func054Func006Func001C() ) then
call UnitDamageTargetBJ( udg_Lom_Ability_Caster, GetEnumUnit(), udg_Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func054Func009Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func054Func009A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_Start_and_End_Func054Func009Func001C() ) then
call UnitDamageTargetBJ( udg_Lom_Ability_Caster, GetEnumUnit(), udg_Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func054Func012Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func054Func012A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_Start_and_End_Func054Func012Func001C() ) then
call UnitDamageTargetBJ( udg_Lom_Ability_Caster, GetEnumUnit(), udg_Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func054Func017Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func054Func017A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_Start_and_End_Func054Func017Func001C() ) then
call UnitDamageTargetBJ( udg_Lom_Ability_Caster, GetEnumUnit(), udg_Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func054Func020Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func054Func020A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_Start_and_End_Func054Func020Func001C() ) then
call UnitDamageTargetBJ( udg_Lom_Ability_Caster, GetEnumUnit(), udg_Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func054Func023Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func054Func023A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_Start_and_End_Func054Func023Func001C() ) then
call UnitDamageTargetBJ( udg_Lom_Ability_Caster, GetEnumUnit(), udg_Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func054Func026Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func054Func026A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_Start_and_End_Func054Func026Func001C() ) then
call UnitDamageTargetBJ( udg_Lom_Ability_Caster, GetEnumUnit(), udg_Damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func062Func001C takes nothing returns boolean
if ( not ( IsUnitDeadBJ(GetEnumUnit()) == true ) ) then
return false
endif
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Func062A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_Start_and_End_Func062Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Legacy_of_Magic_Start_and_End_Actions takes nothing returns nothing
// Setting
set udg_Lom_Ability_Caster = GetSpellAbilityUnit()
set udg_Lom_Caster_Point = GetUnitLoc(GetSpellAbilityUnit())
call PauseUnitBJ( true, udg_Lom_Ability_Caster )
set udg_I = 3
set udg_Damage = udg_Damage_Org
set udg_Integer_A = 0
set udg_Lom_Integer = 0
set udg_Lom_Integer_3 = 0
set udg_Lom_Integer_2 = 128
set udg_Lom_Integer_4 = 0
call CreateNUnitsAtLoc( 1, udg_Lom_Unit_Type_Fire, GetOwningPlayer(udg_Lom_Ability_Caster), PolarProjectionBJ(udg_Lom_Ability_Point, GetRandomReal(-45.00, 45.00), 90.00), bj_UNIT_FACING )
set udg_Lom_Unit = GetLastCreatedUnit()
call UnitApplyTimedLifeBJ( 19.00, 'BTLF', GetLastCreatedUnit() )
call CreateNUnitsAtLoc( 1, udg_Lom_Unit_Type_Frost, GetOwningPlayer(udg_Lom_Ability_Caster), PolarProjectionBJ(udg_Lom_Ability_Point, GetRandomReal(-45.00, 45.00), 270.00), bj_UNIT_FACING )
set udg_Lom_Unit_2 = GetLastCreatedUnit()
call UnitApplyTimedLifeBJ( 19.00, 'BTLF', GetLastCreatedUnit() )
call EnableTrigger( udg_Trg_2 )
call EnableTrigger( udg_Trg_3 )
call EnableTrigger( udg_Trg_4 )
call AddLightningLoc( "HWPB", GetUnitLoc(udg_Lom_Ability_Caster), GetUnitLoc(udg_Lom_Unit) )
set udg_l_1 = GetLastCreatedLightningBJ()
set udg_Integer_c = 100
set udg_Integer_f = 150
call AddLightningLoc( "AFOD", GetUnitLoc(udg_Lom_Ability_Caster), GetUnitLoc(udg_Lom_Unit_2) )
set udg_l_2 = GetLastCreatedLightningBJ()
call TriggerSleepAction( 8.50 )
set udg_I = -3
call TriggerSleepAction( 8.50 )
call DestroyLightningBJ( udg_l_1 )
call DestroyLightningBJ( udg_l_2 )
call DisableTrigger( udg_Trg_2 )
call DisableTrigger( udg_Trg_3 )
call DisableTrigger( udg_Trg_4 )
set udg_I = 0
// Specials
call AddSpecialEffectLocBJ( GetUnitLoc(udg_Lom_Ability_Caster), "Abilities\\Spells\\Orc\\Voodoo\\VoodooAura.mdl" )
call TriggerSleepAction( 3.50 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
set udg_Integer_A = 128
call SetUnitAnimation( udg_Lom_Ability_Caster, "slam" )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 0.00 )), "Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl" )
call ForGroupBJ( GetUnitsInRangeOfLocAll(150.00, PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 0.00 ))), function Trig_Legacy_of_Magic_Start_and_End_Func042Func002A )
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 180.00 )), "Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl" )
call ForGroupBJ( GetUnitsInRangeOfLocAll(150.00, PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 180.00 ))), function Trig_Legacy_of_Magic_Start_and_End_Func042Func005A )
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 90.00 )), "Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl" )
call ForGroupBJ( GetUnitsInRangeOfLocAll(150.00, PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 90.00 ))), function Trig_Legacy_of_Magic_Start_and_End_Func042Func008A )
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 270.00 )), "Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl" )
call ForGroupBJ( GetUnitsInRangeOfLocAll(150.00, PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 270.00 ))), function Trig_Legacy_of_Magic_Start_and_End_Func042Func011A )
set udg_Integer_A = ( udg_Integer_A + 100 )
call TriggerSleepAction( 0.01 )
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), 0.00), "Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl" )
call ForGroupBJ( GetUnitsInRangeOfLocAll(150.00, PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 0.00 ))), function Trig_Legacy_of_Magic_Start_and_End_Func042Func016A )
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), 180.00), "Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl" )
call ForGroupBJ( GetUnitsInRangeOfLocAll(150.00, PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 180.00 ))), function Trig_Legacy_of_Magic_Start_and_End_Func042Func019A )
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), 90.00), "Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl" )
call ForGroupBJ( GetUnitsInRangeOfLocAll(150.00, PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 90.00 ))), function Trig_Legacy_of_Magic_Start_and_End_Func042Func022A )
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), 270.00), "Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl" )
call ForGroupBJ( GetUnitsInRangeOfLocAll(150.00, PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 270.00 ))), function Trig_Legacy_of_Magic_Start_and_End_Func042Func025A )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), 1128.00, ( GetUnitFacing(udg_Lom_Ability_Caster) + 0.00 )), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
set udg_S_3 = GetLastCreatedEffectBJ()
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), 1128.00, ( GetUnitFacing(udg_Lom_Ability_Caster) + 180.00 )), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
set udg_S_4 = GetLastCreatedEffectBJ()
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), 1128.00, ( GetUnitFacing(udg_Lom_Ability_Caster) + 90.00 )), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
set udg_S_5 = GetLastCreatedEffectBJ()
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), 1128.00, ( GetUnitFacing(udg_Lom_Ability_Caster) + 270.00 )), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
set udg_S_6 = GetLastCreatedEffectBJ()
call TriggerSleepAction( 0.35 )
set udg_Integer_A = 1128
call SetUnitAnimation( udg_Lom_Ability_Caster, "slam" )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 0.00 )), "Objects\\Spawnmodels\\Human\\HCancelDeath\\HCancelDeath.mdl" )
call ForGroupBJ( GetUnitsInRangeOfLocAll(200.00, PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 0.00 ))), function Trig_Legacy_of_Magic_Start_and_End_Func054Func003A )
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 180.00 )), "Objects\\Spawnmodels\\Human\\HCancelDeath\\HCancelDeath.mdl" )
call ForGroupBJ( GetUnitsInRangeOfLocAll(200.00, PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 180.00 ))), function Trig_Legacy_of_Magic_Start_and_End_Func054Func006A )
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 90.00 )), "Objects\\Spawnmodels\\Human\\HCancelDeath\\HCancelDeath.mdl" )
call ForGroupBJ( GetUnitsInRangeOfLocAll(200.00, PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 90.00 ))), function Trig_Legacy_of_Magic_Start_and_End_Func054Func009A )
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 270.00 )), "Objects\\Spawnmodels\\Human\\HCancelDeath\\HCancelDeath.mdl" )
call ForGroupBJ( GetUnitsInRangeOfLocAll(200.00, PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 270.00 ))), function Trig_Legacy_of_Magic_Start_and_End_Func054Func012A )
set udg_Integer_A = ( udg_Integer_A - 100 )
call TriggerSleepAction( 0.01 )
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), 0.00), "Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl" )
call ForGroupBJ( GetUnitsInRangeOfLocAll(200.00, PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 45.00 ))), function Trig_Legacy_of_Magic_Start_and_End_Func054Func017A )
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), 180.00), "Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl" )
call ForGroupBJ( GetUnitsInRangeOfLocAll(200.00, PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 135.00 ))), function Trig_Legacy_of_Magic_Start_and_End_Func054Func020A )
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), 90.00), "Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl" )
call ForGroupBJ( GetUnitsInRangeOfLocAll(200.00, PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 235.00 ))), function Trig_Legacy_of_Magic_Start_and_End_Func054Func023A )
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), 270.00), "Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl" )
call ForGroupBJ( GetUnitsInRangeOfLocAll(200.00, PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_A), ( GetUnitFacing(udg_Lom_Ability_Caster) + 325.00 ))), function Trig_Legacy_of_Magic_Start_and_End_Func054Func026A )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call PauseUnitBJ( false, udg_Lom_Ability_Caster )
// Clean up
call ResetUnitAnimation( udg_Lom_Ability_Caster )
call ForGroupBJ( GetUnitsInRangeOfLocAll(1128.00, GetUnitLoc(udg_Lom_Ability_Caster)), function Trig_Legacy_of_Magic_Start_and_End_Func001A )
call DestroyEffectBJ( udg_S_3 )
call DestroyEffectBJ( udg_S_4 )
call DestroyEffectBJ( udg_S_5 )
call DestroyEffectBJ( udg_S_6 )
call ForGroupBJ( GetUnitsInRangeOfLocAll(1024.00, GetUnitLoc(udg_Lom_Ability_Caster)), function Trig_Legacy_of_Magic_Start_and_End_Func062A )
call ConditionalTriggerExecute( gg_trg_Legacy_of_Magic_Final )
endfunction
//===========================================================================
function InitTrig_Legacy_of_Magic_Start_and_End takes nothing returns nothing
set gg_trg_Legacy_of_Magic_Start_and_End = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Legacy_of_Magic_Start_and_End, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Legacy_of_Magic_Start_and_End, Condition( function Trig_Legacy_of_Magic_Start_and_End_Conditions ) )
call TriggerAddAction( gg_trg_Legacy_of_Magic_Start_and_End, function Trig_Legacy_of_Magic_Start_and_End_Actions )
endfunction
function Trig_Legacy_of_Magic_2_Func012Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_2_Func012A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_2_Func012Func001C() ) then
call UnitDamageTargetBJ( udg_Lom_Ability_Caster, GetEnumUnit(), ( udg_Damage / 50.00 ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Legacy_of_Magic_2_Func016Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_2_Func016A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_2_Func016Func001C() ) then
call UnitDamageTargetBJ( udg_Lom_Ability_Caster, GetEnumUnit(), ( udg_Damage / 50.00 ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Legacy_of_Magic_2_Func017Func004Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == false ) ) then
return false
endif
if ( not ( GetEnumUnit() != udg_Lom_Ability_Caster ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_2_Func017Func004A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_2_Func017Func004Func001C() ) then
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) + ( udg_Damage / 75.00 ) ) )
else
endif
set udg_Integer_c = ( udg_Integer_c + 150 )
endfunction
function Trig_Legacy_of_Magic_2_Func018Func004Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_2_Func018Func004A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_2_Func018Func004Func001C() ) then
call UnitDamageTargetBJ( udg_Lom_Ability_Caster, GetEnumUnit(), ( udg_Damage / 75.00 ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
set udg_Integer_f = ( udg_Integer_f + 150 )
endfunction
function Trig_Legacy_of_Magic_2_Actions takes nothing returns nothing
set udg_Integer_c = 100
set udg_Integer_f = 150
set udg_Lom_Integer = ( udg_Lom_Integer - 3 )
set udg_Lom_Integer_3 = ( udg_Lom_Integer_3 + 3 )
set udg_Lom_Integer_4 = ( udg_Lom_Integer_4 - udg_I )
set udg_Lom_Integer_2 = ( udg_Lom_Integer_2 + udg_I )
set udg_Integer_d = R2I(AngleBetweenPoints(GetUnitLoc(udg_Lom_Ability_Caster), GetUnitLoc(udg_Lom_Unit)))
set udg_Integer_e = R2I(AngleBetweenPoints(GetUnitLoc(udg_Lom_Ability_Caster), GetUnitLoc(udg_Lom_Unit_2)))
call SetUnitPositionLoc( udg_Lom_Unit, PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Lom_Integer_2), I2R(udg_Lom_Integer)) )
call AddSpecialEffectLocBJ( GetUnitLoc(udg_Lom_Unit), udg_Special_1 )
set udg_S_1 = GetLastCreatedEffectBJ()
call ForGroupBJ( GetUnitsInRangeOfLocAll(175.00, GetUnitLoc(udg_Lom_Unit)), function Trig_Legacy_of_Magic_2_Func012A )
call SetUnitPositionLoc( udg_Lom_Unit_2, PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Lom_Integer_4), I2R(udg_Lom_Integer_3)) )
call AddSpecialEffectLocBJ( GetUnitLoc(udg_Lom_Unit_2), udg_Special_2 )
set udg_S_2 = GetLastCreatedEffectBJ()
call ForGroupBJ( GetUnitsInRangeOfLocAll(175.00, GetUnitLoc(udg_Lom_Unit_2)), function Trig_Legacy_of_Magic_2_Func016A )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = R2I(( DistanceBetweenPoints(GetUnitLoc(udg_Lom_Ability_Caster), GetUnitLoc(udg_Lom_Unit)) / 150.00 ))
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'h002', GetOwningPlayer(udg_Lom_Ability_Caster), PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_c), I2R(udg_Integer_d)), bj_UNIT_FACING )
set udg_Dummy_1 = GetLastCreatedUnit()
call RemoveUnit( GetLastCreatedUnit() )
call ForGroupBJ( GetUnitsInRangeOfLocAll(151.00, PolarProjectionBJ(GetUnitLoc(GetLastCreatedUnit()), I2R(udg_Integer_c), I2R(udg_Integer_d))), function Trig_Legacy_of_Magic_2_Func017Func004A )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = R2I(( DistanceBetweenPoints(GetUnitLoc(udg_Lom_Ability_Caster), GetUnitLoc(udg_Lom_Unit_2)) / 150.00 ))
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'h002', GetOwningPlayer(udg_Lom_Ability_Caster), PolarProjectionBJ(GetUnitLoc(udg_Lom_Ability_Caster), I2R(udg_Integer_f), I2R(udg_Integer_e)), bj_UNIT_FACING )
set udg_Dummy_2 = GetLastCreatedUnit()
call RemoveUnit( GetLastCreatedUnit() )
call ForGroupBJ( GetUnitsInRangeOfLocAll(151.00, PolarProjectionBJ(GetUnitLoc(GetLastCreatedUnit()), I2R(udg_Integer_f), I2R(udg_Integer_e))), function Trig_Legacy_of_Magic_2_Func018Func004A )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( 1.35 )
call DestroyEffectBJ( udg_S_1 )
call DestroyEffectBJ( udg_S_2 )
call RemoveUnit( udg_Dummy_1 )
call RemoveUnit( udg_Dummy_2 )
endfunction
//===========================================================================
function InitTrig_Legacy_of_Magic_Loop takes nothing returns nothing
set gg_trg_Legacy_of_Magic_Loop = CreateTrigger( )
call DisableTrigger( gg_trg_Legacy_of_Magic_Loop )
call TriggerRegisterTimerEventPeriodic( gg_trg_Legacy_of_Magic_Loop, 0.03 )
call TriggerAddAction( gg_trg_Legacy_of_Magic_Loop, function Trig_Legacy_of_Magic_2_Actions )
endfunction
function Trig_Legacy_of_Magic_3_Actions takes nothing returns nothing
call MoveLightningLoc( udg_l_1, GetUnitLoc(udg_Lom_Ability_Caster), GetUnitLoc(udg_Lom_Unit) )
call MoveLightningLoc( udg_l_2, GetUnitLoc(udg_Lom_Ability_Caster), GetUnitLoc(udg_Lom_Unit_2) )
endfunction
//===========================================================================
function InitTrig_Legacy_of_Magic_Lightings takes nothing returns nothing
set gg_trg_Legacy_of_Magic_Lightings = CreateTrigger( )
call DisableTrigger( gg_trg_Legacy_of_Magic_Lightings )
call TriggerRegisterTimerEventPeriodic( gg_trg_Legacy_of_Magic_Lightings, 0.01 )
call TriggerAddAction( gg_trg_Legacy_of_Magic_Lightings, function Trig_Legacy_of_Magic_3_Actions )
endfunction
function Trig_Legacy_of_Magic_4_Actions takes nothing returns nothing
call SetUnitAnimation( udg_Lom_Ability_Caster, "attack" )
endfunction
//===========================================================================
function InitTrig_Legacy_of_Magic_Animation takes nothing returns nothing
set gg_trg_Legacy_of_Magic_Animation = CreateTrigger( )
call DisableTrigger( gg_trg_Legacy_of_Magic_Animation )
call TriggerRegisterTimerEventPeriodic( gg_trg_Legacy_of_Magic_Animation, 1.05 )
call TriggerAddAction( gg_trg_Legacy_of_Magic_Animation, function Trig_Legacy_of_Magic_4_Actions )
endfunction
function Trig_Legacy_of_Magic_Final_Func001Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(udg_Lom_Ability_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Legacy_of_Magic_Final_Func001A takes nothing returns nothing
if ( Trig_Legacy_of_Magic_Final_Func001Func001C() ) then
call UnitDamageTargetBJ( udg_Lom_Ability_Caster, GetEnumUnit(), ( udg_Damage * ( DistanceBetweenPoints(GetUnitLoc(GetEnumUnit()), GetUnitLoc(udg_Lom_Ability_Caster)) / 223.00 ) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
call AddSpecialEffectTargetUnitBJ( "origin", GetEnumUnit(), udg_Explode_Model )
else
endif
endfunction
function Trig_Legacy_of_Magic_Final_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocAll( udg_Explode_Area, GetUnitLoc(udg_Lom_Ability_Caster)), function Trig_Legacy_of_Magic_Final_Func001A )
endfunction
//===========================================================================
function InitTrig_Legacy_of_Magic_Final takes nothing returns nothing
set gg_trg_Legacy_of_Magic_Final = CreateTrigger( )
call DisableTrigger( gg_trg_Legacy_of_Magic_Final )
call TriggerAddAction( gg_trg_Legacy_of_Magic_Final, function Trig_Legacy_of_Magic_Final_Actions )
endfunction