function DamageUnitCheck takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), udg_Pla_DamageCheck ) == true )
endfunction
function DamageUnitCustom takes unit caster, real damage, location loc, real radius returns nothing
local unit uni_caster = caster
local unit uni_loop = null
local location loc_aoe = loc
local real rea_damage = damage
local real rea_radius = radius
local group grp_targets = null
set udg_Pla_DamageCheck = GetOwningPlayer( uni_caster )
set grp_targets = GetUnitsInRangeOfLocMatching(rea_radius, loc_aoe, Condition(function DamageUnitCheck))
loop
set uni_loop = FirstOfGroup( grp_targets )
exitwhen uni_loop == null
call UnitDamageTargetBJ( uni_caster, uni_loop, rea_damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )
call GroupRemoveUnit( grp_targets, uni_loop )
endloop
call DestroyGroup( grp_targets )
set uni_caster = null
set uni_loop = null
set udg_Pla_DamageCheck = null
endfunction
Name | Type | is_array | initial_value |
AlliancePlayers | force | No | |
AllianceRevive | location | No | |
AlternateWave | boolean | No | true |
AvailableHeroes | group | No | |
Boo_EarthRumbleCheck | boolean | No | |
Boo_SinglePlayer | boolean | No | |
BottomLaneMiddle | location | No | |
CastleArea | location | No | |
CastleHeavyMelee | integer | No | |
CastleSiege | integer | No | |
CastleSpellcasters | integer | No | |
CastleTotalUnits | real | No | |
CastleUnitSpawn | location | No | |
Citadel1HeavyMelee | integer | No | |
Citadel1Siege | integer | No | |
Citadel1Spellcasters | integer | No | |
Citadel1TotalUnits | real | No | |
Citadel1UnitSpawn | location | No | |
Citadel2HeavyMelee | integer | No | |
Citadel2Siege | integer | No | |
Citadel2Spellcasters | integer | No | |
Citadel2TotalUnits | real | No | |
Citadel2UnitSpawn | location | No | |
CreatedHeroTrigger | trigger | No | |
DeadHero | unit | Yes | |
DyingDestructible | destructable | No | |
FortressArea | location | No | |
FortressHeavyMelee | integer | No | |
FortressSiege | integer | No | |
FortressSpellcasters | integer | No | |
FortressTotalUnits | real | No | |
FortressUnitSpawn | location | No | |
GoldDistributionIntegers | integer | Yes | |
HeroRevivalTimer | timer | Yes | |
HeroRevivalTimerTime | real | Yes | |
HeroRevivalTimerWindow | timerdialog | Yes | |
HeroSection | rect | Yes | |
HordePlayers | force | No | |
HordeRevive | location | No | |
Int_AllianceArmor | integer | No | |
Int_AllianceWeapons | integer | No | |
Int_AzsharaGiftLevel | integer | No | |
Int_BTFLevel | integer | No | |
Int_CultivateBonus | integer | No | |
Int_EbonMineLevel | integer | No | |
Int_HexLevel | integer | No | |
Int_HordeArmor | integer | No | |
Int_HordeWeapons | integer | No | |
Int_IBulletLevel | integer | No | |
Int_MeltdownMultiplier | integer | No | 1 |
Int_OverloadLevel | integer | No | |
Int_RoSKills | integer | No | |
Int_RoSLevel | integer | No | |
Int_RTLevel | integer | No | |
Int_SelectedHeroes | integer | No | |
Int_SPHeroCount | integer | No | |
Int_TotalPlayers | integer | No | |
Loc_BackSlashOrigin | location | No | |
Loc_PlayerWorkers | location | Yes | |
MiddleLaneMiddle | location | No | |
OutpostFirstHire | boolean | Yes | true |
Pla_ArcaneMaster | player | No | |
Pla_DamageCheck | player | No | |
Pla_MonkOwner | player | No | |
PlayerDisjunctionGraphic | effect | Yes | |
PlayerDisjunctionPoint | location | Yes | |
PlayerGold | integer | Yes | |
Rea_GrandViperLevel | real | No | |
Rea_RipAndTearLevel | real | No | |
Reg_AllianceWorkers | location | No | |
Reg_HordeWorkers | location | No | |
TempAbility | abilcode | No | |
TempInt | integer | Yes | |
TempItems | item | Yes | |
TempPlayer | player | No | |
TempPoint | location | No | |
TempReal | real | No | |
TempRegion | rect | No | |
TempUnit | unit | Yes | |
TempUnitType | unitcode | Yes | |
Tim_BackSlash | timer | No | |
Tim_EnergySinkTimer | timer | No | |
Tim_Meltdown | timer | No | |
Tim_OverloadTimer | timer | No | |
Tim_PowerUpTimer | timer | No | |
Tim_PurpleHaze | timer | No | |
Tim_RoSBonus | timer | No | |
Tim_SiegeMode | timer | No | |
Tim_SilentScope | timer | No | |
Tim_StandUnrivalled | timer | No | |
Tim_Unbreakable | timer | No | |
TopLaneMiddle | location | No | |
Tree1HeavyMelee | integer | No | |
Tree1Siege | integer | No | |
Tree1Spellcasters | integer | No | |
Tree1TotalUnits | real | No | |
Tree1UnitSpawn | location | No | |
Tree2HeavyMelee | integer | No | |
Tree2Siege | integer | No | |
Tree2Spellcasters | integer | No | |
Tree2TotalUnits | real | No | |
Tree2UnitSpawn | location | No | |
Uni_AbsorbFleshTarget | unit | No | UnitNull |
Uni_AllianceHeroes | unit | Yes | |
Uni_ArcaneMaster | unit | No | |
Uni_ArsenalThane | unit | No | |
Uni_Baron | unit | No | |
Uni_BessieTank | unit | No | |
Uni_BleedingEdgeTarget | unit | No | |
Uni_BTFTarget | unit | No | |
Uni_Demonarch | unit | No | |
Uni_EnergySinkTarget | unit | No | |
Uni_GrandGardener | unit | No | |
Uni_HexLord | unit | No | |
Uni_HordeHeroes | unit | Yes | |
Uni_MarrowKnight | unit | No | |
Uni_Monk | unit | No | |
Uni_Nightshade | unit | No | |
Uni_OverloadVictim | unit | No | |
Uni_PurpleHaze | unit | No | |
Uni_RoSDummy | unit | No | |
Uni_Shadowmaiden | unit | No | |
Uni_SiegeModeDummy | unit | No | |
Uni_SMTarget | unit | No | |
Uni_ThaneTransport | unit | No | |
Uni_Zealot | unit | No | |
UnitVar | unit | No | |
UpgradeBooleans | boolean | Yes |
function Trig_Regrowth_Actions takes nothing returns nothing
local real seconds = 45.00 // Change That Value to what you like
local destructable tree = GetDyingDestructable()
call TriggerSleepAction( seconds )
call DestructableRestoreLife( tree, GetDestructableMaxLife(tree), true )
endfunction
function InitTrig_Regrowth_Register takes nothing returns nothing
if ( GetDestructableTypeId(GetEnumDestructable()) == 'ZTtw' ) then
call TriggerRegisterDeathEvent( gg_trg_Regrowth, GetEnumDestructable() )
endif
endfunction
//===========================================================================
function InitTrig_Regrowth takes nothing returns nothing
set gg_trg_Regrowth = CreateTrigger( )
call EnumDestructablesInRectAll( GetPlayableMapRect(), function InitTrig_Regrowth_Register )
call TriggerAddAction( gg_trg_Regrowth, function Trig_Regrowth_Actions )
endfunction
function Trig_Staff_of_Disjunction_Warp_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01N' ) ) then
return false
endif
return true
endfunction
function Trig_Staff_of_Disjunction_Warp_Actions takes nothing returns nothing
local unit uni_warper = GetSpellAbilityUnit()
local location loc_warper = GetUnitLoc( uni_warper )
local player pla_warper = GetOwningPlayer( uni_warper )
local integer int_warperindex = GetConvertedPlayerId( pla_warper )
call DestroyEffectBJ( AddSpecialEffectLocBJ( loc_warper, "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl" ) )
call DestroyEffectBJ( AddSpecialEffectLocBJ( udg_PlayerDisjunctionPoint[ int_warperindex ], "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl" ) )
call SetUnitPositionLoc( uni_warper, udg_PlayerDisjunctionPoint[ int_warperindex ] )
call RemoveLocation( loc_warper )
set uni_warper = null
endfunction
//===========================================================================
function InitTrig_Staff_of_Disjunction_Warp takes nothing returns nothing
set gg_trg_Staff_of_Disjunction_Warp = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Staff_of_Disjunction_Warp, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Staff_of_Disjunction_Warp, Condition( function Trig_Staff_of_Disjunction_Warp_Conditions ) )
call TriggerAddAction( gg_trg_Staff_of_Disjunction_Warp, function Trig_Staff_of_Disjunction_Warp_Actions )
endfunction
function Trig_Variable_Declaration_Actions takes nothing returns nothing
set udg_BottomLaneMiddle = GetRectCenter(gg_rct_Bottom_Lane_Middle_Point)
set udg_Citadel1UnitSpawn = GetRectCenter(gg_rct_Undead_Unit_Spawn_1)
set udg_Citadel2UnitSpawn = GetRectCenter(gg_rct_Undead_Unit_Spawn_2)
set udg_CastleArea = GetRectCenter(gg_rct_Castle_Tower_Area)
set udg_CastleUnitSpawn = GetRectCenter(gg_rct_Human_Unit_Spawn)
set udg_FortressArea = GetRectCenter(gg_rct_Fortress_Tower_Area)
set udg_FortressUnitSpawn = GetRectCenter(gg_rct_Orc_Unit_Spawn)
set udg_MiddleLaneMiddle = GetRectCenter(gg_rct_Middle_Lane_Middle_Point)
set udg_TopLaneMiddle = GetRectCenter(gg_rct_Top_Lane_Middle_Point)
set udg_Tree1UnitSpawn = GetRectCenter(gg_rct_Night_Elf_Unit_Spawn_1)
set udg_Tree2UnitSpawn = GetRectCenter(gg_rct_Night_Elf_Unit_Spawn_2)
set udg_AllianceRevive = GetRectCenter(gg_rct_Alliance_Hero_Revive_Area)
set udg_HordeRevive = GetRectCenter(gg_rct_Horde_Hero_Revive_Area)
set udg_Reg_AllianceWorkers = GetRectCenter(gg_rct_Alliance_Worker_Spawn)
set udg_Reg_HordeWorkers = GetRectCenter(gg_rct_Horde_Worker_Spawn)
set udg_GoldDistributionIntegers[1] = 100
set udg_GoldDistributionIntegers[2] = 50
set udg_GoldDistributionIntegers[3] = 33
set udg_GoldDistributionIntegers[4] = 25
set udg_GoldDistributionIntegers[5] = 20
call DestroyTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Variable_Declaration takes nothing returns nothing
set gg_trg_Variable_Declaration = CreateTrigger( )
call TriggerAddAction( gg_trg_Variable_Declaration, function Trig_Variable_Declaration_Actions )
endfunction
function Trig_Castle_Waves_Func005C takes nothing returns boolean
if ( not ( udg_AlternateWave == true ) ) then
return false
endif
return true
endfunction
function Trig_Castle_Waves_Func007002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", udg_MiddleLaneMiddle )
endfunction
function Trig_Castle_Waves_Actions takes nothing returns nothing
call CreateNUnitsAtLocFacingLocBJ( 2, 'h007', Player(13), udg_CastleUnitSpawn, udg_MiddleLaneMiddle )
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Human_Unit_Spawn, Player(13)), function Trig_Castle_Waves_Func007002 )
call TriggerSleepAction( 0.01 )
call CreateNUnitsAtLocFacingLocBJ( 6, 'h006', Player(13), udg_CastleUnitSpawn, udg_MiddleLaneMiddle )
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Human_Unit_Spawn, Player(13)), function Trig_Castle_Waves_Func007002 )
call TriggerSleepAction( 0.01 )
if ( Trig_Castle_Waves_Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( udg_CastleHeavyMelee, 'h004', Player(13), udg_CastleUnitSpawn, udg_MiddleLaneMiddle )
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Human_Unit_Spawn, Player(13)), function Trig_Castle_Waves_Func007002 )
call TriggerSleepAction( 0.01 )
call CreateNUnitsAtLocFacingLocBJ( udg_CastleSiege, 'h00Y', Player(13), udg_CastleUnitSpawn, udg_MiddleLaneMiddle )
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Human_Unit_Spawn, Player(13)), function Trig_Castle_Waves_Func007002 )
call TriggerSleepAction( 0.01 )
call CreateNUnitsAtLocFacingLocBJ( udg_CastleSpellcasters, 'h00Z', Player(13), udg_CastleUnitSpawn, udg_MiddleLaneMiddle )
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Human_Unit_Spawn, Player(13)), function Trig_Castle_Waves_Func007002 )
call TriggerSleepAction( 0.01 )
call CreateNUnitsAtLocFacingLocBJ( 3, 'h005', Player(13), udg_CastleUnitSpawn, udg_MiddleLaneMiddle )
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Human_Unit_Spawn, Player(13)), function Trig_Castle_Waves_Func007002 )
call TriggerSleepAction( 0.01 )
call CreateNUnitsAtLocFacingLocBJ( 1, 'n00Q', Player(13), udg_CastleUnitSpawn, udg_MiddleLaneMiddle )
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Human_Unit_Spawn, Player(13)), function Trig_Castle_Waves_Func007002 )
else
endif
endfunction
//===========================================================================
function InitTrig_Castle_Waves takes nothing returns nothing
set gg_trg_Castle_Waves = CreateTrigger( )
call TriggerAddAction( gg_trg_Castle_Waves, function Trig_Castle_Waves_Actions )
endfunction
function Trig_Hero_Selection_Alliance_Conditions takes nothing returns boolean
if ( not ( GetSellingUnit() == gg_unit_n007_0081 ) ) then
return false
endif
return true
endfunction
function Trig_Hero_Selection_Alliance_Func004002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Hero_Selection_Alliance_Actions takes nothing returns nothing
local unit uni_soldhero = GetSoldUnit()
local integer int_lookup = GetUnitPointValue( uni_soldhero )
local unit uni_rescuedhero = udg_Uni_AllianceHeroes[int_lookup]
local player pla_soldhero = GetOwningPlayer( uni_soldhero )
local string str_message = GetPlayerName( pla_soldhero ) + " has chosen the " + GetUnitName( uni_rescuedhero ) + "!"
local unit uni_worker = null
local integer int_loop = 0
local integer int_player = GetConvertedPlayerId( pla_soldhero )
local group grp_workers = null
if udg_Int_TotalPlayers == 1 then
set udg_Int_SPHeroCount = udg_Int_SPHeroCount + 1
else
endif
call RescueUnitBJ( uni_rescuedhero, pla_soldhero, false )
call RemoveUnit( uni_soldhero )
call DestroyEffectBJ( AddSpecialEffectTargetUnitBJ( "origin", uni_rescuedhero, "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl" ) )
call SetUnitPositionLoc( uni_rescuedhero, udg_AllianceRevive )
call DestroyEffectBJ( AddSpecialEffectTargetUnitBJ( "origin", uni_rescuedhero, "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl" ) )
if GetUnitTypeId( uni_soldhero ) == 'Hapm' then
call UnitAddItemByIdSwapped( 'I00A', uni_rescuedhero )
else
call UnitAddItemByIdSwapped( 'I00F', uni_rescuedhero )
endif
if udg_Int_SPHeroCount == 3 or udg_Int_TotalPlayers > 1 then
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(pla_soldhero, 'o00G'), function Trig_Hero_Selection_Alliance_Func004002 )
loop
exitwhen int_loop == 5
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00I', pla_soldhero, udg_Loc_PlayerWorkers[ int_player ], udg_Loc_PlayerWorkers[ int_player ] )
set uni_worker = GetLastCreatedUnit()
call IssueImmediateOrderBJ( uni_worker, "manaflareon" )
set int_loop = int_loop + 1
endloop
call PanCameraToTimedLocForPlayer( pla_soldhero, udg_AllianceRevive, 0 )
else
endif
call SetUnitInvulnerable( uni_rescuedhero, false )
call SetHeroLevelBJ( uni_rescuedhero, 1, false )
set udg_Uni_AllianceHeroes[int_lookup] = null
set udg_Int_SelectedHeroes = udg_Int_SelectedHeroes + 1
call DisplayTextToForce( GetPlayersAll(), str_message )
call SetPlayerAllianceBJ( pla_soldhero, ALLIANCE_SHARED_VISION, true, Player(13) )
call SetPlayerAllianceBJ( Player(13), ALLIANCE_SHARED_VISION, true, pla_soldhero )
if GetUnitTypeId(uni_soldhero) == 'Hlgr' then
call SetPlayerTechResearchedSwap( 'R007', 1, pla_soldhero )
else
endif
if GetUnitTypeId(uni_soldhero) == 'Hmkg' then
call SetPlayerTechResearchedSwap( 'R005', 1, pla_soldhero )
else
endif
call ConditionalTriggerExecute( gg_trg_All_Heroes_Selected )
set uni_soldhero = null
set uni_rescuedhero = null
endfunction
//===========================================================================
function InitTrig_Hero_Selection_Alliance takes nothing returns nothing
set gg_trg_Hero_Selection_Alliance = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hero_Selection_Alliance, EVENT_PLAYER_UNIT_SELL )
call TriggerAddCondition( gg_trg_Hero_Selection_Alliance, Condition( function Trig_Hero_Selection_Alliance_Conditions ) )
call TriggerAddAction( gg_trg_Hero_Selection_Alliance, function Trig_Hero_Selection_Alliance_Actions )
endfunction
function Trig_Hero_Selection_Horde_Conditions takes nothing returns boolean
if ( not ( GetSellingUnit() == gg_unit_n00C_0080 ) ) then
return false
endif
return true
endfunction
function Trig_Hero_Selection_Horde_Func001002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Hero_Selection_Horde_Actions takes nothing returns nothing
local unit uni_soldhero = GetSoldUnit()
local integer int_lookup = GetUnitPointValue( uni_soldhero )
local unit uni_rescuedhero = udg_Uni_HordeHeroes[int_lookup]
local player pla_soldhero = GetOwningPlayer( uni_soldhero )
local string str_message = GetPlayerName( pla_soldhero ) + " has chosen the " + GetUnitName( uni_rescuedhero ) + "!"
local unit uni_worker = null
local integer int_loop = 0
local integer int_player = GetConvertedPlayerId( pla_soldhero )
local group grp_workers = null
if udg_Int_TotalPlayers == 1 then
set udg_Int_SPHeroCount = udg_Int_SPHeroCount + 1
else
endif
call RescueUnitBJ( uni_rescuedhero, pla_soldhero, false )
call RemoveUnit( uni_soldhero )
call DestroyEffectBJ( AddSpecialEffectTargetUnitBJ( "origin", uni_rescuedhero, "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl" ) )
call SetUnitPositionLoc( uni_rescuedhero, udg_HordeRevive )
call DestroyEffectBJ( AddSpecialEffectTargetUnitBJ( "origin", uni_rescuedhero, "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl" ) )
if GetUnitTypeId( uni_soldhero ) == 'Udea' then
call UnitAddItemByIdSwapped( 'I00A', uni_rescuedhero )
else
call UnitAddItemByIdSwapped( 'I00F', uni_rescuedhero )
endif
if udg_Int_SPHeroCount == 3 or udg_Int_TotalPlayers > 1 then
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(pla_soldhero, 'o00G'), function Trig_Hero_Selection_Horde_Func001002 )
loop
exitwhen int_loop == 5
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00J', pla_soldhero, udg_Loc_PlayerWorkers[ int_player ], udg_Loc_PlayerWorkers[ int_player ] )
set uni_worker = GetLastCreatedUnit()
call IssueImmediateOrderBJ( uni_worker, "manaflareon" )
set int_loop = int_loop + 1
endloop
call PanCameraToTimedLocForPlayer( pla_soldhero, udg_HordeRevive, 0 )
else
endif
call SetUnitInvulnerable( uni_rescuedhero, false )
call SetHeroLevelBJ( uni_rescuedhero, 1, false )
set udg_Uni_HordeHeroes[int_lookup] = null
set udg_Int_SelectedHeroes = udg_Int_SelectedHeroes + 1
call DisplayTextToForce( GetPlayersAll(), str_message )
call SetPlayerAllianceBJ( pla_soldhero, ALLIANCE_SHARED_VISION, true, Player(12) )
call SetPlayerAllianceBJ( Player(12), ALLIANCE_SHARED_VISION, true, pla_soldhero )
if GetUnitTypeId(uni_soldhero) == 'Udea' then
call SetPlayerTechResearchedSwap( 'R008', 1, pla_soldhero )
else
endif
if GetUnitTypeId(uni_soldhero) == 'Ocb2' then
call SetPlayerTechResearchedSwap( 'R001', 1, pla_soldhero )
else
endif
call ConditionalTriggerExecute( gg_trg_All_Heroes_Selected )
set uni_soldhero = null
set uni_rescuedhero = null
endfunction
//===========================================================================
function InitTrig_Hero_Selection_Horde takes nothing returns nothing
set gg_trg_Hero_Selection_Horde = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hero_Selection_Horde, EVENT_PLAYER_UNIT_SELL )
call TriggerAddCondition( gg_trg_Hero_Selection_Horde, Condition( function Trig_Hero_Selection_Horde_Conditions ) )
call TriggerAddAction( gg_trg_Hero_Selection_Horde, function Trig_Hero_Selection_Horde_Actions )
endfunction
function Trig_Worker_Begins_Channelling_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06S' ) ) then
return false
endif
return true
endfunction
function Trig_Worker_Begins_Channelling_Actions takes nothing returns nothing
local unit uni_goldchan = GetSpellAbilityUnit()
local integer int_goldplay = GetConvertedPlayerId(GetOwningPlayer(uni_goldchan))
set udg_PlayerGold[int_goldplay] = ( udg_PlayerGold[int_goldplay] + 2 )
call PolledWait(0.01)
call SetUnitAnimationByIndex( uni_goldchan, 4 )
set uni_goldchan = null
endfunction
//===========================================================================
function InitTrig_Worker_Begins_Channelling takes nothing returns nothing
set gg_trg_Worker_Begins_Channelling = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Worker_Begins_Channelling, EVENT_PLAYER_UNIT_SPELL_CHANNEL )
call TriggerAddCondition( gg_trg_Worker_Begins_Channelling, Condition( function Trig_Worker_Begins_Channelling_Conditions ) )
call TriggerAddAction( gg_trg_Worker_Begins_Channelling, function Trig_Worker_Begins_Channelling_Actions )
endfunction
function Trig_Worker_Begins_Channelling_Copy_Copy_Copy_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06S' ) ) then
return false
endif
return true
endfunction
function Trig_Worker_Begins_Channelling_Copy_Copy_Copy_Actions takes nothing returns nothing
set udg_PlayerGold[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] = ( udg_PlayerGold[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] + 1 )
call DisplayTextToForce( GetPlayersAll(), UnitId2StringBJ(GetUnitTypeId(GetSpellAbilityUnit())) )
endfunction
//===========================================================================
function InitTrig_Worker_Begins_Channelling_Copy_Copy_Copy takes nothing returns nothing
set gg_trg_Worker_Begins_Channelling_Copy_Copy_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Worker_Begins_Channelling_Copy_Copy_Copy, EVENT_PLAYER_UNIT_SPELL_CHANNEL )
call TriggerAddCondition( gg_trg_Worker_Begins_Channelling_Copy_Copy_Copy, Condition( function Trig_Worker_Begins_Channelling_Copy_Copy_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Worker_Begins_Channelling_Copy_Copy_Copy, function Trig_Worker_Begins_Channelling_Copy_Copy_Copy_Actions )
endfunction
function Trig_Worker_Stops_Channelling_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06S' ) ) then
return false
endif
return true
endfunction
function Trig_Worker_Stops_Channelling_Actions takes nothing returns nothing
local unit uni_goldchan = GetSpellAbilityUnit()
local integer int_goldplay = GetConvertedPlayerId(GetOwningPlayer(uni_goldchan))
set udg_PlayerGold[int_goldplay] = ( udg_PlayerGold[int_goldplay] - 2 )
call ResetUnitAnimation( uni_goldchan )
set uni_goldchan = null
endfunction
//===========================================================================
function InitTrig_Worker_Stops_Channelling takes nothing returns nothing
set gg_trg_Worker_Stops_Channelling = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Worker_Stops_Channelling, EVENT_PLAYER_UNIT_SPELL_ENDCAST )
call TriggerAddCondition( gg_trg_Worker_Stops_Channelling, Condition( function Trig_Worker_Stops_Channelling_Conditions ) )
call TriggerAddAction( gg_trg_Worker_Stops_Channelling, function Trig_Worker_Stops_Channelling_Actions )
endfunction
function Trig_Hero_Revival_Trigger_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Hero_Revival_Trigger_Actions takes nothing returns nothing
local unit uni_dyinghero = GetDyingUnit()
local player pla_dyingowner = GetOwningPlayer(uni_dyinghero)
local integer int_playerid = GetConvertedPlayerId(pla_dyingowner)
set udg_DeadHero[int_playerid] = uni_dyinghero
call StartTimerBJ( udg_HeroRevivalTimer[int_playerid], false, ( 6.00 * I2R(GetHeroLevel(uni_dyinghero)) ) )
call CreateTimerDialogBJ( udg_HeroRevivalTimer[int_playerid], ( GetPlayerName(pla_dyingowner) + " revives in:" ) )
set udg_HeroRevivalTimerWindow[int_playerid] = GetLastCreatedTimerDialogBJ()
set uni_dyinghero = null
endfunction
//===========================================================================
function InitTrig_Hero_Revival_Trigger takes nothing returns nothing
set gg_trg_Hero_Revival_Trigger = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hero_Revival_Trigger, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Hero_Revival_Trigger, Condition( function Trig_Hero_Revival_Trigger_Conditions ) )
call TriggerAddAction( gg_trg_Hero_Revival_Trigger, function Trig_Hero_Revival_Trigger_Actions )
endfunction
function Trig_Scintillating_Storm_Trigger_Activate_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AOls' ) ) then
return false
endif
return true
endfunction
function Trig_Scintillating_Storm_Trigger_Activate_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_Scintillating_Storm_Missile_Kill )
call PolledWait( 20.00 )
call DisableTrigger( gg_trg_Scintillating_Storm_Missile_Kill )
endfunction
//===========================================================================
function InitTrig_Scintillating_Storm_Trigger_Activate takes nothing returns nothing
set gg_trg_Scintillating_Storm_Trigger_Activate = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Scintillating_Storm_Trigger_Activate, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Scintillating_Storm_Trigger_Activate, Condition( function Trig_Scintillating_Storm_Trigger_Activate_Conditions ) )
call TriggerAddAction( gg_trg_Scintillating_Storm_Trigger_Activate, function Trig_Scintillating_Storm_Trigger_Activate_Actions )
endfunction
function Trig_Scintillating_Storm_Missile_Kill_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'u004' ) ) then
return false
endif
return true
endfunction
function Trig_Scintillating_Storm_Missile_Kill_Actions takes nothing returns nothing
local unit uni_missile = GetAttacker()
local location loc_missile = GetUnitLoc( uni_missile )
local effect sfx_explosion = null
call DamageUnitCustom( uni_missile, 30.00, loc_missile, 200.00)
call KillUnit( uni_missile )
call AddSpecialEffectLocBJ( loc_missile , "war3mapImported\\EMPBomb.mdx" )
set sfx_explosion = GetLastCreatedEffectBJ()
call BlzSetSpecialEffectZ( sfx_explosion, 90.00 )
call BlzSetSpecialEffectScale( sfx_explosion, 1.50 )
call DestroyEffectBJ( sfx_explosion )
call RemoveLocation( loc_missile )
set uni_missile = null
endfunction
//===========================================================================
function InitTrig_Scintillating_Storm_Missile_Kill takes nothing returns nothing
set gg_trg_Scintillating_Storm_Missile_Kill = CreateTrigger( )
call DisableTrigger( gg_trg_Scintillating_Storm_Missile_Kill )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Scintillating_Storm_Missile_Kill, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Scintillating_Storm_Missile_Kill, Condition( function Trig_Scintillating_Storm_Missile_Kill_Conditions ) )
call TriggerAddAction( gg_trg_Scintillating_Storm_Missile_Kill, function Trig_Scintillating_Storm_Missile_Kill_Actions )
endfunction
function Trig_Power_Up_Cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'Afzy' ) ) then
return false
endif
return true
endfunction
function Trig_Power_Up_Cast_Actions takes nothing returns nothing
local unit uni_arcmas = GetSpellAbilityUnit()
local integer int_puplvl = GetUnitAbilityLevelSwapped('AItg', uni_arcmas) + 1
call SetUnitAbilityLevelSwapped( 'AItg', uni_arcmas, int_puplvl )
call StartTimerBJ( udg_Tim_PowerUpTimer, false, 7.00 )
set uni_arcmas = null
endfunction
//===========================================================================
function InitTrig_Power_Up_Cast takes nothing returns nothing
set gg_trg_Power_Up_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Power_Up_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Power_Up_Cast, Condition( function Trig_Power_Up_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Power_Up_Cast, function Trig_Power_Up_Cast_Actions )
endfunction
function Trig_Overload_Explode_Victim_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'ANdo' ) ) then
return false
endif
return true
endfunction
function Trig_Overload_Explode_Victim_Actions takes nothing returns nothing
local unit uni_overload = GetSpellTargetUnit()
call SetUnitExplodedBJ( uni_overload, true )
call StartTimerBJ( udg_Tim_OverloadTimer, false, 21.01 )
set udg_Uni_OverloadVictim = uni_overload
set uni_overload = null
endfunction
//===========================================================================
function InitTrig_Overload_Explode_Victim takes nothing returns nothing
set gg_trg_Overload_Explode_Victim = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Overload_Explode_Victim, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Overload_Explode_Victim, Condition( function Trig_Overload_Explode_Victim_Conditions ) )
call TriggerAddAction( gg_trg_Overload_Explode_Victim, function Trig_Overload_Explode_Victim_Actions )
endfunction
function Trig_Overload_Special_Effect_Copy_Copy_Copy_Conditions takes nothing returns boolean
if ( not ( GetDyingUnit() == udg_Uni_OverloadVictim ) ) then
return false
endif
return true
endfunction
function Trig_Overload_Special_Effect_Copy_Copy_Copy_Actions takes nothing returns nothing
local unit uni_victim = GetDyingUnit()
local real rea_damage = ( 350.00 * I2R( udg_Int_OverloadLevel ) ) + ( 35.00 * I2R(R2I(TimerGetElapsed( udg_Tim_OverloadTimer ))))
local location loc_victim = GetUnitLoc( uni_victim )
call DamageUnitCustom( udg_Uni_ArcaneMaster, rea_damage, loc_victim, 400.00 )
call DestroyEffectBJ( AddSpecialEffectLocBJ( loc_victim, "ArcaneEnd.mdx" ) )
set uni_victim = null
call RemoveLocation( loc_victim )
endfunction
//===========================================================================
function InitTrig_Overload_Victim_Death_New takes nothing returns nothing
set gg_trg_Overload_Victim_Death_New = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Overload_Victim_Death_New, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Overload_Victim_Death_New, Condition( function Trig_Overload_Special_Effect_Copy_Copy_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Overload_Victim_Death_New, function Trig_Overload_Special_Effect_Copy_Copy_Copy_Actions )
endfunction
function Trig_Energy_Sink_Dispel_Func001C takes nothing returns boolean
if ( ( TimerGetRemaining(udg_Tim_EnergySinkTimer) == 0.00 ) ) then
return true
endif
if ( ( UnitHasBuffBJ(udg_Uni_EnergySinkTarget, 'Brej') == false ) ) then
return true
endif
if ( ( IsUnitAliveBJ(udg_Uni_EnergySinkTarget) == false ) ) then
return true
endif
return false
endfunction
function Trig_Energy_Sink_Dispel_Conditions takes nothing returns boolean
if ( not Trig_Energy_Sink_Dispel_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Energy_Sink_Dispel_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'AHab', udg_Uni_EnergySinkTarget )
call UnitRemoveAbilityBJ( 'A00C', udg_Uni_EnergySinkTarget )
set udg_Uni_EnergySinkTarget = null
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Energy_Sink_Dispel takes nothing returns nothing
set gg_trg_Energy_Sink_Dispel = CreateTrigger( )
call DisableTrigger( gg_trg_Energy_Sink_Dispel )
call TriggerRegisterTimerEventPeriodic( gg_trg_Energy_Sink_Dispel, 1.00 )
call TriggerAddCondition( gg_trg_Energy_Sink_Dispel, Condition( function Trig_Energy_Sink_Dispel_Conditions ) )
call TriggerAddAction( gg_trg_Energy_Sink_Dispel, function Trig_Energy_Sink_Dispel_Actions )
endfunction
function Trig_Energy_Sink_Effect_Add_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'Arej' ) ) then
return false
endif
return true
endfunction
function Trig_Energy_Sink_Effect_Add_Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetSpellTargetUnit()), GetOwningPlayer(GetSpellAbilityUnit())) == true ) ) then
return false
endif
return true
endfunction
function Trig_Energy_Sink_Effect_Add_Actions takes nothing returns nothing
local unit uni_esinktgt = GetSpellTargetUnit()
local unit uni_amaster = GetSpellAbilityUnit()
local integer int_esinklvl = GetUnitAbilityLevelSwapped('Arej', uni_amaster)
local player pla_amaster = GetOwningPlayer( uni_amaster )
local player pla_esinktgt = GetOwningPlayer ( uni_esinktgt )
if IsPlayerEnemy( pla_esinktgt, pla_amaster ) == false then
call UnitAddAbilityBJ( 'AHab', uni_esinktgt )
call SetUnitAbilityLevelSwapped( 'AHab', uni_esinktgt, int_esinklvl )
else
call UnitAddAbilityBJ( 'A00C', uni_esinktgt )
call SetUnitAbilityLevelSwapped( 'A00C', uni_esinktgt, int_esinklvl )
endif
set udg_Uni_EnergySinkTarget = uni_esinktgt
call EnableTrigger( gg_trg_Energy_Sink_Dispel )
call StartTimerBJ( udg_Tim_EnergySinkTimer, false, 10.00 )
set uni_esinktgt = null
set uni_amaster = null
endfunction
//===========================================================================
function InitTrig_Energy_Sink_Effect_Add takes nothing returns nothing
set gg_trg_Energy_Sink_Effect_Add = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Energy_Sink_Effect_Add, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Energy_Sink_Effect_Add, Condition( function Trig_Energy_Sink_Effect_Add_Conditions ) )
call TriggerAddAction( gg_trg_Energy_Sink_Effect_Add, function Trig_Energy_Sink_Effect_Add_Actions )
endfunction
function Trig_Heavy_Metal_Remove_Tanks_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A001' ) ) then
return false
endif
return true
endfunction
function Trig_Heavy_Metal_Remove_Tanks_Func002A takes nothing returns nothing
local unit uni_tank = GetEnumUnit()
local location loc_tank = GetUnitLoc( uni_tank )
call RemoveUnit( uni_tank )
call DestroyEffectBJ(AddSpecialEffectLocBJ( loc_tank, "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl" ))
call RemoveLocation( loc_tank )
set uni_tank = null
endfunction
function Trig_Heavy_Metal_Remove_Tanks_Actions takes nothing returns nothing
local unit uni_athane = GetSpellAbilityUnit()
local player pla_athane = GetOwningPlayer( uni_athane )
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(pla_athane, 'h001'), function Trig_Heavy_Metal_Remove_Tanks_Func002A )
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(pla_athane, 'h00B'), function Trig_Heavy_Metal_Remove_Tanks_Func002A )
set uni_athane = null
endfunction
//===========================================================================
function InitTrig_Heavy_Metal_Remove_Tanks takes nothing returns nothing
set gg_trg_Heavy_Metal_Remove_Tanks = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Heavy_Metal_Remove_Tanks, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Heavy_Metal_Remove_Tanks, Condition( function Trig_Heavy_Metal_Remove_Tanks_Conditions ) )
call TriggerAddAction( gg_trg_Heavy_Metal_Remove_Tanks, function Trig_Heavy_Metal_Remove_Tanks_Actions )
endfunction
function Trig_Incendiary_Bullet_Damage_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'u00R' ) ) then
return false
endif
return true
endfunction
function Trig_Incendiary_Bullet_Damage_Actions takes nothing returns nothing
local unit uni_idummy = GetDyingUnit()
local location loc_idummy = GetUnitLoc( uni_idummy )
local real rea_ibdmg = 20.00 * I2R( udg_Int_IBulletLevel )
call DestroyEffectBJ( AddSpecialEffectLocBJ( loc_idummy, "Abilities\\Weapons\\FragDriller\\FragDriller.mdl" ) )
call DamageUnitCustom( udg_Uni_ArsenalThane, rea_ibdmg, loc_idummy, 150.00 )
call RemoveLocation( loc_idummy )
set uni_idummy = null
endfunction
//===========================================================================
function InitTrig_Incendiary_Bullet_Damage takes nothing returns nothing
set gg_trg_Incendiary_Bullet_Damage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Incendiary_Bullet_Damage, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Incendiary_Bullet_Damage, Condition( function Trig_Incendiary_Bullet_Damage_Conditions ) )
call TriggerAddAction( gg_trg_Incendiary_Bullet_Damage, function Trig_Incendiary_Bullet_Damage_Actions )
endfunction
function Trig_Absorb_Flesh_Level_Set_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'Adev' ) ) then
return false
endif
return true
endfunction
function Trig_Absorb_Flesh_Level_Set_Actions takes nothing returns nothing
local unit uni_barond = GetLearningUnit()
local integer int_babfle = GetUnitAbilityLevelSwapped('Adev', uni_barond)
call SetUnitAbilityLevelSwapped( 'Advc', uni_barond, int_babfle )
set udg_Uni_Baron = uni_barond
if ( int_babfle == 4 ) then
call DestroyTrigger( GetTriggeringTrigger() )
else
endif
set uni_barond = null
endfunction
//===========================================================================
function InitTrig_Absorb_Flesh_Level_Set takes nothing returns nothing
set gg_trg_Absorb_Flesh_Level_Set = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Absorb_Flesh_Level_Set, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Absorb_Flesh_Level_Set, Condition( function Trig_Absorb_Flesh_Level_Set_Conditions ) )
call TriggerAddAction( gg_trg_Absorb_Flesh_Level_Set, function Trig_Absorb_Flesh_Level_Set_Actions )
endfunction
function Trig_Absorb_Flesh_Unit_Dies_Conditions takes nothing returns boolean
if ( not ( GetDyingUnit() == udg_Uni_AbsorbFleshTarget ) ) then
return false
endif
return true
endfunction
function Trig_Absorb_Flesh_Unit_Dies_Actions takes nothing returns nothing
local unit uni_baron = udg_Uni_Baron
local location loc_baron = GetUnitLoc( uni_baron )
local player pla_baron = GetOwningPlayer( uni_baron )
local integer int_conlvl = GetUnitAbilityLevelSwapped( 'Adev', uni_baron )
local real rea_damage = ( 75.00 * I2R( int_conlvl ) ) * I2R( udg_Int_MeltdownMultiplier )
set udg_Uni_AbsorbFleshTarget = null
call DamageUnitCustom( uni_baron, rea_damage, loc_baron, 250.00 )
call DestroyEffectBJ( AddSpecialEffectLocBJ( loc_baron, "Units\\Undead\\Abomination\\AbominationExplosion.mdl" ) )
call DestroyEffectBJ( AddSpecialEffectLocBJ( loc_baron, "war3mapImported\\NecroticBlast.mdx" ) )
call RemoveLocation( loc_baron )
set uni_baron = null
endfunction
//===========================================================================
function InitTrig_Absorb_Flesh_Unit_Dies takes nothing returns nothing
set gg_trg_Absorb_Flesh_Unit_Dies = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Absorb_Flesh_Unit_Dies, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Absorb_Flesh_Unit_Dies, Condition( function Trig_Absorb_Flesh_Unit_Dies_Conditions ) )
call TriggerAddAction( gg_trg_Absorb_Flesh_Unit_Dies, function Trig_Absorb_Flesh_Unit_Dies_Actions )
endfunction
function Trig_Corpsefire_Summon_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00I' ) ) then
return false
endif
return true
endfunction
function Trig_Corpsefire_Summon_Actions takes nothing returns nothing
local unit uni_baron = GetSpellAbilityUnit()
local unit uni_zombie = null
local location loc_baron = GetUnitLoc( uni_baron )
local integer int_cfire = GetUnitAbilityLevelSwapped( 'A00I', uni_baron )
local player pla_baron = GetOwningPlayer( uni_baron )
local real rea_bface = GetUnitFacing( uni_baron )
local integer int_loop = 0
local group grp_zombies = null
set grp_zombies = GetUnitsOfPlayerAndTypeId( pla_baron, 'n00H')
loop
set uni_zombie = FirstOfGroup( grp_zombies )
exitwhen uni_zombie == null
call KillUnit( uni_zombie )
call GroupRemoveUnit( grp_zombies, uni_zombie )
endloop
call DestroyGroup( grp_zombies )
loop
exitwhen int_loop == int_cfire
call CreateNUnitsAtLoc( 1, 'n00H', pla_baron, loc_baron, rea_bface )
set uni_zombie = GetLastCreatedUnit()
call SetUnitAnimation( uni_zombie, "birth" )
set int_loop = int_loop + 1
endloop
set uni_zombie = null
set uni_baron = null
call RemoveLocation( loc_baron )
endfunction
//===========================================================================
function InitTrig_Corpsefire_Summon takes nothing returns nothing
set gg_trg_Corpsefire_Summon = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Corpsefire_Summon, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Corpsefire_Summon, Condition( function Trig_Corpsefire_Summon_Conditions ) )
call TriggerAddAction( gg_trg_Corpsefire_Summon, function Trig_Corpsefire_Summon_Actions )
endfunction
function Trig_Corpsefire_Damage_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'ACro' ) ) then
return false
endif
return true
endfunction
function Trig_Corpsefire_Damage_Actions takes nothing returns nothing
local unit uni_zombie = GetSpellAbilityUnit()
local real rea_damage = 75.00 * I2R( udg_Int_MeltdownMultiplier )
local location loc_zombie = GetUnitLoc( uni_zombie )
local boolean boo_mdown = UnitHasBuffBJ(uni_zombie, 'B016')
call DamageUnitCustom( uni_zombie, rea_damage, loc_zombie, 250.00 )
if udg_Int_MeltdownMultiplier == 1 or boo_mdown == false then
call DestroyEffectBJ( AddSpecialEffectLocBJ( loc_zombie, "Objects\\Spawnmodels\\Undead\\UDeathSmall\\UDeathSmall.mdl" ) )
else
call DestroyEffectBJ( AddSpecialEffectLocBJ( loc_zombie, "Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl" ) )
endif
call DestroyEffectBJ( AddSpecialEffectLocBJ( loc_zombie, "Objects\\Spawnmodels\\Demon\\DemonLargeDeathExplode\\DemonLargeDeathExplode.mdl" ) )
call KillUnit( uni_zombie )
call RemoveUnit( uni_zombie )
set uni_zombie = null
call RemoveLocation( loc_zombie )
endfunction
//===========================================================================
function InitTrig_Corpsefire_Damage takes nothing returns nothing
set gg_trg_Corpsefire_Damage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Corpsefire_Damage, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Corpsefire_Damage, Condition( function Trig_Corpsefire_Damage_Conditions ) )
call TriggerAddAction( gg_trg_Corpsefire_Damage, function Trig_Corpsefire_Damage_Actions )
endfunction
function Trig_Meltdown_End_Actions takes nothing returns nothing
set udg_Int_MeltdownMultiplier = 1
call UnitRemoveAbilityBJ( 'AHad', udg_Uni_Baron )
call UnitRemoveAbilityBJ( 'S001', udg_Uni_Baron )
endfunction
//===========================================================================
function InitTrig_Meltdown_End takes nothing returns nothing
set gg_trg_Meltdown_End = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Meltdown_End, udg_Tim_Meltdown )
call TriggerAddAction( gg_trg_Meltdown_End, function Trig_Meltdown_End_Actions )
endfunction
function Trig_Meltdown_Start_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03K' ) ) then
return false
endif
return true
endfunction
function Trig_Meltdown_Start_Actions takes nothing returns nothing
local unit uni_baron = GetSpellAbilityUnit()
local integer int_mdownlvl = GetUnitAbilityLevelSwapped('A03K', uni_baron)
call UnitAddAbilityBJ( 'AHad', uni_baron )
call SetUnitAbilityLevelSwapped( 'AHad', uni_baron, int_mdownlvl )
call UnitAddAbilityBJ( 'S001', uni_baron )
set udg_Uni_Baron = uni_baron
set udg_Int_MeltdownMultiplier = 1 + int_mdownlvl
call StartTimerBJ( udg_Tim_Meltdown, false, 20.00 )
set uni_baron = null
endfunction
//===========================================================================
function InitTrig_Meltdown_Start takes nothing returns nothing
set gg_trg_Meltdown_Start = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Meltdown_Start, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Meltdown_Start, Condition( function Trig_Meltdown_Start_Conditions ) )
call TriggerAddAction( gg_trg_Meltdown_Start, function Trig_Meltdown_Start_Actions )
endfunction
function Trig_Devour_Marrow_vs_Skeletal_Mages_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AUdp' ) ) then
return false
endif
return true
endfunction
function Trig_Devour_Marrow_vs_Skeletal_Mages_Actions takes nothing returns nothing
local unit uni_mknight = GetSpellAbilityUnit()
local unit uni_mkmage = GetSpellTargetUnit()
local real rea_mkmana = GetUnitStateSwap(UNIT_STATE_MANA, uni_mknight)
local real rea_mkmage = GetUnitStateSwap(UNIT_STATE_MANA, uni_mkmage)
local real rea_dmmcalc = rea_mkmana + rea_mkmage
call SetUnitManaBJ( uni_mknight, rea_dmmcalc )
set uni_mknight = null
set uni_mkmage = null
endfunction
//===========================================================================
function InitTrig_Devour_Marrow_vs_Skeletal_Mages takes nothing returns nothing
set gg_trg_Devour_Marrow_vs_Skeletal_Mages = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Devour_Marrow_vs_Skeletal_Mages, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Devour_Marrow_vs_Skeletal_Mages, Condition( function Trig_Devour_Marrow_vs_Skeletal_Mages_Conditions ) )
call TriggerAddAction( gg_trg_Devour_Marrow_vs_Skeletal_Mages, function Trig_Devour_Marrow_vs_Skeletal_Mages_Actions )
endfunction
function Trig_Unbreakable_Spell_Damage_Add_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'ANbr' ) ) then
return false
endif
return true
endfunction
function Trig_Unbreakable_Spell_Damage_Add_Actions takes nothing returns nothing
local unit uni_mknight = GetSpellAbilityUnit()
local integer int_ublevel = GetUnitAbilityLevelSwapped( 'ANbr', uni_mknight )
call SetUnitAbilityLevelSwapped( 'A00Z', uni_mknight, int_ublevel + 1 )
set udg_Uni_MarrowKnight = uni_mknight
call EnableTrigger( gg_trg_Unbreakable_Spell_Damage_End_New )
set uni_mknight = null
endfunction
//===========================================================================
function InitTrig_Unbreakable_Spell_Damage_Add takes nothing returns nothing
set gg_trg_Unbreakable_Spell_Damage_Add = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Unbreakable_Spell_Damage_Add, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Unbreakable_Spell_Damage_Add, Condition( function Trig_Unbreakable_Spell_Damage_Add_Conditions ) )
call TriggerAddAction( gg_trg_Unbreakable_Spell_Damage_Add, function Trig_Unbreakable_Spell_Damage_Add_Actions )
endfunction
function Trig_Legion_of_Bone_Wipe_Existing_Skeletons_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'ANdp' ) ) then
return false
endif
return true
endfunction
function Trig_Legion_of_Bone_Wipe_Existing_Skeletons_Func001002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Legion_of_Bone_Wipe_Existing_Skeletons_Actions takes nothing returns nothing
local unit uni_bk = GetSpellAbilityUnit()
local player pla_bk = GetOwningPlayer(uni_bk)
local group grp_bk = GetUnitsOfPlayerAndTypeId(pla_bk, 'n00F')
set bj_wantDestroyGroup = true
call ForGroupBJ( grp_bk, function Trig_Legion_of_Bone_Wipe_Existing_Skeletons_Func001002 )
set uni_bk = null
endfunction
//===========================================================================
function InitTrig_Legion_of_Bone_Wipe_Existing_Skeletons takes nothing returns nothing
set gg_trg_Legion_of_Bone_Wipe_Existing_Skeletons = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Legion_of_Bone_Wipe_Existing_Skeletons, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Legion_of_Bone_Wipe_Existing_Skeletons, Condition( function Trig_Legion_of_Bone_Wipe_Existing_Skeletons_Conditions ) )
call TriggerAddAction( gg_trg_Legion_of_Bone_Wipe_Existing_Skeletons, function Trig_Legion_of_Bone_Wipe_Existing_Skeletons_Actions )
endfunction
function Trig_Soul_Cleave_Damage_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'Afod' ) ) then
return false
endif
return true
endfunction
function Trig_Soul_Cleave_Damage_Actions takes nothing returns nothing
local unit uni_demonarch = GetSpellAbilityUnit()
local integer int_sclevel = GetUnitAbilityLevelSwapped('Afod', uni_demonarch)
local real rea_dmlifecur = GetUnitStateSwap(UNIT_STATE_LIFE, uni_demonarch)
local real rea_dmlifemax = GetUnitStateSwap(UNIT_STATE_MAX_LIFE, uni_demonarch)
local real rea_sccalc = rea_dmlifecur + ((0.05 * I2R(int_sclevel)) * rea_dmlifemax)
call SetUnitLifeBJ( uni_demonarch, rea_sccalc )
set uni_demonarch = null
endfunction
//===========================================================================
function InitTrig_Soul_Cleave_Healing takes nothing returns nothing
set gg_trg_Soul_Cleave_Healing = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Soul_Cleave_Healing, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Soul_Cleave_Healing, Condition( function Trig_Soul_Cleave_Damage_Conditions ) )
call TriggerAddAction( gg_trg_Soul_Cleave_Healing, function Trig_Soul_Cleave_Damage_Actions )
endfunction
function Trig_Phantom_Pain_Aura_Set_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'n00M' ) ) then
return false
endif
return true
endfunction
function Trig_Phantom_Pain_Aura_Set_Actions takes nothing returns nothing
local unit uni_pelemental = GetSummonedUnit()
local unit uni_demonarch = GetSummoningUnit()
local integer int_pelemental = GetUnitAbilityLevelSwapped( 'A00Q', uni_demonarch )
local location loc_pelemental = GetUnitLoc( uni_pelemental )
local effect sfx_summon = null
call SetUnitAbilityLevelSwapped( 'A00B', uni_pelemental, int_pelemental )
call AddSpecialEffectLocBJ( loc_pelemental, "Abilities\\Spells\\Demon\\DarkConversion\\ZombifyTarget.mdl" )
set sfx_summon = GetLastCreatedEffectBJ()
call BlzPlaySpecialEffect( sfx_summon, ANIM_TYPE_BIRTH )
call PolledWait( 1.00 )
call DestroyEffectBJ( sfx_summon )
call RemoveLocation( loc_pelemental )
set uni_pelemental = null
set uni_demonarch = null
endfunction
//===========================================================================
function InitTrig_Phantom_Pain_Aura_Set takes nothing returns nothing
set gg_trg_Phantom_Pain_Aura_Set = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Phantom_Pain_Aura_Set, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Phantom_Pain_Aura_Set, Condition( function Trig_Phantom_Pain_Aura_Set_Conditions ) )
call TriggerAddAction( gg_trg_Phantom_Pain_Aura_Set, function Trig_Phantom_Pain_Aura_Set_Actions )
endfunction
function Trig_Reaper_of_Souls_Kill_Func003C takes nothing returns boolean
if ( not ( DistanceBetweenPoints(GetUnitLoc(GetDyingUnit()), GetUnitLoc(udg_Uni_Demonarch)) <= 700.00 ) ) then
return false
endif
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_MECHANICAL) == false ) ) then
return false
endif
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetDyingUnit()), GetOwningPlayer(udg_Uni_Demonarch)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Reaper_of_Souls_Kill_Conditions takes nothing returns boolean
if ( not Trig_Reaper_of_Souls_Kill_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Reaper_of_Souls_Kill_Actions takes nothing returns nothing
local unit uni_dummy = GetDyingUnit()
local location loc_dummy = GetUnitLoc( uni_dummy )
set udg_Int_RoSKills = ( udg_Int_RoSKills + 1 )
call DestroyEffectBJ(AddSpecialEffectLocBJ( loc_dummy, "Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl" ))
set uni_dummy = null
call RemoveLocation( loc_dummy )
endfunction
//===========================================================================
function InitTrig_Reaper_of_Souls_Kill takes nothing returns nothing
set gg_trg_Reaper_of_Souls_Kill = CreateTrigger( )
call DisableTrigger( gg_trg_Reaper_of_Souls_Kill )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Reaper_of_Souls_Kill, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Reaper_of_Souls_Kill, Condition( function Trig_Reaper_of_Souls_Kill_Conditions ) )
call TriggerAddAction( gg_trg_Reaper_of_Souls_Kill, function Trig_Reaper_of_Souls_Kill_Actions )
endfunction
function Trig_Rip_And_Tear_Bonus_Damage_Func002C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'Bcor') == true ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetAttacker()) == 'n005' ) ) then
return false
endif
return true
endfunction
function Trig_Rip_And_Tear_Bonus_Damage_Conditions takes nothing returns boolean
if ( not Trig_Rip_And_Tear_Bonus_Damage_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Rip_And_Tear_Bonus_Damage_Actions takes nothing returns nothing
local unit uni_bbrother = GetAttacker()
local unit uni_victim = GetAttackedUnitBJ()
local real rea_damage = 10.00 * I2R( udg_Int_RTLevel )
call UnitDamageTargetBJ( uni_bbrother, uni_victim, rea_damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_ENHANCED )
set uni_bbrother = null
set uni_victim = null
endfunction
//===========================================================================
function InitTrig_Rip_And_Tear_Bonus_Damage takes nothing returns nothing
set gg_trg_Rip_And_Tear_Bonus_Damage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Rip_And_Tear_Bonus_Damage, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Rip_And_Tear_Bonus_Damage, Condition( function Trig_Rip_And_Tear_Bonus_Damage_Conditions ) )
call TriggerAddAction( gg_trg_Rip_And_Tear_Bonus_Damage, function Trig_Rip_And_Tear_Bonus_Damage_Actions )
endfunction
function Trig_Under_Pressure_Heart_Aura_Set_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'nsel' ) ) then
return false
endif
return true
endfunction
function Trig_Under_Pressure_Heart_Aura_Set_Actions takes nothing returns nothing
local unit uni_captain = GetSummoningUnit()
local unit uni_heart = GetSummonedUnit()
local integer int_upressure = GetUnitAbilityLevelSwapped( 'ANef', uni_captain )
call SetUnitAbilityLevelSwapped( 'A012', uni_heart, int_upressure )
set uni_captain = null
set uni_heart = null
endfunction
//===========================================================================
function InitTrig_Under_Pressure_Heart_Aura_Set takes nothing returns nothing
set gg_trg_Under_Pressure_Heart_Aura_Set = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Under_Pressure_Heart_Aura_Set, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Under_Pressure_Heart_Aura_Set, Condition( function Trig_Under_Pressure_Heart_Aura_Set_Conditions ) )
call TriggerAddAction( gg_trg_Under_Pressure_Heart_Aura_Set, function Trig_Under_Pressure_Heart_Aura_Set_Actions )
endfunction
function Trig_Bulwark_Health_Bonus_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'ANms' ) ) then
return false
endif
return true
endfunction
function Trig_Bulwark_Health_Bonus_Actions takes nothing returns nothing
local unit uni_captain = GetSpellAbilityUnit()
local integer int_oblevel = GetUnitAbilityLevelSwapped('ANms', uni_captain)
local real rea_dclifecur = GetUnitStateSwap(UNIT_STATE_LIFE, uni_captain)
local real rea_dclifemax = GetUnitStateSwap(UNIT_STATE_MAX_LIFE, uni_captain)
local real rea_dccalc = rea_dclifecur + ((0.2 * (I2R(int_oblevel))) * rea_dclifemax)
call SetUnitLifeBJ( uni_captain, rea_dccalc )
set uni_captain = null
endfunction
//===========================================================================
function InitTrig_Bulwark_Health_Bonus takes nothing returns nothing
set gg_trg_Bulwark_Health_Bonus = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Bulwark_Health_Bonus, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Bulwark_Health_Bonus, Condition( function Trig_Bulwark_Health_Bonus_Conditions ) )
call TriggerAddAction( gg_trg_Bulwark_Health_Bonus, function Trig_Bulwark_Health_Bonus_Actions )
endfunction
function Trig_Mana_Shot_Trigger_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00H' ) ) then
return false
endif
return true
endfunction
function Trig_Mana_Shot_Trigger_Actions takes nothing returns nothing
local unit uni_shaman = GetSpellAbilityUnit()
call PolledWait ( 15.00 )
call SetUnitManaBJ( uni_shaman, 0 )
set uni_shaman = null
endfunction
//===========================================================================
function InitTrig_Mana_Shot_Trigger takes nothing returns nothing
set gg_trg_Mana_Shot_Trigger = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mana_Shot_Trigger, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Mana_Shot_Trigger, Condition( function Trig_Mana_Shot_Trigger_Conditions ) )
call TriggerAddAction( gg_trg_Mana_Shot_Trigger, function Trig_Mana_Shot_Trigger_Actions )
endfunction
function Trig_Earth_Rumble_Start_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AEsb' ) ) then
return false
endif
return true
endfunction
function Trig_Earth_Rumble_Start_Func003C takes nothing returns boolean
if ( not ( udg_Boo_EarthRumbleCheck == true ) ) then
return false
endif
return true
endfunction
function Trig_Earth_Rumble_Start_Actions takes nothing returns nothing
local unit uni_dshaman = GetSpellAbilityUnit()
set udg_Boo_EarthRumbleCheck = true
call PolledWait( 1.25 )
if ( Trig_Earth_Rumble_Start_Func003C() ) then
call ShowUnitHide( uni_dshaman )
call PolledWait ( 8.60 )
call ShowUnitShow( uni_dshaman )
else
endif
set uni_dshaman = null
endfunction
//===========================================================================
function InitTrig_Earth_Rumble_Start takes nothing returns nothing
set gg_trg_Earth_Rumble_Start = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Earth_Rumble_Start, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Earth_Rumble_Start, Condition( function Trig_Earth_Rumble_Start_Conditions ) )
call TriggerAddAction( gg_trg_Earth_Rumble_Start, function Trig_Earth_Rumble_Start_Actions )
endfunction
function Trig_Miracle_Growth_Special_Effect_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'Aave' ) ) then
return false
endif
return true
endfunction
function Trig_Miracle_Growth_Special_Effect_Actions takes nothing returns nothing
local unit uni_treant = GetSpellAbilityUnit()
local location loc_treant = GetUnitLoc( uni_treant )
call DestroyEffectBJ(AddSpecialEffectLocBJ( loc_treant, "Objects\\Spawnmodels\\NightElf\\EntBirthTarget\\EntBirthTarget.mdl" ))
call RemoveLocation( loc_treant )
set uni_treant = null
endfunction
//===========================================================================
function InitTrig_Miracle_Growth_Special_Effect takes nothing returns nothing
set gg_trg_Miracle_Growth_Special_Effect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Miracle_Growth_Special_Effect, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Miracle_Growth_Special_Effect, Condition( function Trig_Miracle_Growth_Special_Effect_Conditions ) )
call TriggerAddAction( gg_trg_Miracle_Growth_Special_Effect, function Trig_Miracle_Growth_Special_Effect_Actions )
endfunction
function Trig_Bramble_Surge_Aura_Set_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'o00B' ) ) then
return false
endif
return true
endfunction
function Trig_Bramble_Surge_Aura_Set_Actions takes nothing returns nothing
local unit uni_gardener = GetSummoningUnit()
local unit uni_brambles = GetSummonedUnit()
local integer int_brambles = GetUnitAbilityLevelSwapped('AChw', uni_gardener)
call SetUnitAbilityLevelSwapped( 'AEah', uni_brambles, int_brambles )
set uni_brambles = null
set uni_gardener = null
endfunction
//===========================================================================
function InitTrig_Bramble_Surge_Aura_Set takes nothing returns nothing
set gg_trg_Bramble_Surge_Aura_Set = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Bramble_Surge_Aura_Set, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Bramble_Surge_Aura_Set, Condition( function Trig_Bramble_Surge_Aura_Set_Conditions ) )
call TriggerAddAction( gg_trg_Bramble_Surge_Aura_Set, function Trig_Bramble_Surge_Aura_Set_Actions )
endfunction
function Trig_Emerald_Herb_Spawn_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'u00A' ) ) then
return false
endif
return true
endfunction
function Trig_Emerald_Herb_Spawn_Actions takes nothing returns nothing
local unit uni_herbdummy = GetDyingUnit()
local location loc_herbdummy = GetUnitLoc( uni_herbdummy )
call CreateItemLoc( 'rhe3', loc_herbdummy )
call RemoveLocation( loc_herbdummy )
set uni_herbdummy = null
endfunction
//===========================================================================
function InitTrig_Emerald_Herb_Spawn takes nothing returns nothing
set gg_trg_Emerald_Herb_Spawn = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Emerald_Herb_Spawn, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Emerald_Herb_Spawn, Condition( function Trig_Emerald_Herb_Spawn_Conditions ) )
call TriggerAddAction( gg_trg_Emerald_Herb_Spawn, function Trig_Emerald_Herb_Spawn_Actions )
endfunction
function Trig_Hex_Damage_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetSpellAbilityUnit(), 'Bcri') == true ) ) then
return false
endif
return true
endfunction
function Trig_Hex_Damage_Actions takes nothing returns nothing
local unit uni_hexcaster = GetSpellAbilityUnit()
call DestroyEffectBJ( AddSpecialEffectTargetUnitBJ( "head", uni_hexcaster, "Abilities\\Spells\\Human\\SpellSteal\\SpellStealTarget.mdl" ) )
call UnitDamageTargetBJ( udg_Uni_HexLord, uni_hexcaster, ( I2R(udg_Int_HexLevel) * 90.00 ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MIND )
set uni_hexcaster = null
endfunction
//===========================================================================
function InitTrig_Hex_Damage takes nothing returns nothing
set gg_trg_Hex_Damage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hex_Damage, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Hex_Damage, Condition( function Trig_Hex_Damage_Conditions ) )
call TriggerAddAction( gg_trg_Hex_Damage, function Trig_Hex_Damage_Actions )
endfunction
function Trig_Suppresion_Ward_Level_Set_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'o010' ) ) then
return false
endif
return true
endfunction
function Trig_Suppresion_Ward_Level_Set_Actions takes nothing returns nothing
local unit uni_hexlord = GetSummoningUnit()
local unit uni_supward = GetSummonedUnit()
local integer int_supward = GetUnitAbilityLevelSwapped( 'AIhw', uni_hexlord )
call SetUnitAbilityLevelSwapped( 'AEar', uni_supward, int_supward )
set uni_hexlord = null
set uni_supward = null
endfunction
//===========================================================================
function InitTrig_Suppression_Ward_Level_Set takes nothing returns nothing
set gg_trg_Suppression_Ward_Level_Set = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Suppression_Ward_Level_Set, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Suppression_Ward_Level_Set, Condition( function Trig_Suppresion_Ward_Level_Set_Conditions ) )
call TriggerAddAction( gg_trg_Suppression_Ward_Level_Set, function Trig_Suppresion_Ward_Level_Set_Actions )
endfunction
function Trig_Curse_Trigger_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'ACfd' ) ) then
return false
endif
return true
endfunction
function Trig_Curse_Trigger_Actions takes nothing returns nothing
local unit uni_hexlord = GetSpellAbilityUnit()
local unit uni_cursetgt = GetSpellTargetUnit()
local unit uni_cursedmy = null
local integer int_curselvl = GetUnitAbilityLevelSwapped( 'ACfd', uni_hexlord )
local player pla_cursetgt = GetOwningPlayer( uni_cursetgt )
local location loc_cursetgt = GetUnitLoc( uni_cursetgt )
call CreateNUnitsAtLoc( 1, 'u00L', pla_cursetgt, loc_cursetgt, bj_UNIT_FACING )
set uni_cursedmy = GetLastCreatedUnit()
call RemoveLocation( loc_cursetgt )
call SetUnitAbilityLevelSwapped( 'Aspl', uni_cursedmy, int_curselvl )
call IssueTargetOrderBJ( uni_cursedmy, "spiritlink", uni_cursetgt )
call PolledWait( 1.00 )
call RemoveUnit( uni_cursedmy )
set uni_hexlord = null
set uni_cursetgt = null
set uni_cursedmy = null
endfunction
//===========================================================================
function InitTrig_Curse_Trigger takes nothing returns nothing
set gg_trg_Curse_Trigger = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Curse_Trigger, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Curse_Trigger, Condition( function Trig_Curse_Trigger_Conditions ) )
call TriggerAddAction( gg_trg_Curse_Trigger, function Trig_Curse_Trigger_Actions )
endfunction
function Trig_Millenia_Volley_Animation_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'ANcs' ) ) then
return false
endif
return true
endfunction
function Trig_Millenia_Volley_Animation_Actions takes nothing returns nothing
local unit uni_hunter = GetSpellAbilityUnit()
call PolledWait( 0.01 )
call SetUnitAnimationByIndex( uni_hunter, 11 )
call PolledWait( 3.50 )
call ResetUnitAnimation( uni_hunter )
set uni_hunter = null
endfunction
//===========================================================================
function InitTrig_Millenia_Volley_Animation takes nothing returns nothing
set gg_trg_Millenia_Volley_Animation = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Millenia_Volley_Animation, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Millenia_Volley_Animation, Condition( function Trig_Millenia_Volley_Animation_Conditions ) )
call TriggerAddAction( gg_trg_Millenia_Volley_Animation, function Trig_Millenia_Volley_Animation_Actions )
endfunction
function Trig_Arrow_of_Time_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AHtb' ) ) then
return false
endif
return true
endfunction
function Trig_Arrow_of_Time_Actions takes nothing returns nothing
local unit uni_aothun = GetSpellAbilityUnit()
local unit uni_aottar = GetSpellTargetUnit()
local location loc_aothun = GetUnitLoc( uni_aothun )
local location loc_aottar = GetUnitLoc( uni_aottar )
call PolledWait( 0.45 )
call SetUnitPositionLoc( uni_aothun, loc_aottar )
call DestroyEffectBJ( AddSpecialEffectTargetUnitBJ( "origin", uni_aothun, "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl" ) )
call PolledWait( 0.01 )
call SetUnitPositionLoc( uni_aottar, loc_aothun )
call DestroyEffectBJ( AddSpecialEffectTargetUnitBJ( "origin", uni_aottar, "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl" ) )
call RemoveLocation( loc_aottar )
call RemoveLocation( loc_aothun )
set uni_aothun = null
set uni_aottar = null
endfunction
//===========================================================================
function InitTrig_Arrow_of_Time_Location_Swap takes nothing returns nothing
set gg_trg_Arrow_of_Time_Location_Swap = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Arrow_of_Time_Location_Swap, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Arrow_of_Time_Location_Swap, Condition( function Trig_Arrow_of_Time_Conditions ) )
call TriggerAddAction( gg_trg_Arrow_of_Time_Location_Swap, function Trig_Arrow_of_Time_Actions )
endfunction
function Trig_Quantum_Rune_Trigger_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n002' ) ) then
return false
endif
return true
endfunction
function Trig_Quantum_Rune_Trigger_Actions takes nothing returns nothing
local unit uni_qrune = GetDyingUnit()
local unit uni_qrunedummy = null
local player pla_qrune = GetOwningPlayer ( uni_qrune )
local location loc_qrune = GetUnitLoc( uni_qrune )
local integer int_qrunelvl = GetUnitUserData( uni_qrune )
call DestroyEffectBJ(AddSpecialEffectLocBJ( loc_qrune, "Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl" ))
if int_qrunelvl == 1 then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n013', pla_qrune, loc_qrune, loc_qrune )
set uni_qrunedummy = GetLastCreatedUnit()
else
endif
if int_qrunelvl == 2 then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n014', pla_qrune, loc_qrune, loc_qrune )
set uni_qrunedummy = GetLastCreatedUnit()
else
endif
if int_qrunelvl == 3 then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n016', pla_qrune, loc_qrune, loc_qrune )
set uni_qrunedummy = GetLastCreatedUnit()
else
endif
if int_qrunelvl == 4 then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n012', pla_qrune, loc_qrune, loc_qrune )
set uni_qrunedummy = GetLastCreatedUnit()
else
endif
call SetUnitAbilityLevelSwapped( 'A02W', uni_qrunedummy, int_qrunelvl )
call PolledWait( 0.01 )
call IssuePointOrderLocBJ( uni_qrunedummy, "cloudoffog", loc_qrune )
call RemoveLocation( loc_qrune )
call PolledWait( 20.00 )
call RemoveUnit( uni_qrunedummy )
set uni_qrune = null
set uni_qrunedummy = null
endfunction
//===========================================================================
function InitTrig_Quantum_Rune_Trigger takes nothing returns nothing
set gg_trg_Quantum_Rune_Trigger = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Quantum_Rune_Trigger, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Quantum_Rune_Trigger, Condition( function Trig_Quantum_Rune_Trigger_Conditions ) )
call TriggerAddAction( gg_trg_Quantum_Rune_Trigger, function Trig_Quantum_Rune_Trigger_Actions )
endfunction
function Trig_Roar_of_the_Pride_Colour_Change_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetSummonedUnit()) == 'n001' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetSummonedUnit()) == 'n00B' ) ) then
return true
endif
return false
endfunction
function Trig_Roar_of_the_Pride_Colour_Change_Conditions takes nothing returns boolean
if ( not Trig_Roar_of_the_Pride_Colour_Change_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Roar_of_the_Pride_Colour_Change_Actions takes nothing returns nothing
local unit uni_pguard = GetSummonedUnit()
local location loc_pguard = GetUnitLoc( uni_pguard )
call SetUnitColor( uni_pguard, GetPlayerColor(Player(5)) )
call DestroyEffectBJ(AddSpecialEffectLocBJ( loc_pguard, "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl" ))
call RemoveLocation( loc_pguard )
set uni_pguard = null
endfunction
//===========================================================================
function InitTrig_Roar_of_the_Pride_Colour_Change takes nothing returns nothing
set gg_trg_Roar_of_the_Pride_Colour_Change = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Roar_of_the_Pride_Colour_Change, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Roar_of_the_Pride_Colour_Change, Condition( function Trig_Roar_of_the_Pride_Colour_Change_Conditions ) )
call TriggerAddAction( gg_trg_Roar_of_the_Pride_Colour_Change, function Trig_Roar_of_the_Pride_Colour_Change_Actions )
endfunction
function Trig_Roar_of_the_Pride_Desummon_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AHpx' ) ) then
return false
endif
return true
endfunction
function Trig_Roar_of_the_Pride_Desummon_Func003002 takes nothing returns nothing
local unit uni_pguard = GetEnumUnit()
local location loc_pguard = GetUnitLoc( uni_pguard )
call RemoveUnit( uni_pguard )
call DestroyEffectBJ(AddSpecialEffectLocBJ( loc_pguard, "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl" ))
call RemoveLocation( loc_pguard )
set uni_pguard = null
endfunction
function Trig_Roar_of_the_Pride_Desummon_Actions takes nothing returns nothing
local unit uni_lheart = GetSpellAbilityUnit()
local player pla_lheart = GetOwningPlayer( uni_lheart )
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsOfPlayerAndTypeId( pla_lheart, 'n001'), function Trig_Roar_of_the_Pride_Desummon_Func003002 )
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsOfPlayerAndTypeId( pla_lheart, 'n00B'), function Trig_Roar_of_the_Pride_Desummon_Func003002 )
set uni_lheart = null
endfunction
//===========================================================================
function InitTrig_Roar_of_the_Pride_Desummon takes nothing returns nothing
set gg_trg_Roar_of_the_Pride_Desummon = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Roar_of_the_Pride_Desummon, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Roar_of_the_Pride_Desummon, Condition( function Trig_Roar_of_the_Pride_Desummon_Conditions ) )
call TriggerAddAction( gg_trg_Roar_of_the_Pride_Desummon, function Trig_Roar_of_the_Pride_Desummon_Actions )
endfunction
function Trig_Burn_To_Fight_Periodic_Check_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(udg_Uni_BTFTarget, 'B00U') == false ) ) then
return false
endif
return true
endfunction
function Trig_Burn_To_Fight_Periodic_Check_Actions takes nothing returns nothing
local location loc_btftgt = GetUnitLoc( udg_Uni_BTFTarget )
local real rea_btflifecur = GetUnitStateSwap( UNIT_STATE_LIFE, udg_Uni_BTFTarget )
local real rea_btflifemax = GetUnitStateSwap( UNIT_STATE_MAX_LIFE, udg_Uni_BTFTarget )
local real rea_btfcalc = rea_btflifecur + (( 0.09 * I2R( udg_Int_BTFLevel )) * rea_btflifemax)
call SetUnitLifeBJ( udg_Uni_BTFTarget, rea_btfcalc )
call DestroyEffectBJ(AddSpecialEffectLocBJ( loc_btftgt, "Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl" ))
set udg_Uni_BTFTarget = null
call RemoveLocation( loc_btftgt )
call DisableTrigger( gg_trg_Burn_To_Fight_Periodic_Check )
endfunction
//===========================================================================
function InitTrig_Burn_To_Fight_Periodic_Check takes nothing returns nothing
set gg_trg_Burn_To_Fight_Periodic_Check = CreateTrigger( )
call DisableTrigger( gg_trg_Burn_To_Fight_Periodic_Check )
call TriggerRegisterTimerEventPeriodic( gg_trg_Burn_To_Fight_Periodic_Check, 1.00 )
call TriggerAddCondition( gg_trg_Burn_To_Fight_Periodic_Check, Condition( function Trig_Burn_To_Fight_Periodic_Check_Conditions ) )
call TriggerAddAction( gg_trg_Burn_To_Fight_Periodic_Check, function Trig_Burn_To_Fight_Periodic_Check_Actions )
endfunction
function Trig_Burn_To_Fight_Life_Regen_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'ACuf' ) ) then
return false
endif
return true
endfunction
function Trig_Burn_To_Fight_Life_Regen_Actions takes nothing returns nothing
local unit uni_btftgt = GetSpellTargetUnit()
set udg_Uni_BTFTarget = uni_btftgt
call EnableTrigger( gg_trg_Burn_To_Fight_Periodic_Check )
set uni_btftgt = null
endfunction
//===========================================================================
function InitTrig_Burn_To_Fight_Life_Regen takes nothing returns nothing
set gg_trg_Burn_To_Fight_Life_Regen = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Burn_To_Fight_Life_Regen, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Burn_To_Fight_Life_Regen, Condition( function Trig_Burn_To_Fight_Life_Regen_Conditions ) )
call TriggerAddAction( gg_trg_Burn_To_Fight_Life_Regen, function Trig_Burn_To_Fight_Life_Regen_Actions )
endfunction
function Trig_Grand_Viper_Damage_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'ANbl' ) ) then
return false
endif
return true
endfunction
function Trig_Grand_Viper_Damage_Actions takes nothing returns nothing
local unit uni_monk = GetSpellAbilityUnit()
local location loc_gvtgt = GetSpellTargetLoc()
local integer int_gvlvl = GetUnitAbilityLevelSwapped( 'ANbl', uni_monk )
local real rea_damage = I2R( int_gvlvl ) * 35.00
call DamageUnitCustom( uni_monk, rea_damage, loc_gvtgt, 250.00 )
call RemoveLocation( loc_gvtgt )
set uni_monk = null
endfunction
//===========================================================================
function InitTrig_Grand_Viper_Damage takes nothing returns nothing
set gg_trg_Grand_Viper_Damage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Grand_Viper_Damage, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Grand_Viper_Damage, Condition( function Trig_Grand_Viper_Damage_Conditions ) )
call TriggerAddAction( gg_trg_Grand_Viper_Damage, function Trig_Grand_Viper_Damage_Actions )
endfunction
function Trig_Purple_Haze_Cloud_Trigger_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'u00K' ) ) then
return false
endif
return true
endfunction
function Trig_Purple_Haze_Cloud_Trigger_Actions takes nothing returns nothing
local unit uni_phdum = GetDyingUnit()
local unit uni_phcloud = null
local location loc_phdum = GetUnitLoc(uni_phdum)
local player pla_nsowner = GetOwningPlayer( uni_phdum )
local integer int_phlvl = GetUnitAbilityLevelSwapped('ANsy', udg_Uni_Nightshade)
call CreateNUnitsAtLocFacingLocBJ( 1, 'u00J', pla_nsowner, loc_phdum, loc_phdum )
set uni_phcloud = GetLastCreatedUnit()
call SetUnitAbilityLevelSwapped( 'Aclf', uni_phcloud, int_phlvl )
call SetUnitAbilityLevelSwapped( 'AOr2', uni_phcloud, int_phlvl )
call PolledWait( 0.01 )
call IssuePointOrderLocBJ( uni_phcloud, "cloudoffog", loc_phdum )
call RemoveLocation( loc_phdum )
call StartTimerBJ( udg_Tim_PurpleHaze, false, 16.00 )
set udg_Uni_PurpleHaze = uni_phcloud
set uni_phcloud = null
set uni_phdum = null
endfunction
//===========================================================================
function InitTrig_Purple_Haze_Cloud_Trigger takes nothing returns nothing
set gg_trg_Purple_Haze_Cloud_Trigger = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Purple_Haze_Cloud_Trigger, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Purple_Haze_Cloud_Trigger, Condition( function Trig_Purple_Haze_Cloud_Trigger_Conditions ) )
call TriggerAddAction( gg_trg_Purple_Haze_Cloud_Trigger, function Trig_Purple_Haze_Cloud_Trigger_Actions )
endfunction
function Trig_Seduce_Ownership_Change_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'ANch' ) ) then
return false
endif
return true
endfunction
function Trig_Seduce_Ownership_Change_Actions takes nothing returns nothing
local unit uni_sedtgt = GetSpellTargetUnit()
local unit uni_sednsh = GetSpellAbilityUnit()
local integer int_sedlvl = GetUnitAbilityLevelSwapped( 'ANch' ,uni_sednsh )
local player pla_nshori = GetOwningPlayer( uni_sedtgt )
call DestroyEffectBJ( AddSpecialEffectTargetUnitBJ( "origin", uni_sedtgt, "Abilities\\Spells\\Undead\\DeathPact\\DeathPactCaster.mdl" ) )
call UnitAddAbilityBJ( 'AIth', uni_sedtgt)
call UnitAddAbilityBJ( 'A01D', uni_sedtgt)
call SetUnitAbilityLevelSwapped( 'AIth', uni_sedtgt, int_sedlvl )
call PolledWait( 10.00 )
call SetUnitOwner( uni_sedtgt, pla_nshori, true )
call UnitRemoveAbilityBJ( 'AIth', uni_sedtgt)
call UnitRemoveAbilityBJ( 'A01D', uni_sedtgt)
set uni_sedtgt = null
set uni_sednsh = null
endfunction
//===========================================================================
function InitTrig_Seduce_Ownership_Change takes nothing returns nothing
set gg_trg_Seduce_Ownership_Change = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Seduce_Ownership_Change, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Seduce_Ownership_Change, Condition( function Trig_Seduce_Ownership_Change_Conditions ) )
call TriggerAddAction( gg_trg_Seduce_Ownership_Change, function Trig_Seduce_Ownership_Change_Actions )
endfunction
function Trig_Mega_Flare_Effect_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'ACcv' ) ) then
return false
endif
return true
endfunction
function Trig_Mega_Flare_Effect_Actions takes nothing returns nothing
local unit uni_pmage = GetSpellAbilityUnit()
local integer int_mflare = GetUnitAbilityLevelSwapped( 'ACcv', uni_pmage )
local location loc_mflare = GetSpellTargetLoc()
local real rea_damage = I2R( int_mflare ) * 150.00
call DestroyEffectBJ( AddSpecialEffectLocBJ( loc_mflare , "war3mapImported\\MegaFlare.mdx" ) )
call PolledWait( 3.00 )
call DamageUnitCustom( uni_pmage, rea_damage, loc_mflare, 250.00 )
call DestroyEffectBJ( AddSpecialEffectLocBJ( loc_mflare , "war3mapImported\\NewMassiveEX.mdx" ) )
set uni_pmage = null
call RemoveLocation( loc_mflare )
endfunction
//===========================================================================
function InitTrig_Mega_Flare_Effect takes nothing returns nothing
set gg_trg_Mega_Flare_Effect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mega_Flare_Effect, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Mega_Flare_Effect, Condition( function Trig_Mega_Flare_Effect_Conditions ) )
call TriggerAddAction( gg_trg_Mega_Flare_Effect, function Trig_Mega_Flare_Effect_Actions )
endfunction
function Trig_Primal_Spire_Ability_Set_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'osp1' ) ) then
return false
endif
return true
endfunction
function Trig_Primal_Spire_Ability_Set_Actions takes nothing returns nothing
local unit uni_prispi = GetSummonedUnit()
local unit uni_primag = GetSummoningUnit()
local integer int_pslevel = GetUnitAbilityLevelSwapped('Arsw', uni_primag)
call SetUnitAbilityLevelSwapped( 'Aakb', uni_prispi, int_pslevel )
call SetUnitAbilityLevelSwapped( 'ACba', uni_prispi, int_pslevel )
set uni_prispi = null
set uni_primag = null
endfunction
//===========================================================================
function InitTrig_Primal_Spire_Ability_Set takes nothing returns nothing
set gg_trg_Primal_Spire_Ability_Set = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Primal_Spire_Ability_Set, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Primal_Spire_Ability_Set, Condition( function Trig_Primal_Spire_Ability_Set_Conditions ) )
call TriggerAddAction( gg_trg_Primal_Spire_Ability_Set, function Trig_Primal_Spire_Ability_Set_Actions )
endfunction
function Trig_Ebon_Mine_Death_Effect_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetDyingUnit()) == 'oeye' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'o000' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'o004' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'o005' ) ) then
return true
endif
return false
endfunction
function Trig_Ebon_Mine_Death_Effect_Conditions takes nothing returns boolean
if ( not Trig_Ebon_Mine_Death_Effect_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Ebon_Mine_Death_Effect_Actions takes nothing returns nothing
local unit uni_ebonmine = GetDyingUnit()
local location loc_ebonmine = GetUnitLoc( uni_ebonmine )
local effect sfx_explosion = null
local real rea_damage = I2R( udg_Int_EbonMineLevel ) * 100.00
call DamageUnitCustom( udg_Uni_Shadowmaiden, rea_damage, loc_ebonmine, 200.00 )
call AddSpecialEffectLocBJ( loc_ebonmine, "war3mapImported\\ShadowCannon.mdx" )
set sfx_explosion = GetLastCreatedEffectBJ()
call BlzPlaySpecialEffect( sfx_explosion, ANIM_TYPE_DEATH )
call BlzSetSpecialEffectScale( sfx_explosion, 1.25 )
call DestroyEffectBJ( sfx_explosion )
call RemoveLocation( loc_ebonmine )
set uni_ebonmine = null
endfunction
//===========================================================================
function InitTrig_Ebon_Mine_Death_Effect takes nothing returns nothing
set gg_trg_Ebon_Mine_Death_Effect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ebon_Mine_Death_Effect, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Ebon_Mine_Death_Effect, Condition( function Trig_Ebon_Mine_Death_Effect_Conditions ) )
call TriggerAddAction( gg_trg_Ebon_Mine_Death_Effect, function Trig_Ebon_Mine_Death_Effect_Actions )
endfunction
function Trig_Ebon_Mine_Death_Effect_Copy_Copy_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetDyingUnit()) == 'oeye' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'o000' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'o004' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'o005' ) ) then
return true
endif
return false
endfunction
function Trig_Ebon_Mine_Death_Effect_Copy_Copy_Conditions takes nothing returns boolean
if ( not Trig_Ebon_Mine_Death_Effect_Copy_Copy_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Ebon_Mine_Death_Effect_Copy_Copy_Actions takes nothing returns nothing
call CreateNUnitsAtLocFacingLocBJ( 1, 'u00V', Player(PLAYER_NEUTRAL_PASSIVE), GetUnitLoc(GetDyingUnit()), GetUnitLoc(GetTriggerUnit()) )
call KillUnit( GetLastCreatedUnit() )
endfunction
//===========================================================================
function InitTrig_Ebon_Mine_Death_Effect_Copy_Copy takes nothing returns nothing
set gg_trg_Ebon_Mine_Death_Effect_Copy_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ebon_Mine_Death_Effect_Copy_Copy, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Ebon_Mine_Death_Effect_Copy_Copy, Condition( function Trig_Ebon_Mine_Death_Effect_Copy_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Ebon_Mine_Death_Effect_Copy_Copy, function Trig_Ebon_Mine_Death_Effect_Copy_Copy_Actions )
endfunction
function Trig_Singularity_Spawn_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AOsh' ) ) then
return false
endif
return true
endfunction
function Trig_Singularity_Spawn_Func003C takes nothing returns boolean
if ( not ( IsUnitAliveBJ(GetLastCreatedUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Singularity_Spawn_Actions takes nothing returns nothing
local unit uni_smaiden = GetSpellAbilityUnit()
local unit uni_sing = null
local player pla_smaiden = GetOwningPlayer( uni_smaiden )
local location loc_smaiden = GetUnitLoc( uni_smaiden )
local location loc_starget = GetSpellTargetLoc()
local real rea_smangle = GetUnitFacing( uni_smaiden )
local integer int_slevel = GetUnitAbilityLevelSwapped('AOsh', uni_smaiden)
if int_slevel == 1 then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n01H', pla_smaiden, PolarProjectionBJ(loc_smaiden, 100.00, rea_smangle), loc_starget )
else
call CreateNUnitsAtLocFacingLocBJ( 1, 'n019', pla_smaiden, PolarProjectionBJ(loc_smaiden, 100.00, rea_smangle), loc_starget )
endif
set uni_sing = GetLastCreatedUnit()
call UnitAddAbilityBJ( 'Aloc', uni_sing )
call DestroyEffectBJ( AddSpecialEffectTargetUnitBJ( "chest", uni_sing, "Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl" ) )
call IssuePointOrderLocBJ( uni_sing, "move", loc_starget )
call RemoveLocation( loc_smaiden )
call RemoveLocation( loc_starget )
call PolledWait( 20.00 )
call KillUnit( uni_sing )
set uni_smaiden = null
set uni_sing = null
endfunction
//===========================================================================
function InitTrig_Singularity_Spawn takes nothing returns nothing
set gg_trg_Singularity_Spawn = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Singularity_Spawn, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Singularity_Spawn, Condition( function Trig_Singularity_Spawn_Conditions ) )
call TriggerAddAction( gg_trg_Singularity_Spawn, function Trig_Singularity_Spawn_Actions )
endfunction
function Trig_Dark_Side_Special_Effect_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A010' ) ) then
return false
endif
return true
endfunction
function Trig_Dark_Side_Special_Effect_Actions takes nothing returns nothing
local unit uni_smaiden = GetSpellAbilityUnit()
call DestroyEffectBJ( AddSpecialEffectTargetUnitBJ( "origin", uni_smaiden, "Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl" ) )
set uni_smaiden = null
endfunction
//===========================================================================
function InitTrig_Dark_Side_Special_Effect takes nothing returns nothing
set gg_trg_Dark_Side_Special_Effect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Dark_Side_Special_Effect, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Dark_Side_Special_Effect, Condition( function Trig_Dark_Side_Special_Effect_Conditions ) )
call TriggerAddAction( gg_trg_Dark_Side_Special_Effect, function Trig_Dark_Side_Special_Effect_Actions )
endfunction
function Trig_Storm_Howl_Summon_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'osw1' ) ) then
return false
endif
return true
endfunction
function Trig_Storm_Howl_Summon_Actions takes nothing returns nothing
local unit uni_salpha = GetSummonedUnit()
local unit uni_twolf = GetSummoningUnit()
local integer int_showl = GetUnitAbilityLevelSwapped( 'ACs7', uni_twolf )
call SetUnitColor( uni_salpha, GetPlayerColor(Player(1)) )
call SetUnitAbilityLevelSwapped( 'A02Z', uni_salpha, int_showl )
call SetUnitAbilityLevelSwapped( 'Afbk', uni_salpha, int_showl )
set uni_salpha = null
set uni_twolf = null
endfunction
//===========================================================================
function InitTrig_Storm_Howl_Summon takes nothing returns nothing
set gg_trg_Storm_Howl_Summon = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Storm_Howl_Summon, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Storm_Howl_Summon, Condition( function Trig_Storm_Howl_Summon_Conditions ) )
call TriggerAddAction( gg_trg_Storm_Howl_Summon, function Trig_Storm_Howl_Summon_Actions )
endfunction
function Trig_Static_Orb_Spawn_Effect_Conditions takes nothing returns boolean
if GetUnitTypeId(GetSummonedUnit()) == 'o00A' then
return true
endif
return false
endfunction
function Trig_Static_Orb_Spawn_Effect_Actions takes nothing returns nothing
local unit uni_statorb = GetSummonedUnit()
local unit uni_twolf = GetSummoningUnit()
local integer int_statorb = GetUnitAbilityLevelSwapped( 'Asta', uni_twolf )
local location loc_statorb = GetUnitLoc( uni_statorb )
call SetUnitAbilityLevelSwapped( 'A02Z', uni_statorb, int_statorb )
call DestroyEffectBJ(AddSpecialEffectLocBJ( loc_statorb, "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl" ))
call RemoveLocation( loc_statorb )
set uni_statorb = null
set uni_twolf = null
endfunction
//===========================================================================
function InitTrig_Static_Orb_Spawn_Effect takes nothing returns nothing
set gg_trg_Static_Orb_Spawn_Effect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Static_Orb_Spawn_Effect, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Static_Orb_Spawn_Effect, Condition( function Trig_Static_Orb_Spawn_Effect_Conditions ) )
call TriggerAddAction( gg_trg_Static_Orb_Spawn_Effect, function Trig_Static_Orb_Spawn_Effect_Actions )
endfunction
function Trig_Static_Orb_Special_Effect_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'o00A' ) ) then
return false
endif
return true
endfunction
function Trig_Static_Orb_Special_Effect_Actions takes nothing returns nothing
local location loc_statorb = GetUnitLoc(GetDyingUnit())
call DestroyEffectBJ(AddSpecialEffectLocBJ( loc_statorb, "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl" ))
call RemoveLocation( loc_statorb )
endfunction
//===========================================================================
function InitTrig_Static_Orb_Special_Effect takes nothing returns nothing
set gg_trg_Static_Orb_Special_Effect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Static_Orb_Special_Effect, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Static_Orb_Special_Effect, Condition( function Trig_Static_Orb_Special_Effect_Conditions ) )
call TriggerAddAction( gg_trg_Static_Orb_Special_Effect, function Trig_Static_Orb_Special_Effect_Actions )
endfunction
function Trig_Ride_The_Lightning_Teleport_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'ANfd' ) ) then
return false
endif
return true
endfunction
function Trig_Ride_The_Lightning_Teleport_Actions takes nothing returns nothing
local unit uni_rtltar = GetSpellTargetUnit()
local unit uni_stormr = GetSpellAbilityUnit()
local location loc_stormr = GetUnitLoc( uni_stormr )
call PolledWait( 1.25 )
call SetUnitPositionLoc( uni_rtltar, loc_stormr )
call PolledWait( 0.01 )
set loc_stormr = GetUnitLoc( uni_stormr )
call DestroyEffectBJ(AddSpecialEffectLocBJ( loc_stormr, "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl" ))
call RemoveLocation( loc_stormr )
set uni_rtltar = null
set uni_stormr = null
endfunction
//===========================================================================
function InitTrig_Ride_The_Lightning_Teleport takes nothing returns nothing
set gg_trg_Ride_The_Lightning_Teleport = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ride_The_Lightning_Teleport, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Ride_The_Lightning_Teleport, Condition( function Trig_Ride_The_Lightning_Teleport_Conditions ) )
call TriggerAddAction( gg_trg_Ride_The_Lightning_Teleport, function Trig_Ride_The_Lightning_Teleport_Actions )
endfunction
function Trig_Pillar_of_the_Sun_Animation_Correction_Func005001 takes nothing returns boolean
return ( GetUnitTypeId(GetSummonedUnit()) == 'n000' )
endfunction
function Trig_Pillar_of_the_Sun_Animation_Correction_Func005002 takes nothing returns boolean
return ( GetUnitTypeId(GetSummonedUnit()) == 'n006' )
endfunction
function Trig_Pillar_of_the_Sun_Animation_Correction_Conditions takes nothing returns boolean
if ( not GetBooleanOr( Trig_Pillar_of_the_Sun_Animation_Correction_Func005001(), Trig_Pillar_of_the_Sun_Animation_Correction_Func005002() ) ) then
return false
endif
return true
endfunction
function Trig_Pillar_of_the_Sun_Animation_Correction_Actions takes nothing returns nothing
local unit s = GetSummonedUnit()
call PolledWait( 1.00 )
call SetUnitTimeScalePercent( s, 1.00 )
set s = null
endfunction
//===========================================================================
function InitTrig_Pillar_of_the_Sun_Animation_Correction takes nothing returns nothing
set gg_trg_Pillar_of_the_Sun_Animation_Correction = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Pillar_of_the_Sun_Animation_Correction, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Pillar_of_the_Sun_Animation_Correction, Condition( function Trig_Pillar_of_the_Sun_Animation_Correction_Conditions ) )
call TriggerAddAction( gg_trg_Pillar_of_the_Sun_Animation_Correction, function Trig_Pillar_of_the_Sun_Animation_Correction_Actions )
endfunction
function Trig_Back_Slash_Cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A000' ) ) then
return false
endif
return true
endfunction
function Trig_Back_Slash_Cast_Actions takes nothing returns nothing
local unit uni_zealot = GetSpellAbilityUnit()
local unit uni_target = GetSpellTargetUnit()
local integer int_bslevel = GetUnitAbilityLevelSwapped( 'A000' ,uni_zealot )
local location loc_zealot = GetUnitLoc( uni_zealot )
local location loc_target = GetUnitLoc( uni_target )
local real rea_bstimer = 1.00 + I2R( int_bslevel )
local real rea_damage = 60.00 * I2R( int_bslevel )
set udg_Uni_Zealot = uni_zealot
set udg_Loc_BackSlashOrigin = loc_zealot
call PolledWait( 0.01 )
call DestroyEffectBJ(AddSpecialEffectLocBJ( loc_target, "war3mapImported\\GainLife.mdx" ))
call DestroyEffectBJ(AddSpecialEffectLocBJ( loc_zealot, "Abilities\\Spells\\Items\\AIlm\\AIlmTarget.mdl" ))
call SetUnitPositionLoc( uni_zealot, loc_target )
call UnitDamageTargetBJ( uni_zealot, uni_target, rea_damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )
set loc_zealot = GetUnitLoc( uni_zealot )
call DestroyEffectBJ(AddSpecialEffectLocBJ( loc_zealot, "Abilities\\Spells\\Items\\AIlm\\AIlmTarget.mdl" ))
call StartTimerBJ( udg_Tim_BackSlash, false, rea_bstimer )
set uni_zealot = null
set uni_target = null
call RemoveLocation( loc_zealot )
call RemoveLocation( loc_target )
endfunction
//===========================================================================
function InitTrig_Back_Slash_Cast takes nothing returns nothing
set gg_trg_Back_Slash_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Back_Slash_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Back_Slash_Cast, Condition( function Trig_Back_Slash_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Back_Slash_Cast, function Trig_Back_Slash_Cast_Actions )
endfunction
function Trig_Back_Slash_Return_Conditions takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_Uni_Zealot) == true ) ) then
return false
endif
return true
endfunction
function Trig_Back_Slash_Return_Actions takes nothing returns nothing
local unit uni_zealot = udg_Uni_Zealot
local location loc_zealot = GetUnitLoc( uni_zealot )
call DestroyEffectBJ(AddSpecialEffectLocBJ( loc_zealot, "Abilities\\Spells\\Items\\AIlm\\AIlmTarget.mdl" ))
call SetUnitPositionLoc( uni_zealot, udg_Loc_BackSlashOrigin )
call DestroyEffectBJ(AddSpecialEffectLocBJ( udg_Loc_BackSlashOrigin, "Abilities\\Spells\\Items\\AIlm\\AIlmTarget.mdl" ))
call RemoveLocation( loc_zealot )
call RemoveLocation( udg_Loc_BackSlashOrigin )
set uni_zealot = null
endfunction
//===========================================================================
function InitTrig_Back_Slash_Return takes nothing returns nothing
set gg_trg_Back_Slash_Return = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Back_Slash_Return, udg_Tim_BackSlash )
call TriggerAddCondition( gg_trg_Back_Slash_Return, Condition( function Trig_Back_Slash_Return_Conditions ) )
call TriggerAddAction( gg_trg_Back_Slash_Return, function Trig_Back_Slash_Return_Actions )
endfunction
function Trig_Back_Slash_Cast_Copy_Copy_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00C' ) ) then
return false
endif
return true
endfunction
function Trig_Back_Slash_Cast_Copy_Copy_Actions takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetTriggerUnit(), 500, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )
call StartTimerBJ( udg_Tim_BackSlash, false, 30 )
endfunction
//===========================================================================
function InitTrig_Back_Slash_Cast_Copy_Copy takes nothing returns nothing
set gg_trg_Back_Slash_Cast_Copy_Copy = CreateTrigger( )
call DisableTrigger( gg_trg_Back_Slash_Cast_Copy_Copy )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Back_Slash_Cast_Copy_Copy, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Back_Slash_Cast_Copy_Copy, Condition( function Trig_Back_Slash_Cast_Copy_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Back_Slash_Cast_Copy_Copy, function Trig_Back_Slash_Cast_Copy_Copy_Actions )
endfunction
function Trig_Blade_Blessing_Ability_Add_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AUfa' ) ) then
return false
endif
return true
endfunction
function Trig_Blade_Blessing_Ability_Add_Actions takes nothing returns nothing
local unit uni_bbzeal = GetSpellAbilityUnit()
local integer int_bbless = GetUnitAbilityLevelSwapped( 'AUfa' ,uni_bbzeal )
set udg_Uni_BleedingEdgeTarget = GetSpellTargetUnit()
call UnitAddAbilityBJ( 'ANdb', udg_Uni_BleedingEdgeTarget )
call SetUnitAbilityLevelSwapped( 'ANdb', udg_Uni_BleedingEdgeTarget, (int_bbless * 10) - 9 )
set uni_bbzeal = null
call EnableTrigger( gg_trg_Blade_Blessing_Cycle )
endfunction
//===========================================================================
function InitTrig_Blade_Blessing_Ability_Add takes nothing returns nothing
set gg_trg_Blade_Blessing_Ability_Add = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Blade_Blessing_Ability_Add, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Blade_Blessing_Ability_Add, Condition( function Trig_Blade_Blessing_Ability_Add_Conditions ) )
call TriggerAddAction( gg_trg_Blade_Blessing_Ability_Add, function Trig_Blade_Blessing_Ability_Add_Actions )
endfunction
function Trig_Stand_Unrivalled_End_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'ANic', udg_Uni_Zealot )
endfunction
//===========================================================================
function InitTrig_Stand_Unrivalled_End takes nothing returns nothing
set gg_trg_Stand_Unrivalled_End = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Stand_Unrivalled_End, udg_Tim_StandUnrivalled )
call TriggerAddAction( gg_trg_Stand_Unrivalled_End, function Trig_Stand_Unrivalled_End_Actions )
endfunction
function Trig_Stand_Unrivalled_Effect_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'Acht' ) ) then
return false
endif
return true
endfunction
function Trig_Stand_Unrivalled_Effect_Actions takes nothing returns nothing
local unit uni_zealot = GetSpellAbilityUnit()
local integer int_sunrival = GetUnitAbilityLevelSwapped( 'Atau' , uni_zealot )
call UnitAddAbilityBJ( 'ANic', uni_zealot )
call SetUnitAbilityLevelSwapped( 'ANic', uni_zealot, int_sunrival )
set udg_Uni_Zealot = uni_zealot
call StartTimerBJ( udg_Tim_StandUnrivalled, false, 30.00 )
set uni_zealot = null
endfunction
//===========================================================================
function InitTrig_Stand_Unrivalled_Effect takes nothing returns nothing
set gg_trg_Stand_Unrivalled_Effect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Stand_Unrivalled_Effect, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Stand_Unrivalled_Effect, Condition( function Trig_Stand_Unrivalled_Effect_Conditions ) )
call TriggerAddAction( gg_trg_Stand_Unrivalled_Effect, function Trig_Stand_Unrivalled_Effect_Actions )
endfunction