Name | Type | is_array | initial_value |
Angle_A | real | No | |
Ankh | boolean | Yes | true |
Balls | unit | Yes | |
BallsGrabbed | boolean | Yes | |
BallThrower | unit | Yes | |
Barrier | unit | Yes | |
Barrier_Position | location | Yes | |
BarrierAngle | real | Yes | |
BarrierDistance | integer | Yes | |
Diceroll | integer | No | |
Drunk_Offset | real | No | |
Effect | effect | Yes | |
Evoked_Ball | unit | Yes | |
FlameBallEffect | unit | Yes | |
FlameBalls | group | No | |
Heat_Dist | real | Yes | 1000000000.00 |
Heat_Seeking_Ball | unit | No | |
HeldBalls | group | No | |
Hero | unit | Yes | |
HomingBalls | group | No | |
Invulnerable | boolean | Yes | false |
KillRadius | real | No | 80.00 |
LocalInt | integer | No | |
Lowest_Dist | real | No | 100000000.00 |
Matches_Remaining | integer | No | 2 |
Nearest_Player | integer | No | |
nPlayers | integer | No | |
nRounds | integer | No | |
nTeam1Players | integer | No | |
nTeam2Players | integer | No | |
nThrownBalls | integer | No | 0 |
OutPlayerNumber1 | integer | Yes | |
OutPlayerNumber2 | integer | Yes | |
OutUnit1 | unit | Yes | |
OutUnit2 | unit | Yes | |
PlayerGrabbing | unit | Yes | |
PlayerHoldingBall | boolean | Yes | |
Players | unit | Yes | |
PlayersOut | integer | Yes | |
PowerBalls | group | No | |
PowerEffect | effect | Yes | |
RecentlyBounced | group | No | |
RoundDialog | dialog | No | |
Selected_Unit | unit | No | |
SelectedInt | integer | No | |
Team_Points | integer | Yes | 0 |
tempGroup | group | No | |
tempPoint | location | No | |
tempPoint1 | location | No | |
tempPoint2 | location | No | |
tempx | integer | No | |
tempy | integer | No | |
ThrownBallAngles | real | Yes | |
ThrownBalls | unit | Yes | |
ThrowTargets | location | Yes | |
Uncatchable | group | No |
function Trig_CatchBall_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00B' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) == 'n008' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetSpellTargetUnit(), udg_Uncatchable) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetSpellTargetUnit(), udg_PowerBalls) == false ) ) then
return false
endif
return true
endfunction
function Trig_CatchBall_Func002Func001Func001Func001C takes nothing returns boolean
if ( ( IsPlayerAlly(GetOwningPlayer(GetSpellAbilityUnit()), GetOwningPlayer(udg_BallThrower[GetForLoopIndexA()])) == true ) ) then
return true
endif
if ( ( IsUnitDeadBJ(GetSpellAbilityUnit()) == true ) ) then
return true
endif
return false
endfunction
function Trig_CatchBall_Func002Func001Func001C takes nothing returns boolean
if ( not Trig_CatchBall_Func002Func001Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_CatchBall_Func002Func001C takes nothing returns boolean
if ( not ( udg_ThrownBalls[GetForLoopIndexA()] == GetSpellTargetUnit() ) ) then
return false
endif
return true
endfunction
function Trig_CatchBall_Func003Func013C takes nothing returns boolean
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(0) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(1) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(2) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(3) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(4) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(5) ) ) then
return true
endif
return false
endfunction
function Trig_CatchBall_Func003C takes nothing returns boolean
if ( not Trig_CatchBall_Func003Func013C() ) then
return false
endif
if ( not ( udg_PlayersOut[1] >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_CatchBall_Func004Func013C takes nothing returns boolean
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(6) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(7) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(8) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(9) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(10) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(11) ) ) then
return true
endif
return false
endfunction
function Trig_CatchBall_Func004C takes nothing returns boolean
if ( not Trig_CatchBall_Func004Func013C() ) then
return false
endif
if ( not ( udg_PlayersOut[2] >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_CatchBall_Actions takes nothing returns nothing
local unit x
call SetUnitUserData( GetSpellTargetUnit(), 0 )
set bj_forLoopAIndex = 0
set bj_forLoopAIndexEnd = ( udg_nThrownBalls - 1 )
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_CatchBall_Func002Func001C() ) then
if ( Trig_CatchBall_Func002Func001Func001C() ) then
return
else
endif
set udg_Selected_Unit = udg_BallThrower[GetForLoopIndexA()]
call TriggerExecute( gg_trg_Explode )
set udg_BallThrower[GetForLoopIndexA()] = null
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_CatchBall_Func003C() ) then
set x = udg_OutUnit1[1]
set udg_Invulnerable[GetConvertedPlayerId(GetOwningPlayer(x))] = true
call ReviveHeroLoc( x, GetUnitLoc(x), true )
call SetUnitInvulnerable( x, true )
call AddSpecialEffectTargetUnitBJ( "overhead", x, "Abilities\\Spells\\Orc\\Voodoo\\VoodooAuraTarget.mdl" )
set udg_Effect[GetConvertedPlayerId(GetOwningPlayer(x))] = GetLastCreatedEffectBJ()
set bj_forLoopAIndex = 2
set bj_forLoopAIndexEnd = udg_PlayersOut[1]
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_OutPlayerNumber1[GetForLoopIndexA()] = ( udg_OutPlayerNumber1[GetForLoopIndexA()] - 1 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_nTeam1Players = ( udg_nTeam1Players + 1 )
set udg_PlayersOut[1] = ( udg_PlayersOut[1] - 1 )
call PolledWait( 10.00 )
set udg_Invulnerable[GetConvertedPlayerId(GetOwningPlayer(x))] = false
call SetUnitInvulnerable( x, false )
call DestroyEffectBJ( udg_Effect[GetConvertedPlayerId(GetOwningPlayer(x))] )
else
endif
if ( Trig_CatchBall_Func004C() ) then
set x = udg_OutUnit2[1]
set udg_Invulnerable[GetConvertedPlayerId(GetOwningPlayer(x))] = true
call ReviveHeroLoc( x, GetUnitLoc(x), true )
call SetUnitInvulnerable( x, true )
call AddSpecialEffectTargetUnitBJ( "overhead", x, "Abilities\\Spells\\Orc\\Voodoo\\VoodooAuraTarget.mdl" )
set udg_Effect[GetConvertedPlayerId(GetOwningPlayer(x))] = GetLastCreatedEffectBJ()
set bj_forLoopAIndex = 2
set bj_forLoopAIndexEnd = udg_PlayersOut[2]
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_OutPlayerNumber2[GetForLoopIndexA()] = ( udg_OutPlayerNumber2[GetForLoopIndexA()] - 1 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_nTeam2Players = ( udg_nTeam2Players + 1 )
set udg_PlayersOut[2] = ( udg_PlayersOut[2] - 1 )
call PolledWait( 10.00 )
set udg_Invulnerable[GetConvertedPlayerId(GetOwningPlayer(x))] = false
call SetUnitInvulnerable( x, false )
call DestroyEffectBJ( udg_Effect[GetConvertedPlayerId(GetOwningPlayer(x))] )
else
endif
endfunction
//===========================================================================
function InitTrig_CatchBall takes nothing returns nothing
set gg_trg_CatchBall = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_CatchBall, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_CatchBall, Condition( function Trig_CatchBall_Conditions ) )
call TriggerAddAction( gg_trg_CatchBall, function Trig_CatchBall_Actions )
endfunction
function Trig_Construct_Barrier_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'oeye' ) ) then
return false
endif
return true
endfunction
function Trig_Construct_Barrier_Actions takes nothing returns nothing
local integer x
set x = GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))
call SetUnitPositionLoc( udg_Barrier[x], GetUnitLoc(GetSummonedUnit()) )
call ShowUnitShow( udg_Barrier[x] )
call RemoveUnit( GetSummonedUnit() )
call PolledWait( 60.00 )
call SetUnitPositionLoc( udg_Barrier[x], GetRandomLocInRect(gg_rct_Barrier_Place) )
call ShowUnitHide( udg_Barrier[x] )
endfunction
//===========================================================================
function InitTrig_Construct_Barrier takes nothing returns nothing
set gg_trg_Construct_Barrier = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Construct_Barrier, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Construct_Barrier, Condition( function Trig_Construct_Barrier_Conditions ) )
call TriggerAddAction( gg_trg_Construct_Barrier, function Trig_Construct_Barrier_Actions )
endfunction