//TESH.scrollpos=0
//TESH.alwaysfold=0
function winner takes nothing returns nothing
call DisplayTextToPlayer(GetEnumPlayer(),0,0, GetPlayerName(ForcePickRandomPlayer(udg_Players)) + " |cffff0000has won the game! Game ends in 5 seconds.|r")
endfunction
function win takes nothing returns nothing
call CustomVictoryBJ(GetEnumPlayer(), false, true)
endfunction
function lose takes nothing returns nothing
call CustomDefeatBJ(GetEnumPlayer(), "Defeat")
endfunction
function gameover takes nothing returns nothing
call DisplayTextToPlayer(GetEnumPlayer(),0,0, GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + " |cffff0000is game over!|r")
endfunction
function end takes nothing returns nothing
call DisplayTextToPlayer(GetEnumPlayer(),0,0, GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + " |cffff0000has reached the required level, he has won the game! Game ends in 5 seconds.|r")
endfunction
function vend takes nothing returns nothing
call DisplayTextToPlayer(GetEnumPlayer(),0,0, GetPlayerName(GetOwningPlayer(GetKillingUnit())) + " |cffff0000has defeated ODIN!!, he has won the game! Game ends in 5 seconds.|r")
endfunction
Name | Type | is_array | initial_value |
AI | boolean | No | |
AI_Hero | unit | Yes | |
AI_Pool | group | No | |
Bosses | integer | No | |
Caster | unit | No | |
CastPoint | location | No | |
Color | string | Yes | |
Deaths | integer | Yes | |
Dummy | location | No | |
FoK_Ability_Level | integer | No | |
FoK_Angle | real | No | |
FoK_Base_Damage | real | No | |
FoK_Caster | unit | No | |
FoK_Damage_Group | group | No | |
FoK_Detection_Area | real | No | |
FoK_Distance | real | No | |
FoK_Dummy_Group | group | No | |
FoK_Facing | real | No | |
FoK_Knives_Count | integer | No | |
FoK_Loc1 | location | No | |
FoK_Loc2 | location | No | |
FoK_Loc3 | location | No | |
FoK_Loc4 | location | No | |
FoK_Random_Movement | boolean | No | |
FoK_Random_Path | boolean | No | |
FoK_Speed | real | No | |
FoK_Spiral_Angle | real | No | |
FoK_Table | hashtable | No | |
FoK_Total_Damage | real | No | |
GameMode | integer | No | |
GameModes | dialog | No | |
GameModesPick | button | Yes | |
Getsuga | unit | No | |
Hero | unit | Yes | |
HeroRevive | timer | Yes | |
HeroType | unitcode | Yes | |
KillLimit | integer | No | |
Kills | integer | Yes | |
LevelUP | integer | No | |
Lives | integer | No | |
Names | string | Yes | |
Odin | unit | No | |
Omni | group | No | |
Omniblast | hashtable | No | |
OrbitalRay | timer | No | |
Play | boolean | Yes | true |
Player | integer | No | |
Players | force | No | |
PlayersLeft | integer | No | |
Reiji | group | No | |
ReijiTimer | integer | Yes | |
ReijiUnit | unit | No | |
SE | effect | No | |
StartPoint | location | No | |
StartPoints | rect | Yes | |
Teleport | group | No | |
Tour | rect | No | |
Tourney | timer | No | |
UltimateKiller | dialog | No | |
Visibility | fogmodifier | Yes | |
Weather | weathereffect | Yes | |
WeatherNumber | integer | No |
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_PanCamera_Func001A takes nothing returns nothing
local player b = GetEnumPlayer()
local real x = GetUnitX(udg_Hero[GetConvertedPlayerId(b)])
local real y = GetUnitY(udg_Hero[GetConvertedPlayerId(b)])
if (GetLocalPlayer() == b) then
call PanCameraToTimed(x, y, 0.00)
endif
set b = null
endfunction
function Trig_PanCamera_Actions takes nothing returns nothing
call ForForce( GetPlayersAll(), function Trig_PanCamera_Func001A )
endfunction
//===========================================================================
function InitTrig_PanCamera takes nothing returns nothing
set gg_trg_PanCamera = CreateTrigger( )
call TriggerAddAction( gg_trg_PanCamera, function Trig_PanCamera_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Hero_Died_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( GetOwningPlayer(GetTriggerUnit()) == Player(11) ) then
return false
endif
return true
endfunction
function Trig_Hero_Died_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
call DisplayTimedTextToForce( GetPlayersAll(), 15.00, ( GetPlayerName(GetOwningPlayer(GetKillingUnit())) + ( "(" + ( GetHeroProperName(udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnit()))]) + ( ") just defeated " + ( GetPlayerName(GetOwningPlayer(a)) + ( "(" + ( GetHeroProperName(a) + ") in battle!" ) ) ) ) ) ) ) )
set udg_Kills[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnit()))] = udg_Kills[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnit()))] + 1
set udg_Deaths[GetConvertedPlayerId(GetOwningPlayer(a))] = udg_Deaths[GetConvertedPlayerId(GetOwningPlayer(a))] + 1
call TriggerExecute(gg_trg_UpdateMultiBoard)
set udg_Kills[12] = 0
if udg_GameMode == 1 then
if udg_Kills[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnit()))] == udg_KillLimit then
call DisableTrigger(GetTriggeringTrigger())
call ForForce(udg_Players, function winner)
call TriggerSleepAction(5.00)
call CustomVictoryBJ(GetOwningPlayer(GetKillingUnit()), true, true)
call ForceRemovePlayer(udg_Players, GetOwningPlayer(GetKillingUnit()))
call ForForce(udg_Players, function lose)
endif
endif
if udg_GameMode == 2 then
if udg_Deaths[GetConvertedPlayerId(GetOwningPlayer(a))] == udg_Lives then
call ForForce(GetPlayersAll(), function gameover)
call ForceRemovePlayer(udg_Players, GetOwningPlayer(a))
set udg_Play[GetConvertedPlayerId(GetOwningPlayer(a))] = false
call TriggerExecute(gg_trg_UpdateMultiBoard)
set udg_PlayersLeft = udg_PlayersLeft - 1
if udg_PlayersLeft <= 1 then
call DisableTrigger(GetTriggeringTrigger())
call ForForce(udg_Players, function winner)
call TriggerSleepAction(5.00)
call ForForce(udg_Players, function win)
endif
return
endif
endif
call TriggerSleepAction(5.00)
set udg_StartPoint = GetRandomLocInRect(udg_StartPoints[GetRandomInt(1, 5)])
call ReviveHeroLoc( a, udg_StartPoint, false )
call SetUnitState( a, UNIT_STATE_LIFE, GetUnitState(a, UNIT_STATE_MAX_LIFE))
call SetUnitState( a, UNIT_STATE_MANA, GetUnitState(a, UNIT_STATE_MAX_MANA))
if (GetLocalPlayer() == GetOwningPlayer(a)) then
call PanCameraToTimed(GetLocationX(udg_StartPoint), GetLocationY(udg_StartPoint), 0.00)
endif
call RemoveLocation(udg_StartPoint)
set a = null
endfunction
//===========================================================================
function InitTrig_Hero_Died takes nothing returns nothing
set gg_trg_Hero_Died = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hero_Died, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Hero_Died, Condition( function Trig_Hero_Died_Conditions ) )
call TriggerAddAction( gg_trg_Hero_Died, function Trig_Hero_Died_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Item_Stack2_Conditions takes nothing returns boolean
return (GetItemCharges(GetManipulatedItem()) != 0 )
endfunction
function Trig_Item_Stack2_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local item mani = GetManipulatedItem()
local integer b = GetItemTypeId(mani)
local integer c = 0
local item d
loop
exitwhen c == 6
set d = UnitItemInSlot(a, c)
if d != mani then
if b == GetItemTypeId(d) then
call SetItemCharges(d, GetItemCharges(d) + GetItemCharges(mani))
call RemoveItem(mani)
set c = 6
else
set c = c + 1
endif
else
set c = c + 1
endif
endloop
set d = null
set mani = null
set a = null
endfunction
//===========================================================================
function InitTrig_Item_Stack2 takes nothing returns nothing
set gg_trg_Item_Stack2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Item_Stack2, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Item_Stack2, Condition( function Trig_Item_Stack2_Conditions ) )
call TriggerAddAction( gg_trg_Item_Stack2, function Trig_Item_Stack2_Actions )
endfunction
//TESH.scrollpos=2
//TESH.alwaysfold=0
function Trig_Teleport_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00F' ) ) then
return false
endif
return true
endfunction
function Conditions takes nothing returns boolean
return ( GetFilterUnit() != GetTriggerUnit() )
endfunction
function Trig_Teleport_Actions takes nothing returns nothing
local location x = GetSpellTargetLoc()
local real i = 1
local real xx = GetLocationX(x)
local real xy = GetLocationY(x)
local unit a = GetTriggerUnit()
local location y = GetUnitLoc(a)
loop
exitwhen i == 5
call SetUnitVertexColor(a, 255, 255, 255, 100 - R2I(i*20))
set i = i + 1
call TriggerSleepAction(.4)
endloop
set udg_Teleport = GetUnitsInRangeOfLocMatching( 500, y, Condition(function Conditions))
if ( CountUnitsInGroup(udg_Teleport) != 0 ) then
call DisplayTextToPlayer(GetOwningPlayer(a), 0, 0, "There are nearby units, cannot teleport")
call SetUnitVertexColor(a, 255, 255, 255, 255)
call DestroyGroup(udg_Teleport)
else
call SetUnitX(a, xx)
call SetUnitY(a, xy)
call PanCameraToTimedForPlayer(GetOwningPlayer(a), xx, xy, 0.00)
call SetUnitVertexColor(a, 255, 255, 255, 255)
endif
call RemoveLocation(x)
call RemoveLocation(y)
set a = null
set x = null
set y = null
endfunction
//===========================================================================
function InitTrig_Teleport takes nothing returns nothing
set gg_trg_Teleport = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Teleport, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Teleport, Condition( function Trig_Teleport_Conditions ) )
call TriggerAddAction( gg_trg_Teleport, function Trig_Teleport_Actions )
endfunction
//TESH.scrollpos=1
//TESH.alwaysfold=0
function Trig_Tsukiyomi_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00H' ) ) then
return false
endif
return true
endfunction
function Trig_Tsukiyomi_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local unit b = GetSpellTargetUnit()
local integer c = 1
local integer d = GetUnitAbilityLevel(a, GetSpellAbilityId())
loop
exitwhen c == 7
call TriggerSleepAction(1.00)
call UnitDamageTarget( a, b, ( GetUnitState(b, UNIT_STATE_MAX_LIFE) * (( 0.20 + ( 0.10 * I2R(d) ) )/6)), true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_DIVINE, WEAPON_TYPE_WHOKNOWS)
set c = c + 1
endloop
set a = null
set b = null
endfunction
//===========================================================================
function InitTrig_Tsukiyomi takes nothing returns nothing
set gg_trg_Tsukiyomi = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Tsukiyomi, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Tsukiyomi, Condition( function Trig_Tsukiyomi_Conditions ) )
call TriggerAddAction( gg_trg_Tsukiyomi, function Trig_Tsukiyomi_Actions )
endfunction
//TESH.scrollpos=27
//TESH.alwaysfold=0
function Trig_OmniBlast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00L' ) ) then
return false
endif
return true
endfunction
function check takes nothing returns boolean
return (GetOwningPlayer(GetFilterUnit()) != GetOwningPlayer(GetTriggerUnit()))
endfunction
function Trig_OmniBlast_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local location b = GetUnitLoc(a)
local location c = GetSpellTargetLoc()
local integer d = GetUnitAbilityLevel(a, GetSpellAbilityId())
local integer e = 0
local real x
local real y
local real z = Atan2(GetLocationY(c) - GetLocationY(b), GetLocationX(c) - GetLocationX(b))
local player g = GetOwningPlayer(a)
local unit h
local group i = CreateGroup()
local group j = CreateGroup()
local location l
local effect m
local unit u
local unit v
loop
exitwhen e == 7
set x = GetLocationX(b) + (100*e) * Cos(z)
set y = GetLocationY(b) + (100*e) * Sin(z)
set h = CreateUnit(g, 'h004', x, y, 0.00)
set l = Location(x,y)
call GroupEnumUnitsInRangeOfLoc(i, l, 225, Condition(function check))
loop
set u = FirstOfGroup(i)
exitwhen u == null
set v = CreateUnit(g, 'h002', x, y, 0.00)
call UnitAddAbility(v, 'A00T')
call UnitApplyTimedLife(v,'BTLF', 1.00)
call IssueTargetOrder(v, "cripple", u)
call GroupRemoveUnit(i, u)
endloop
call UnitApplyTimedLife(h,'BTLF', 1.5 + I2R(e)*.1)
set e = e + 1
endloop
set e = 0
call TriggerSleepAction(.9)
loop
exitwhen e == 7
set x = GetLocationX(b) + (100*e) * Cos(z)
set y = GetLocationY(b) + (100*e) * Sin(z)
set m = AddSpecialEffect("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl",x,y)
call DestroyEffect(m)
set l = Location(x,y)
call GroupEnumUnitsInRangeOfLoc(i, l, 225, Condition(function check))
loop
set u = FirstOfGroup(i)
exitwhen u == null
if IsUnitInGroup(u, j) == false then
call UnitDamageTarget(a, u, 125*(1 + I2R(d)), false, false, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_FIRE, WEAPON_TYPE_WHOKNOWS)
call GroupAddUnit(j, u)
endif
call GroupRemoveUnit(i, u)
endloop
call RemoveLocation(l)
set e = e + 1
call TriggerSleepAction(.1)
endloop
call DestroyGroup(i)
call DestroyGroup(j)
call RemoveLocation(b)
call RemoveLocation(c)
set a = null
set b = null
set c = null
set h = null
set g = null
set l = null
set i = null
set m = null
set u = null
set j = null
set v = null
endfunction
//===========================================================================
function InitTrig_OmniBlast takes nothing returns nothing
set gg_trg_OmniBlast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_OmniBlast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_OmniBlast, Condition( function Trig_OmniBlast_Conditions ) )
call TriggerAddAction( gg_trg_OmniBlast, function Trig_OmniBlast_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_GetsugaTenshou_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00N' ) ) then
return false
endif
return true
endfunction
function Trig_GetsugaTenshou_Func001C takes nothing returns boolean
if ( not ( GetUnitAbilityLevel(GetTriggerUnit(),'B005' ) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_GetsugaTenshou_Actions takes nothing returns nothing
local location a = GetSpellTargetLoc()
local location b = GetUnitLoc(GetTriggerUnit())
if ( Trig_GetsugaTenshou_Func001C() ) then
set udg_Getsuga = CreateUnitAtLoc( GetOwningPlayer(GetTriggerUnit()), 'h002', b, bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', udg_Getsuga )
call UnitAddAbilityBJ( 'A00P', udg_Getsuga )
call SetUnitAbilityLevelSwapped( 'A00P', udg_Getsuga, GetUnitAbilityLevelSwapped('A00N', GetTriggerUnit()) )
call IssuePointOrderLocBJ( udg_Getsuga, "breathoffrost", a )
call RemoveLocation(a)
call RemoveLocation(b)
set a = null
set b = null
else
set udg_Getsuga = CreateUnitAtLoc( GetOwningPlayer(GetTriggerUnit()), 'h002', b, bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', udg_Getsuga )
call UnitAddAbilityBJ( 'A00O', udg_Getsuga )
call SetUnitAbilityLevelSwapped( 'A00O', udg_Getsuga, GetUnitAbilityLevelSwapped('A00N', GetTriggerUnit()) )
call IssuePointOrderLocBJ( udg_Getsuga, "breathoffrost", a )
call RemoveLocation(a)
call RemoveLocation(b)
set a = null
set b = null
endif
endfunction
//===========================================================================
function InitTrig_GetsugaTenshou takes nothing returns nothing
set gg_trg_GetsugaTenshou = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_GetsugaTenshou, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_GetsugaTenshou, Condition( function Trig_GetsugaTenshou_Conditions ) )
call TriggerAddAction( gg_trg_GetsugaTenshou, function Trig_GetsugaTenshou_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_ThousandYIP_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00W' ) ) then
return false
endif
return true
endfunction
function Trig_ThousandYIP_Actions takes nothing returns nothing
local integer a = 1
local location b = GetSpellTargetLoc()
local real x
local real y
local unit h
loop
exitwhen a > 6
set x = GetLocationX(b) + (150) * Cos(bj_DEGTORAD*a*60)
set y = GetLocationY(b) + (150) * Sin(bj_DEGTORAD*a*60)
set h = CreateUnit(GetOwningPlayer(GetTriggerUnit()), 'h005', x, y, 0.00)
call UnitApplyTimedLife(h, 'BTLF', 10.00)
call SetUnitPathing(h, false)
set a = a + 1
endloop
call RemoveLocation(b)
set h = null
endfunction
//===========================================================================
function InitTrig_ThousandYIP takes nothing returns nothing
set gg_trg_ThousandYIP = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ThousandYIP, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ThousandYIP, Condition( function Trig_ThousandYIP_Conditions ) )
call TriggerAddAction( gg_trg_ThousandYIP, function Trig_ThousandYIP_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Death_Strike_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A011' ) ) then
return false
endif
return true
endfunction
function Trig_Death_Strike_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local unit b = GetSpellTargetUnit()
local real x = GetUnitX(b)
local real y = GetUnitY(b)
call SetUnitX(a, x)
call SetUnitY(a, y)
call SetUnitAnimation(a, "attack")
call UnitDamageTarget(a, b, 80*GetUnitAbilityLevel(a, 'A011'), true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS)
set a = null
set b = null
endfunction
//===========================================================================
function InitTrig_Death_Strike takes nothing returns nothing
set gg_trg_Death_Strike = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Death_Strike, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Death_Strike, Condition( function Trig_Death_Strike_Conditions ) )
call TriggerAddAction( gg_trg_Death_Strike, function Trig_Death_Strike_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_DarkRequiem_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A013' ) ) then
return false
endif
return true
endfunction
function Trig_DarkRequiem_Actions takes nothing returns nothing
local location a = GetSpellTargetLoc()
local real x = GetLocationX(a)
local real y = GetLocationY(a)
local integer b = 1
local integer c = 1 + 3*GetUnitAbilityLevel(GetTriggerUnit(), 'A013')
local unit d
loop
exitwhen b > c
set d = CreateUnit(GetOwningPlayer(GetTriggerUnit()), 'h006', x + GetRandomReal(-300.00, 300.00), y + GetRandomReal(-300.00, 300.00), 0.00)
call KillUnit(d)
//call UnitApplyTimedLife(d, 'BTLF', .1)
call TriggerSleepAction(GetRandomReal(.100, .500))
set b = b + 1
endloop
call RemoveLocation(a)
set d = null
set a = null
endfunction
//===========================================================================
function InitTrig_DarkRequiem takes nothing returns nothing
set gg_trg_DarkRequiem = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DarkRequiem, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_DarkRequiem, Condition( function Trig_DarkRequiem_Conditions ) )
call TriggerAddAction( gg_trg_DarkRequiem, function Trig_DarkRequiem_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Diablo_Cannon_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01D' ) ) then
return false
endif
return true
endfunction
function Trig_Diablo_Cannon_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local unit b
local location c = GetUnitLoc(a)
local location d = GetSpellTargetLoc()
if GetUnitState(a, UNIT_STATE_LIFE) <= .5*GetUnitState(a, UNIT_STATE_MAX_LIFE) then
set b = CreateUnitAtLoc(GetOwningPlayer(a), 'h007', c, 90 + GetUnitFacing(a))
call UnitAddAbility(b, 'A01E')
call SetUnitAbilityLevel(b, 'A01E',GetUnitAbilityLevel(a, 'A01D'))
call UnitApplyTimedLife(b, 'BTLF', 2)
call IssuePointOrderLoc(b, "breathoffrost", d)
else
set b = CreateUnitAtLoc(GetOwningPlayer(a), 'h007', c, 90 + GetUnitFacing(a))
call UnitAddAbility(b, 'A01C')
call SetUnitAbilityLevel(b, 'A01C', GetUnitAbilityLevel(a, 'A01D'))
call UnitApplyTimedLife(b, 'BTLF', 2)
call IssuePointOrderLoc(b, "breathoffrost", d)
endif
call RemoveLocation(c)
call RemoveLocation(d)
set a = null
set b = null
endfunction
//===========================================================================
function InitTrig_Diablo_Cannon takes nothing returns nothing
set gg_trg_Diablo_Cannon = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Diablo_Cannon, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Diablo_Cannon, Condition( function Trig_Diablo_Cannon_Conditions ) )
call TriggerAddAction( gg_trg_Diablo_Cannon, function Trig_Diablo_Cannon_Actions )
endfunction
//TESH.scrollpos=30
//TESH.alwaysfold=0
function Trig_Omnislash_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01M' ) ) then
return false
endif
return true
endfunction
function checkerr takes nothing returns boolean
return (GetOwningPlayer(GetFilterUnit()) != GetOwningPlayer(GetTriggerUnit()))
endfunction
function checkere takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function checker takes nothing returns boolean
return GetBooleanAnd(checkerr(), checkere())
endfunction
function Trig_Omnislash_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local unit b = GetSpellTargetUnit()
local group c
local location d = GetUnitLoc(b)
local integer e = GetUnitAbilityLevel(a, 'A01M')
local integer f = 2
local effect g = AddSpecialEffectTarget("Abilities\\Weapons\\FaerieDragonMissile\\FaerieDragonMissile.mdl", a, "hand right")
local effect h = AddSpecialEffectTarget("Abilities\\Weapons\\FaerieDragonMissile\\FaerieDragonMissile.mdl", a, "hand left")
call SetUnitInvulnerable(a, true)
call SetUnitX(a, GetLocationX(d))
call SetUnitY(a, GetLocationY(d))
call SetUnitTimeScale(a, 1.50)
call SetUnitAnimation(a, "spell")
call SetUnitVertexColor(a, 255, 255, 100, 120)
call UnitDamageTarget(a, b, 100, true, false, ATTACK_TYPE_HERO, DAMAGE_TYPE_ENHANCED, WEAPON_TYPE_WHOKNOWS)
call RemoveLocation(d)
call PauseUnit(a, true)
call TriggerSleepAction(.1)
loop
exitwhen f > 2*e + 1
set d = GetUnitLoc(a)
set c = GetUnitsInRangeOfLocMatching(600, d, Condition(function checker))
if CountUnitsInGroup(c) == 0 then
set f = 2*e + 1
call DestroyGroup(c)
else
set b = GroupPickRandomUnit(c)
call RemoveLocation(d)
set d = GetUnitLoc(b)
call SetUnitX(a, GetLocationX(d))
call SetUnitY(a, GetLocationY(d))
call SetUnitAnimation(a, "spell")
call UnitDamageTarget(a, b, 100, true, false, ATTACK_TYPE_HERO, DAMAGE_TYPE_ENHANCED, WEAPON_TYPE_WHOKNOWS)
call DestroyGroup(c)
call TriggerSleepAction(.1)
endif
call RemoveLocation(d)
set f = f + 1
endloop
call SetUnitTimeScale(a, 1.00)
call DestroyEffect(g)
call DestroyEffect(h)
call SetUnitVertexColor(a, 255, 255, 255, 255)
call PauseUnit(a, false)
call SetUnitInvulnerable(a, false)
set a = null
set b = null
set c = null
set g = null
set d = null
set h = null
endfunction
//===========================================================================
function InitTrig_Omnislash takes nothing returns nothing
set gg_trg_Omnislash = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Omnislash, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Omnislash, Condition( function Trig_Omnislash_Conditions ) )
call TriggerAddAction( gg_trg_Omnislash, function Trig_Omnislash_Actions )
endfunction
//TESH.scrollpos=6
//TESH.alwaysfold=0
function Trig_Blizzard_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01N' ) ) then
return false
endif
return true
endfunction
function Trig_Blizzard_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local location b = GetSpellTargetLoc()
local unit c = CreateUnitAtLoc(GetOwningPlayer(a), 'h002', b, 0.00)
call UnitAddAbility(c, 'A01O')
call SetUnitAbilityLevel(c, 'A01O', GetUnitAbilityLevel(a, 'A01N'))
call UnitApplyTimedLife(c, 'BTLF', 5.00)
call IssuePointOrderLoc(c, "blizzard", b)
call RemoveLocation(b)
set a = null
set b = null
set c = null
endfunction
//===========================================================================
function InitTrig_Blizzard takes nothing returns nothing
set gg_trg_Blizzard = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Blizzard, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Blizzard, Condition( function Trig_Blizzard_Conditions ) )
call TriggerAddAction( gg_trg_Blizzard, function Trig_Blizzard_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Arcane_Blast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01R' ) ) then
return false
endif
return true
endfunction
function Trig_Arcane_Blast_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local location b = GetSpellTargetLoc()
local real x = GetLocationX(b)
local real y = GetLocationY(b)
local integer c = 0
local player e = GetOwningPlayer(a)
local unit d
local unit f
local integer g = 2*(1 + GetUnitAbilityLevel(a, 'A01R'))
call RemoveLocation(b)
loop
exitwhen c == g
set d = CreateUnit(e, 'h008' , x, y, 0.00)
call UnitApplyTimedLife(d, 'BTLF', 1.1)
set f = CreateUnit(e, 'h009' , x + (GetRandomReal(-300,300)), y + (GetRandomReal(-300,300)),0.00)
call IssueTargetOrder(d, "chainlightning", f)
set d = null
set f = null
set c = c + 1
endloop
set a = null
set b = null
set e = null
endfunction
//===========================================================================
function InitTrig_Arcane_Blast takes nothing returns nothing
set gg_trg_Arcane_Blast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Arcane_Blast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Arcane_Blast, Condition( function Trig_Arcane_Blast_Conditions ) )
call TriggerAddAction( gg_trg_Arcane_Blast, function Trig_Arcane_Blast_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Spirit_Stomp_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A021' ) ) then
return false
endif
return true
endfunction
function Trig_Spirit_Stomp_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local real x = GetUnitX(a)
local real y = GetUnitY(a)
local integer b = GetUnitAbilityLevel(a, 'A021')
local unit c = CreateUnit(GetOwningPlayer(a), 'h00B', x, y, GetRandomDirectionDeg())
call SetUnitAbilityLevel(c, 'A022',b)
call IssueImmediateOrder(c, "stomp")
call SetUnitAnimation(c, "spell slam")
call SetUnitVertexColor(c, 255, 255, 255, 120)
call UnitApplyTimedLife(c, 'BTLF', 3.00)
set a = null
set c = null
endfunction
//===========================================================================
function InitTrig_Spirit_Stomp takes nothing returns nothing
set gg_trg_Spirit_Stomp = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Spirit_Stomp, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Spirit_Stomp, Condition( function Trig_Spirit_Stomp_Conditions ) )
call TriggerAddAction( gg_trg_Spirit_Stomp, function Trig_Spirit_Stomp_Actions )
endfunction
//TESH.scrollpos=7
//TESH.alwaysfold=0
function Trig_Burn_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A029' ) ) then
return false
endif
return true
endfunction
function Trig_Burn_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local unit b = GetSpellTargetUnit()
local integer c = 20*GetUnitAbilityLevel(a, 'A029')
local integer d = 0
local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Other\\ImmolationRed\\ImmolationRedTarget.mdl",b,"chest")
if GetOwningPlayer(a) != GetOwningPlayer(b) then
loop
exitwhen d == 4
call UnitDamageTarget(a, b, c, true, false, ATTACK_TYPE_HERO, DAMAGE_TYPE_ENHANCED, WEAPON_TYPE_WHOKNOWS)
call TriggerSleepAction(1.00)
set d = d + 1
endloop
else
loop
exitwhen d == 4
call SetUnitState(b, UNIT_STATE_LIFE, GetUnitState(b, UNIT_STATE_LIFE) + c)
call TriggerSleepAction(1.00)
set d = d + 1
endloop
endif
call DestroyEffect(e)
set e = null
set a = null
set b = null
endfunction
//===========================================================================
function InitTrig_Burn takes nothing returns nothing
set gg_trg_Burn = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Burn, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Burn, Condition( function Trig_Burn_Conditions ) )
call TriggerAddAction( gg_trg_Burn, function Trig_Burn_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Sprout_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02C' ) ) then
return false
endif
return true
endfunction
function Trig_Sprout_Actions takes nothing returns nothing
local location x = GetSpellTargetLoc()
local unit a = CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()), 'h00C', x, 0.00)
call RemoveLocation(x)
set a = null
set x = null
endfunction
//===========================================================================
function InitTrig_Sprout takes nothing returns nothing
set gg_trg_Sprout = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Sprout, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Sprout, Condition( function Trig_Sprout_Conditions ) )
call TriggerAddAction( gg_trg_Sprout, function Trig_Sprout_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_WrathOfNature_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevel(GetSpellTargetUnit(), 'A02D') > 0 ) ) then
return false
endif
return true
endfunction
function Trig_WrathOfNature_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local unit b = GetSpellTargetUnit()
local real x = GetUnitX(a)
local real y = GetUnitY(a)
local unit c = CreateUnit(GetOwningPlayer(b), 'h00E', x, y, 0.00)
call UnitApplyTimedLife(c,'BTLF', 1.50)
call UnitAddAbility(c, 'A02E')
call SetUnitAbilityLevel(c, 'A02E', GetUnitAbilityLevel(b, 'A02D'))
call IssueTargetOrder(c, "chainlightning", a)
set a = null
set b = null
set c = null
endfunction
//===========================================================================
function InitTrig_WrathOfNature takes nothing returns nothing
set gg_trg_WrathOfNature = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_WrathOfNature, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_WrathOfNature, Condition( function Trig_WrathOfNature_Conditions ) )
call TriggerAddAction( gg_trg_WrathOfNature, function Trig_WrathOfNature_Actions )
endfunction
//TESH.scrollpos=11
//TESH.alwaysfold=0
function Trig_Overgrowth_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02F' ) ) then
return false
endif
return true
endfunction
function OG takes nothing returns boolean
return (IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO))
endfunction
function Trig_Overgrowth_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local real x = GetUnitX(a)
local real y = GetUnitY(a)
local group b = CreateGroup()
local player c = GetOwningPlayer(a)
local integer d = GetUnitAbilityLevel(a, 'A02F')
local real e = 0
local unit f
local real dx
local real dy
local real de
local unit g
call GroupEnumUnitsInRange(b, x, y, 1000 + d*2000, Condition(function OG))
loop
set f = FirstOfGroup(b)
exitwhen f == null
if (IsUnitEnemy(f, c) == true and GetUnitState(f, UNIT_STATE_LIFE) > 0) then
if e == 0 then
set dx = GetUnitX(f) - x
set dy = GetUnitY(f) - y
set e = SquareRoot(dx*dx + dy*dy)
set g = f
else
set dx = GetUnitX(f) - x
set dy = GetUnitY(f) - y
set de = SquareRoot(dx*dx + dy*dy)
if e > de then
set e = de
set g = f
endif
endif
endif
call GroupRemoveUnit(b, f)
endloop
set x = GetUnitX(g)
set y = GetUnitY(g)
set a = CreateUnit(c, 'h00D', x, y, 0.00)
call UnitApplyTimedLife(a,'BTLF', 1.50)
call SetUnitAbilityLevel(a, 'A02G', d)
call IssueImmediateOrder(a, "stomp")
call DestroyGroup(b)
set a = null
set b = null
set c = null
set f = null
set g = null
endfunction
//===========================================================================
function InitTrig_Overgrowth takes nothing returns nothing
set gg_trg_Overgrowth = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Overgrowth, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Overgrowth, Condition( function Trig_Overgrowth_Conditions ) )
call TriggerAddAction( gg_trg_Overgrowth, function Trig_Overgrowth_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_ReviveEnemies_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(11) ) ) then
return false
endif
return true
endfunction
function Trig_ReviveEnemies_Actions takes nothing returns nothing
local location a = GetUnitLoc(GetTriggerUnit())
local integer b = GetUnitTypeId(GetTriggerUnit())
call TriggerSleepAction( 25.00 )
call CreateUnitAtLoc(Player(11), b, a, 0.00)
call RemoveLocation(a)
set a = null
endfunction
//===========================================================================
function InitTrig_ReviveEnemies takes nothing returns nothing
set gg_trg_ReviveEnemies = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ReviveEnemies, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_ReviveEnemies, Condition( function Trig_ReviveEnemies_Conditions ) )
call TriggerAddAction( gg_trg_ReviveEnemies, function Trig_ReviveEnemies_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Tele_Actions takes nothing returns nothing
local integer a = 1
local real x
local real y
loop
exitwhen a == 11
set x = GetRandomReal(GetRectMinX(udg_Tour), GetRectMaxX(udg_Tour))
set y = GetRandomReal(GetRectMinY(udg_Tour), GetRectMaxY(udg_Tour))
call SetUnitX(udg_Hero[a], x)
call SetUnitY(udg_Hero[a], y)
if (GetLocalPlayer() == GetOwningPlayer(udg_Hero[a])) then
call PanCameraToTimed(x, y, 0.00)
endif
set a = a + 1
endloop
endfunction
//===========================================================================
function InitTrig_Tele takes nothing returns nothing
set gg_trg_Tele = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Tele, udg_Tourney )
call TriggerAddAction( gg_trg_Tele, function Trig_Tele_Actions )
endfunction
//TESH.scrollpos=6
//TESH.alwaysfold=0
function LS takes nothing returns nothing
local integer a = 1
local unit b
call DestroyTimer(GetExpiredTimer())
loop
exitwhen a > 10
set b = CreateUnit(Player(11), 'h00F', 0.00, 0.00, 0.00)
call UnitApplyTimedLife(b,'BTLF', 1.00)
call IssueTargetOrder(b, "chainlightning", udg_Hero[a])
set a = a + 1
endloop
set b = null
endfunction
function LSS takes nothing returns nothing
local integer a = 0
loop
exitwhen a == 10
call DisplayTimedTextToPlayer(Player(a), 0, 0, 5.00, "A lightning storm will hit in 5 seconds.")
set a = a + 1
endloop
call TimerStart(CreateTimer(), 5.00, true, function LS)
endfunction
//===========================================================================
function InitTrig_Lightning_Storm takes nothing returns nothing
set gg_trg_Lightning_Storm = CreateTrigger( )
call TimerStart(CreateTimer(), 180.00, true, function LSS)
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function checks takes nothing returns boolean
return ((IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true) and IsUnitOwnedByPlayer(GetFilterUnit(),Player(11)) != true)
endfunction
function Trig_Orbital_Ray_Actions takes nothing returns nothing
local group b = GetUnitsInRectMatching(bj_mapInitialPlayableArea, Condition(function checks))
local unit a = GroupPickRandomUnit(b)
call TimerStart( udg_OrbitalRay, GetRandomReal(60.00, 300.00), false, null)
call DisplayTimedTextToForce( GetPlayersAll(), 8.00, "TRIGSTR_959" )
call TriggerSleepAction(GetRandomReal(1.00, 5.00) )
if udg_GameMode == 2 then
call DisplayTimedTextToForce( GetPlayersAll(), 5.00, ( "The Orbital Strike was shot at " + GetHeroProperName(a) ) )
call UnitDamageTargetBJ( gg_unit_uplg_0119, a, 1000.00, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_DIVINE )
call AddSpecialEffectTarget( "OrbitalRay.mdx", a, "origin" )
call DestroyEffect( bj_lastCreatedEffect )
else
call DisplayTimedTextToForce( GetPlayersAll(), 5.00, ( "The Orbital Strike was shot at " + GetHeroProperName(a) ) )
call UnitDamageTargetBJ( gg_unit_uplg_0119, a, 10000000.00, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_DIVINE )
call AddSpecialEffectTarget( "OrbitalRay.mdx", a, "origin" )
call DestroyEffect( bj_lastCreatedEffect )
endif
call DestroyGroup(b)
set a = null
set b = null
endfunction
//===========================================================================
function InitTrig_Orbital_Ray takes nothing returns nothing
set gg_trg_Orbital_Ray = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Orbital_Ray, udg_OrbitalRay )
call TriggerAddAction( gg_trg_Orbital_Ray, function Trig_Orbital_Ray_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Lightning_Traps_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Lightning_Traps_Actions takes nothing returns nothing
local effect a = (AddSpecialEffectTarget("Lightnings Long.mdx", GetTriggerUnit(), "origin"))
call DisplayTextToPlayer(GetOwningPlayer(GetTriggerUnit()), 0, 0, "You have activated a lightning trap!")
call UnitDamageTargetBJ( gg_unit_uplg_0119, GetTriggerUnit(), 1000.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_LIGHTNING )
call TriggerSleepAction(3.00)
call DestroyEffect(a)
set a = null
endfunction
//===========================================================================
function InitTrig_Lightning_Traps takes nothing returns nothing
set gg_trg_Lightning_Traps = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Lightning_Traps, gg_rct_Region_021 )
call TriggerRegisterEnterRectSimple( gg_trg_Lightning_Traps, gg_rct_Region_022 )
call TriggerRegisterEnterRectSimple( gg_trg_Lightning_Traps, gg_rct_Region_023 )
call TriggerRegisterEnterRectSimple( gg_trg_Lightning_Traps, gg_rct_Region_024 )
call TriggerRegisterEnterRectSimple( gg_trg_Lightning_Traps, gg_rct_Region_025 )
call TriggerAddCondition( gg_trg_Lightning_Traps, Condition( function Trig_Lightning_Traps_Conditions ) )
call TriggerAddAction( gg_trg_Lightning_Traps, function Trig_Lightning_Traps_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Stun_Trap_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local effect b = AddSpecialEffectTarget("Abilities\\Spells\\Human\\Thunderclap\\ThunderclapTarget.mdl", a, "overhead")
call PauseUnit( GetTriggerUnit(), true)
call DisplayTextToPlayer(GetOwningPlayer(a), 0, 0, "You have activated the stun trap!")
call TriggerSleepAction(15.00)
call DestroyEffect(b)
call PauseUnit( GetTriggerUnit(), false)
set a = null
set b = null
endfunction
//===========================================================================
function InitTrig_Stun_Trap takes nothing returns nothing
set gg_trg_Stun_Trap = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Stun_Trap, gg_rct_StunTrap )
call TriggerAddAction( gg_trg_Stun_Trap, function Trig_Stun_Trap_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function AI_Move takes nothing returns nothing
local integer e = 1
loop
exitwhen e > 10
if GetPlayerController(GetOwningPlayer(udg_Hero[e])) == MAP_CONTROL_COMPUTER then
call IssuePointOrder(udg_Hero[e], "attack", GetRandomReal(-10240, 10240), GetRandomReal(-10240, 10240))
endif
set e = e + 1
endloop
call IssuePointOrder(udg_Odin, "attack", GetRandomReal(-10240, 10240), GetRandomReal(-10240, 10240))
endfunction
//===========================================================================
function InitTrig_AI_Move takes nothing returns nothing
set gg_trg_AI_Move = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_AI_Move, 10.00 )
call TriggerAddAction( gg_trg_AI_Move, function AI_Move )
endfunction
//TESH.scrollpos=6
//TESH.alwaysfold=0
function Trig_Ichigo_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'O004' ) ) then
return false
endif
if ( not ( GetPlayerController(GetOwningPlayer(GetTriggerUnit())) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
if ( not ( IsUnitType(GetAttacker(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Ichigo_Actions takes nothing returns nothing
local location a = GetUnitLoc(GetAttacker())
call DisableTrigger( GetTriggeringTrigger() )
if ( GetUnitState(GetTriggerUnit(), UNIT_STATE_MANA) >= 120.00 ) then
call IssuePointOrderLoc( GetTriggerUnit(), "auraunholy", a )
endif
if ( GetUnitState(GetTriggerUnit(), UNIT_STATE_MANA) >= 200.00 ) then
call IssueImmediateOrder( GetTriggerUnit(), "battleroar")
endif
call RemoveLocation(a)
set a = null
call TriggerSleepAction( 6.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Ichigo takes nothing returns nothing
set gg_trg_Ichigo = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ichigo, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Ichigo, Condition( function Trig_Ichigo_Conditions ) )
call TriggerAddAction( gg_trg_Ichigo, function Trig_Ichigo_Actions )
endfunction
//TESH.scrollpos=9
//TESH.alwaysfold=0
function Diablo_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'O009' ) ) then
return false
endif
if ( not ( GetPlayerController(GetOwningPlayer(GetTriggerUnit())) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
if ( not ( IsUnitType(GetAttacker(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Diablo_Actions takes nothing returns nothing
local location a = GetUnitLoc(GetAttacker())
call DisableTrigger( GetTriggeringTrigger() )
if ( GetUnitState(GetTriggerUnit(), UNIT_STATE_MANA) >= 200.00 ) then
call IssuePointOrderLoc( GetTriggerUnit(), "ancestralspirit", a )
call RemoveLocation(a)
set a = null
call TriggerSleepAction( 15.00 )
call EnableTrigger( GetTriggeringTrigger() )
else
call RemoveLocation(a)
set a = null
call EnableTrigger( GetTriggeringTrigger() )
endif
endfunction
//===========================================================================
function InitTrig_Diablo takes nothing returns nothing
set gg_trg_Diablo = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Diablo, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Diablo, Condition( function Diablo_Conditions ) )
call TriggerAddAction( gg_trg_Diablo, function Diablo_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Cloud_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'O00B' ) ) then
return false
endif
if ( not ( GetPlayerController(GetOwningPlayer(GetTriggerUnit())) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
if ( not ( IsUnitType(GetAttacker(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Cloud_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
if ( GetUnitState(GetTriggerUnit(), UNIT_STATE_MANA) >= 200.00 ) then
call IssueTargetOrder( GetTriggerUnit(), "ancestralspirit", GetAttacker() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
else
call EnableTrigger( GetTriggeringTrigger() )
endif
endfunction
//===========================================================================
function InitTrig_Cloud takes nothing returns nothing
set gg_trg_Cloud = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Cloud, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Cloud, Condition( function Cloud_Conditions ) )
call TriggerAddAction( gg_trg_Cloud, function Cloud_Actions )
endfunction
//TESH.scrollpos=6
//TESH.alwaysfold=0
function Phytos_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'O00G' ) ) then
return false
endif
if ( not ( GetPlayerController(GetOwningPlayer(GetTriggerUnit())) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
if ( not ( IsUnitType(GetAttacker(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Phytos_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
if ( GetUnitState(GetTriggerUnit(), UNIT_STATE_MANA) >= 260.00 ) then
call IssueImmediateOrder( GetTriggerUnit(), "channel")
call TriggerSleepAction( 15.00 )
call EnableTrigger( GetTriggeringTrigger() )
else
call EnableTrigger( GetTriggeringTrigger() )
endif
endfunction
//===========================================================================
function InitTrig_Phytos takes nothing returns nothing
set gg_trg_Phytos = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Phytos, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Phytos, Condition( function Phytos_Conditions ) )
call TriggerAddAction( gg_trg_Phytos, function Phytos_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Pyro_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'N008' or GetUnitTypeId(GetTriggerUnit()) == 'N009' ) ) then
return false
endif
if ( not ( GetPlayerController(GetOwningPlayer(GetTriggerUnit())) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
if ( not ( IsUnitType(GetAttacker(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Pyro_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
if ( GetUnitState(GetTriggerUnit(), UNIT_STATE_LIFE) >= 200.00 ) then
call IssueTargetOrder( GetTriggerUnit(), "channel", GetAttacker() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
else
call IssueTargetOrder( GetTriggerUnit(), "channel", GetTriggerUnit() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endif
endfunction
//===========================================================================
function InitTrig_Pyro takes nothing returns nothing
set gg_trg_Pyro = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Pyro, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Pyro, Condition( function Pyro_Conditions ) )
call TriggerAddAction( gg_trg_Pyro, function Pyro_Actions )
endfunction
//TESH.scrollpos=6
//TESH.alwaysfold=0
function Trig_Omnimon_Copy_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) == 'O003' ) ) then
return false
endif
if ( not ( GetPlayerController(GetOwningPlayer(GetSpellTargetUnit())) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
return true
endfunction
function Trig_Omnimon_Copy_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
if ( GetUnitState(GetSpellTargetUnit(), UNIT_STATE_MANA) >= 300.00 ) then
set udg_StartPoint = GetUnitLoc(GetTriggerUnit())
call IssuePointOrderLoc( GetSpellTargetUnit(), "acolyteharvest", udg_StartPoint )
call RemoveLocation(udg_StartPoint)
call TriggerSleepAction( 22.00 )
call EnableTrigger( GetTriggeringTrigger() )
else
call EnableTrigger( GetTriggeringTrigger() )
endif
endfunction
//===========================================================================
function InitTrig_OmnimonSpell takes nothing returns nothing
set gg_trg_OmnimonSpell = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_OmnimonSpell, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_OmnimonSpell, Condition( function Trig_Omnimon_Copy_Conditions ) )
call TriggerAddAction( gg_trg_OmnimonSpell, function Trig_Omnimon_Copy_Actions )
endfunction
//TESH.scrollpos=3
//TESH.alwaysfold=0
function Marluxia_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) == 'O007' ) ) then
return false
endif
if ( not ( GetPlayerController(GetOwningPlayer(GetSpellTargetUnit())) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
return true
endfunction
function Marluxia_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
if ( GetUnitState(GetSpellTargetUnit(), UNIT_STATE_MANA) >= 300.00 ) then
set udg_StartPoint = GetUnitLoc(GetTriggerUnit())
call IssuePointOrderLoc( GetSpellTargetUnit(), "acolyteharvest", udg_StartPoint )
call RemoveLocation(udg_StartPoint)
call TriggerSleepAction( 20.00 )
call EnableTrigger( GetTriggeringTrigger() )
else
call EnableTrigger( GetTriggeringTrigger() )
endif
endfunction
//===========================================================================
function InitTrig_MarluxiaSpell takes nothing returns nothing
set gg_trg_MarluxiaSpell = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MarluxiaSpell, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_MarluxiaSpell, Condition( function Marluxia_Conditions ) )
call TriggerAddAction( gg_trg_MarluxiaSpell, function Marluxia_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Rokhan_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) == 'O00F' ) ) then
return false
endif
if ( not ( GetPlayerController(GetOwningPlayer(GetSpellTargetUnit())) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
return true
endfunction
function Rokhan_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
if ( GetUnitState(GetSpellTargetUnit(), UNIT_STATE_MANA) >= 200.00 ) then
call IssueTargetOrder( GetSpellTargetUnit(), "acidbomb", GetTriggerUnit() )
call TriggerSleepAction( 15.00 )
call EnableTrigger( GetTriggeringTrigger() )
else
call EnableTrigger( GetTriggeringTrigger() )
endif
endfunction
//===========================================================================
function InitTrig_RokhanSpell takes nothing returns nothing
set gg_trg_RokhanSpell = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_RokhanSpell, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_RokhanSpell, Condition( function Rokhan_Conditions ) )
call TriggerAddAction( gg_trg_RokhanSpell, function Rokhan_Actions )
endfunction
//TESH.scrollpos=3
//TESH.alwaysfold=0
function DS_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) == 'O009' ) ) then
return false
endif
if ( not ( GetPlayerController(GetOwningPlayer(GetSpellTargetUnit())) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
return true
endfunction
function DS_Actions takes nothing returns nothing
local location a = GetUnitLoc(GetTriggerUnit())
call DisableTrigger( GetTriggeringTrigger() )
if ( GetUnitState(GetSpellTargetUnit(), UNIT_STATE_MANA) >= 200.00 ) then
call IssuePointOrderLoc( GetSpellTargetUnit(), "ancestralspirit", a )
call RemoveLocation(a)
set a = null
call TriggerSleepAction( 15.00 )
call EnableTrigger( GetTriggeringTrigger() )
else
call RemoveLocation(a)
set a = null
call EnableTrigger( GetTriggeringTrigger() )
endif
endfunction
//===========================================================================
function InitTrig_DiabloSpell takes nothing returns nothing
set gg_trg_DiabloSpell = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DiabloSpell, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_DiabloSpell, Condition( function DS_Conditions ) )
call TriggerAddAction( gg_trg_DiabloSpell, function DS_Actions )
endfunction