Name | Type | is_array | initial_value |
GateHP | real | Yes | 0 |
Humans | force | No | |
LadderDistance | real | No | 0 |
Orcs | force | No | |
PowerStrikePoint | location | No | |
Seconds | real | No | 0 |
TempPlayer | player | No | |
TempPoint | location | No | |
TempUnit | unit | No | |
Timer | timer | No |
function Trig_Hexing_Shield_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'B000') == true ) ) then
return false
endif
return true
endfunction
function Trig_Hexing_Shield_Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 100) <= 15 ) ) then
return false
endif
return true
endfunction
function Trig_Hexing_Shield_Actions takes nothing returns nothing
if ( Trig_Hexing_Shield_Func001C() ) then
call CreateNUnitsAtLoc( 1, 'h001', GetOwningPlayer(GetAttackedUnitBJ()), GetUnitLoc(GetAttackedUnitBJ()), bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 3.00, 'BTLF', GetLastCreatedUnit() )
call UnitAddAbilityBJ( 'A006', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "hex", GetAttacker() )
else
endif
endfunction
//===========================================================================
function InitTrig_Hexing_Shield takes nothing returns nothing
set gg_trg_Hexing_Shield = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hexing_Shield, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Hexing_Shield, Condition( function Trig_Hexing_Shield_Conditions ) )
call TriggerAddAction( gg_trg_Hexing_Shield, function Trig_Hexing_Shield_Actions )
endfunction
function Trig_Power_Strike_JASS_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00D' ) ) then
return false
endif
return true
endfunction
function Trig_Power_Strike_JASS_Actions takes nothing returns nothing
call TriggerSleepAction( 0.01 )
call SetUnitAnimation( GetTriggerUnit(), "channel" )
call TriggerSleepAction( 0.20 )
call SetUnitTimeScalePercent( GetTriggerUnit(), 12.00 )
call TriggerSleepAction( 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", GetTriggerUnit(), "Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl" )
call TriggerSleepAction( 1.00 )
call SetUnitTimeScalePercent( GetTriggerUnit(), 100.00 )
set udg_PowerStrikePoint = PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 60.00, GetUnitFacing(GetTriggerUnit()))
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 4
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'h001', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(udg_PowerStrikePoint, ( 200.00 * ( I2R(GetForLoopIndexA()) - 1 ) ), GetUnitFacing(GetTriggerUnit())), GetUnitFacing(GetTriggerUnit()) )
call UnitAddAbilityBJ( 'A00C', GetLastCreatedUnit() )
call UnitApplyTimedLifeBJ( 3.00, 'BTLF', GetLastCreatedUnit() )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "stomp" )
call AddSpecialEffectLocBJ( GetUnitLoc(GetLastCreatedUnit()), "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call AddSpecialEffectLocBJ( GetUnitLoc(GetLastCreatedUnit()), "Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Power_Strike_JASS takes nothing returns nothing
set gg_trg_Power_Strike_JASS = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Power_Strike_JASS, EVENT_PLAYER_UNIT_SPELL_CHANNEL )
call TriggerAddCondition( gg_trg_Power_Strike_JASS, Condition( function Trig_Power_Strike_JASS_Conditions ) )
call TriggerAddAction( gg_trg_Power_Strike_JASS, function Trig_Power_Strike_JASS_Actions )
endfunction
function Trig_Open_Gates_Func001Func001C takes nothing returns boolean
if ( not ( GetEventPlayerChatString() == "-open inner" ) ) then
return false
endif
if ( not ( IsDestructableAliveBJ(gg_dest_B001_0321) == true ) ) then
return false
endif
return true
endfunction
function Trig_Open_Gates_Func001Func002Func001C takes nothing returns boolean
if ( not ( GetEventPlayerChatString() == "-open main" ) ) then
return false
endif
if ( not ( IsDestructableAliveBJ(gg_dest_B000_0000) == true ) ) then
return false
endif
return true
endfunction
function Trig_Open_Gates_Func001Func002C takes nothing returns boolean
if ( not Trig_Open_Gates_Func001Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Open_Gates_Func001C takes nothing returns boolean
if ( not Trig_Open_Gates_Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Open_Gates_Actions takes nothing returns nothing
if ( Trig_Open_Gates_Func001C() ) then
set udg_GateHP[1] = GetDestructableLife(gg_dest_B001_0321)
call SetDestructableInvulnerableBJ( gg_dest_B001_0321, true )
call ModifyGateBJ( bj_GATEOPERATION_OPEN, gg_dest_B001_0321 )
else
if ( Trig_Open_Gates_Func001Func002C() ) then
set udg_GateHP[2] = GetDestructableLife(gg_dest_B000_0000)
call SetDestructableInvulnerableBJ( gg_dest_B000_0000, true )
call ModifyGateBJ( bj_GATEOPERATION_OPEN, gg_dest_B000_0000 )
else
call DoNothing( )
endif
endif
endfunction
//===========================================================================
function InitTrig_Open_Gates takes nothing returns nothing
set gg_trg_Open_Gates = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Open_Gates, Player(0), "-open ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Open_Gates, Player(1), "-open ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Open_Gates, Player(2), "-open ", false )
call TriggerAddAction( gg_trg_Open_Gates, function Trig_Open_Gates_Actions )
endfunction
function Trig_Close_Gates_Func001Func001C takes nothing returns boolean
if ( not ( IsDestructableAliveBJ(gg_dest_B001_0321) == false ) ) then
return false
endif
if ( not ( GetEventPlayerChatString() == "-close inner" ) ) then
return false
endif
return true
endfunction
function Trig_Close_Gates_Func001Func002Func001C takes nothing returns boolean
if ( not ( IsDestructableAliveBJ(gg_dest_B000_0000) == false ) ) then
return false
endif
if ( not ( GetEventPlayerChatString() == "-close main" ) ) then
return false
endif
return true
endfunction
function Trig_Close_Gates_Func001Func002C takes nothing returns boolean
if ( not Trig_Close_Gates_Func001Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Close_Gates_Func001C takes nothing returns boolean
if ( not Trig_Close_Gates_Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Close_Gates_Actions takes nothing returns nothing
if ( Trig_Close_Gates_Func001C() ) then
call ModifyGateBJ( bj_GATEOPERATION_CLOSE, gg_dest_B001_0321 )
call SetDestructableLife( gg_dest_B001_0321, udg_GateHP[1] )
call SetDestructableInvulnerableBJ( gg_dest_B001_0321, false )
else
if ( Trig_Close_Gates_Func001Func002C() ) then
call ModifyGateBJ( bj_GATEOPERATION_CLOSE, gg_dest_B000_0000 )
call SetDestructableLife( gg_dest_B000_0000, udg_GateHP[2] )
call SetDestructableInvulnerableBJ( gg_dest_B000_0000, false )
else
call DoNothing( )
endif
endif
endfunction
//===========================================================================
function InitTrig_Close_Gates takes nothing returns nothing
set gg_trg_Close_Gates = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Close_Gates, Player(0), "-close ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Close_Gates, Player(1), "-close ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Close_Gates, Player(2), "-close ", false )
call TriggerAddAction( gg_trg_Close_Gates, function Trig_Close_Gates_Actions )
endfunction
function Trig_Gate_Dies_Conditions takes nothing returns boolean
if ( not ( IsDestructableInvulnerableBJ(GetDyingDestructable()) == false ) ) then
return false
endif
return true
endfunction
function Trig_Gate_Dies_Func002C takes nothing returns boolean
if ( not ( GetDyingDestructable() == gg_dest_B001_0321 ) ) then
return false
endif
return true
endfunction
function Trig_Gate_Dies_Actions takes nothing returns nothing
if ( Trig_Gate_Dies_Func002C() ) then
set udg_GateHP[1] = 0.00
else
set udg_GateHP[2] = 0.00
endif
endfunction
//===========================================================================
function InitTrig_Gate_Dies takes nothing returns nothing
set gg_trg_Gate_Dies = CreateTrigger( )
call TriggerRegisterDeathEvent( gg_trg_Gate_Dies, gg_dest_B001_0321 )
call TriggerRegisterDeathEvent( gg_trg_Gate_Dies, gg_dest_B000_0000 )
call TriggerAddCondition( gg_trg_Gate_Dies, Condition( function Trig_Gate_Dies_Conditions ) )
call TriggerAddAction( gg_trg_Gate_Dies, function Trig_Gate_Dies_Actions )
endfunction
function Trig_Income_Func001001001 takes nothing returns boolean
return ( IsPlayerInForce(GetFilterPlayer(), udg_Humans) == true )
endfunction
function Trig_Income_Func001A takes nothing returns nothing
call AdjustPlayerStateBJ( 1, GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 3, GetEnumPlayer(), PLAYER_STATE_RESOURCE_LUMBER )
endfunction
function Trig_Income_Actions takes nothing returns nothing
call ForForce( GetPlayersMatching(Condition(function Trig_Income_Func001001001)), function Trig_Income_Func001A )
endfunction
//===========================================================================
function InitTrig_Income takes nothing returns nothing
set gg_trg_Income = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Income, 3.00 )
call TriggerAddAction( gg_trg_Income, function Trig_Income_Actions )
endfunction
function Trig_Player_Leaves_Func003A takes nothing returns nothing
call SetPlayerAllianceStateBJ( GetEnumPlayer(), GetTriggerPlayer(), bj_ALLIANCE_ALLIED_ADVUNITS )
call SetPlayerAllianceStateBJ( GetTriggerPlayer(), GetEnumPlayer(), bj_ALLIANCE_ALLIED_ADVUNITS )
endfunction
function Trig_Player_Leaves_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), ( ( "|cffff0000" + GetPlayerName(GetTriggerPlayer()) ) + " has left the game!|r" ) )
call PlaySoundBJ( gg_snd_Warning )
call ForForce( GetPlayersAllies(GetTriggerPlayer()), function Trig_Player_Leaves_Func003A )
endfunction
//===========================================================================
function InitTrig_Player_Leaves takes nothing returns nothing
set gg_trg_Player_Leaves = CreateTrigger( )
call TriggerRegisterPlayerEventLeave( gg_trg_Player_Leaves, Player(0) )
call TriggerRegisterPlayerEventLeave( gg_trg_Player_Leaves, Player(1) )
call TriggerRegisterPlayerEventLeave( gg_trg_Player_Leaves, Player(2) )
call TriggerRegisterPlayerEventLeave( gg_trg_Player_Leaves, Player(3) )
call TriggerRegisterPlayerEventLeave( gg_trg_Player_Leaves, Player(4) )
call TriggerRegisterPlayerEventLeave( gg_trg_Player_Leaves, Player(5) )
call TriggerAddAction( gg_trg_Player_Leaves, function Trig_Player_Leaves_Actions )
endfunction
function Trig_Reset_Cam_Actions takes nothing returns nothing
call SetCameraFieldForPlayer( GetTriggerPlayer(), CAMERA_FIELD_TARGET_DISTANCE, 2100.00, 1.00 )
endfunction
//===========================================================================
function InitTrig_Reset_Cam takes nothing returns nothing
set gg_trg_Reset_Cam = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Reset_Cam, Player(0), "-reset", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Reset_Cam, Player(1), "-reset", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Reset_Cam, Player(2), "-reset", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Reset_Cam, Player(3), "-reset", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Reset_Cam, Player(4), "-reset", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Reset_Cam, Player(5), "-reset", true )
call TriggerAddAction( gg_trg_Reset_Cam, function Trig_Reset_Cam_Actions )
endfunction
function Trig_Revive_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Revive_Func003C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetOwningPlayer(GetDyingUnit()), udg_Orcs) == true ) ) then
return false
endif
return true
endfunction
function Trig_Revive_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetDyingUnit())), "TRIGSTR_319" )
call TriggerSleepAction( 120.00 )
if ( Trig_Revive_Func003C() ) then
call ReviveHeroLoc( GetDyingUnit(), GetRectCenter(gg_rct_Orcs_Revive), true )
call SetHeroLevelBJ( GetDyingUnit(), 1, false )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetDyingUnit())), "TRIGSTR_462" )
else
call ReviveHeroLoc( GetDyingUnit(), GetRectCenter(gg_rct_Humans_Revive), true )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetDyingUnit())), "TRIGSTR_463" )
endif
endfunction
//===========================================================================
function InitTrig_Revive takes nothing returns nothing
set gg_trg_Revive = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Revive, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Revive, Condition( function Trig_Revive_Conditions ) )
call TriggerAddAction( gg_trg_Revive, function Trig_Revive_Actions )
endfunction
function Trig_Start_Func001Func003A takes nothing returns nothing
call SetUnitMoveSpeed( GetEnumUnit(), 0.00 )
call SetUnitInvulnerable( GetEnumUnit(), true )
endfunction
function Trig_Start_Func001A takes nothing returns nothing
call SetCameraTargetControllerNoZForPlayer( GetEnumPlayer(), gg_unit_O00E_0193, 0, 0, false )
call SetCameraFieldForPlayer( GetEnumPlayer(), CAMERA_FIELD_TARGET_DISTANCE, 1100.00, 0.00 )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Starting_Rect, GetEnumPlayer()), function Trig_Start_Func001Func003A )
endfunction
function Trig_Start_Func006Func003A takes nothing returns nothing
call SetUnitMoveSpeed( GetEnumUnit(), GetUnitDefaultMoveSpeed(GetEnumUnit()) )
call SetUnitInvulnerable( GetEnumUnit(), false )
endfunction
function Trig_Start_Func006A takes nothing returns nothing
call ResetToGameCameraForPlayer( GetEnumPlayer(), 0.00 )
call SetCameraFieldForPlayer( GetEnumPlayer(), CAMERA_FIELD_TARGET_DISTANCE, 2100.00, 2.00 )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Starting_Rect, GetEnumPlayer()), function Trig_Start_Func006Func003A )
endfunction
function Trig_Start_Actions takes nothing returns nothing
call ForForce( udg_Humans, function Trig_Start_Func001A )
call TriggerSleepAction( 3.00 )
call TransmissionFromUnitWithNameBJ( udg_Humans, gg_unit_O00E_0193, "TRIGSTR_270", null, "TRIGSTR_269", bj_TIMETYPE_SET, 7.00, true )
call TransmissionFromUnitWithNameBJ( udg_Humans, gg_unit_H004_0194, "TRIGSTR_271", null, "TRIGSTR_272", bj_TIMETYPE_SET, 7.00, true )
call TransmissionFromUnitWithNameBJ( udg_Humans, gg_unit_O00E_0193, "TRIGSTR_273", null, "TRIGSTR_274", bj_TIMETYPE_SET, 5.00, true )
call ForForce( udg_Humans, function Trig_Start_Func006A )
call TriggerSleepAction( 2.00 )
call QuestMessageBJ( udg_Humans, bj_QUESTMESSAGE_DISCOVERED, "TRIGSTR_320" )
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_332", "TRIGSTR_333", "ReplaceableTextures\\CommandButtons\\BTNFootman.blp" )
endfunction
//===========================================================================
function InitTrig_Start takes nothing returns nothing
set gg_trg_Start = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Start, 0.01 )
call TriggerAddAction( gg_trg_Start, function Trig_Start_Actions )
endfunction