Name | Type | is_array | initial_value |
ActivePlayers | player | Yes | |
AI_Research | integer | Yes | |
AI_Stage | integer | Yes | |
AI_UnitSpawnRandom | integer | Yes | |
AIPlayer | player | Yes | |
AmountOfPlayer | integer | No | |
DEBUG_AreaID | texttag | Yes | |
DEBUG_AreaIDBol | boolean | No | |
DEBUG_BaseKillSpawn | location | No | |
DEBUG_BaseKillSpawnerId | integer | No | |
DEBUG_BaseKillTargetId | integer | No | |
DEBUG_PlayerID | texttag | Yes | |
DEBUG_PlayerIDBol | boolean | No | |
DEBUGMODE | boolean | No | false |
DyingPlayer | player | No | |
FirstPlayerDefeat | boolean | No | |
FutureAgeUnit | unitcode | Yes | |
IdlePlayer | player | Yes | |
IncomeUnitRegion | rect | Yes | |
KillingPlayer | player | No | |
MainBaseR | rect | Yes | |
MedievalAgeUnit | unitcode | Yes | |
MidFuturisticAgeUnit | unitcode | Yes | |
ModernAgeUnit | unitcode | Yes | |
OpposingBaseR | rect | Yes | |
PlayerArea | rect | Yes | |
PlayerEnemy | integer | Yes | |
PlayerName | string | Yes | |
PlayerOpposition | rect | Yes | |
PlayerOppositionP | player | Yes | |
PlayerTower | rect | Yes | |
RennaissanceAgeUnit | unitcode | Yes | |
SpartianlAgeUnit | unitcode | Yes | |
SpecAbiUnit | unitcode | Yes | |
SpecUnitRegion | rect | Yes | |
StoneAgeUnit | unitcode | Yes | |
TempInt | integer | No | 1 |
TempLoc | location | No | |
UnitBase | unit | Yes | |
UnitStopSpawn | boolean | Yes | |
UnitTrained | integer | Yes | |
UpgradeCenterR | rect | Yes |
function Trig_Player_Respawn_Actions takes nothing returns nothing
local integer i = 0
local integer countU = 0
local boolean isFound = false
local group ug = CreateGroup()
if(udg_IdlePlayer[0] != null and udg_IdlePlayer[1] != null) then
loop
exitwhen i == 9
set i = i + 1
call GroupEnumUnitsInRect(ug, udg_PlayerArea[i], null)
set countU = CountUnitsInGroup(ug)
if(countU == 0) then
set isFound = true
endif
exitwhen isFound == true
endloop
if(i == 1 or i == 3) then
set udg_PlayerEnemy[GetConvertedPlayerId(udg_IdlePlayer[0])] = 1
set udg_PlayerEnemy[GetConvertedPlayerId(udg_IdlePlayer[1])] = 3
call ConditionalTriggerExecute(gg_trg_Player_Respawn_2)
elseif(i == 2 or i == 4) then
set udg_PlayerEnemy[GetConvertedPlayerId(udg_IdlePlayer[0])] = 2
set udg_PlayerEnemy[GetConvertedPlayerId(udg_IdlePlayer[1])] = 4
call ConditionalTriggerExecute(gg_trg_Player_Respawn_2)
elseif(i == 5 or i == 8) then
set udg_PlayerEnemy[GetConvertedPlayerId(udg_IdlePlayer[0])] = 5
set udg_PlayerEnemy[GetConvertedPlayerId(udg_IdlePlayer[1])] = 8
call ConditionalTriggerExecute(gg_trg_Player_Respawn_2)
elseif(i == 6 or i == 7) then
set udg_PlayerEnemy[GetConvertedPlayerId(udg_IdlePlayer[0])] = 6
set udg_PlayerEnemy[GetConvertedPlayerId(udg_IdlePlayer[1])] = 7
call ConditionalTriggerExecute(gg_trg_Player_Respawn_2)
endif
endif
call DestroyGroup(ug)
endfunction
//===========================================================================
function InitTrig_Player_Respawn takes nothing returns nothing
set gg_trg_Player_Respawn = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Player_Respawn, 5.00 )
call TriggerAddAction( gg_trg_Player_Respawn, function Trig_Player_Respawn_Actions )
endfunction
function Trig_Meteor_Strike_Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00C' ) ) then
return false
endif
return true
endfunction
function Trig_Meteor_Strike_Conditions takes nothing returns boolean
if ( not Trig_Meteor_Strike_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Meteor_Strike_Func002Func001C takes nothing returns boolean
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(0) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 100 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(1) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 100 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(2) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 100 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(3) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 100 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(4) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 100 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(5) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 100 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(6) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 100 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(7) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 100 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(8) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 100 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(9) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 100 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(10) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 100 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(11) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 100 ) ) then
return true
endif
return false
endfunction
function Trig_Meteor_Strike_Func002C takes nothing returns boolean
if ( not Trig_Meteor_Strike_Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Meteor_Strike_Actions takes nothing returns nothing
local unit MS_Caster = null
local integer MS_LoopTime = 0
local unit MS_PickedUnit = null
local group array MS_Group
local location array MS_AttackLoc
local effect array MS_Effect
set MS_Caster = GetSpellAbilityUnit()
if ( Trig_Meteor_Strike_Func002C() ) then
call AdjustPlayerStateBJ( -100, GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER )
loop
set MS_LoopTime = MS_LoopTime + 1
exitwhen MS_LoopTime >= 8
set MS_AttackLoc[0] = GetRandomLocInRect(udg_PlayerArea[udg_PlayerEnemy[GetPlayerId(GetOwningPlayer(MS_Caster)) + 1]])
set MS_AttackLoc[1] = GetRandomLocInRect(udg_PlayerArea[udg_PlayerEnemy[GetPlayerId(GetOwningPlayer(MS_Caster)) + 1]])
set MS_AttackLoc[2] = GetRandomLocInRect(udg_PlayerArea[udg_PlayerEnemy[GetPlayerId(GetOwningPlayer(MS_Caster)) + 1]])
set MS_AttackLoc[3] = GetRandomLocInRect(udg_PlayerArea[udg_PlayerEnemy[GetPlayerId(GetOwningPlayer(MS_Caster)) + 1]])
set MS_AttackLoc[4] = GetRandomLocInRect(udg_PlayerArea[udg_PlayerEnemy[GetPlayerId(GetOwningPlayer(MS_Caster)) + 1]])
set MS_Effect[0] = AddSpecialEffectLocBJ(MS_AttackLoc[0], "Units\\Demon\\Infernal\\InfernalBirth.mdl")
set MS_Effect[1] = AddSpecialEffectLocBJ(MS_AttackLoc[1], "Units\\Demon\\Infernal\\InfernalBirth.mdl")
set MS_Effect[2] = AddSpecialEffectLocBJ(MS_AttackLoc[2], "Units\\Demon\\Infernal\\InfernalBirth.mdl")
set MS_Effect[3] = AddSpecialEffectLocBJ(MS_AttackLoc[3], "Units\\Demon\\Infernal\\InfernalBirth.mdl")
set MS_Effect[4] = AddSpecialEffectLocBJ(MS_AttackLoc[4], "Units\\Demon\\Infernal\\InfernalBirth.mdl")
set MS_Group[0] = CreateGroup()
set MS_Group[1] = CreateGroup()
set MS_Group[2] = CreateGroup()
set MS_Group[3] = CreateGroup()
set MS_Group[4] = CreateGroup()
call PolledWait(0.5)
/*Function Here*/
call GroupEnumUnitsInRangeOfLoc(MS_Group[0], MS_AttackLoc[0], 256, null)
call GroupEnumUnitsInRangeOfLoc(MS_Group[1], MS_AttackLoc[1], 256, null)
call GroupEnumUnitsInRangeOfLoc(MS_Group[2], MS_AttackLoc[2], 256, null)
call GroupEnumUnitsInRangeOfLoc(MS_Group[3], MS_AttackLoc[3], 256, null)
call GroupEnumUnitsInRangeOfLoc(MS_Group[4], MS_AttackLoc[4], 256, null)
loop
set MS_PickedUnit = FirstOfGroup(MS_Group[0])
exitwhen MS_PickedUnit == null
if (GetOwningPlayer(MS_PickedUnit) != GetOwningPlayer(MS_Caster) and not IsUnitType(MS_PickedUnit, UNIT_TYPE_STRUCTURE)) then
call UnitDamageTarget(MS_Caster, MS_PickedUnit, 50, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_FIRE, null)
endif
call GroupRemoveUnit(MS_Group[0], MS_PickedUnit)
endloop
loop
set MS_PickedUnit = FirstOfGroup(MS_Group[1])
exitwhen MS_PickedUnit == null
if (GetOwningPlayer(MS_PickedUnit) != GetOwningPlayer(MS_Caster) and not IsUnitType(MS_PickedUnit, UNIT_TYPE_STRUCTURE)) then
call UnitDamageTarget(MS_Caster, MS_PickedUnit, 50, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_FIRE, null)
endif
call GroupRemoveUnit(MS_Group[1], MS_PickedUnit)
endloop
loop
set MS_PickedUnit = FirstOfGroup(MS_Group[2])
exitwhen MS_PickedUnit == null
if (GetOwningPlayer(MS_PickedUnit) != GetOwningPlayer(MS_Caster) and not IsUnitType(MS_PickedUnit, UNIT_TYPE_STRUCTURE)) then
call UnitDamageTarget(MS_Caster, MS_PickedUnit, 50, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_FIRE, null)
endif
call GroupRemoveUnit(MS_Group[2], MS_PickedUnit)
endloop
loop
set MS_PickedUnit = FirstOfGroup(MS_Group[3])
exitwhen MS_PickedUnit == null
if (GetOwningPlayer(MS_PickedUnit) != GetOwningPlayer(MS_Caster) and not IsUnitType(MS_PickedUnit, UNIT_TYPE_STRUCTURE)) then
call UnitDamageTarget(MS_Caster, MS_PickedUnit, 50, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_FIRE, null)
endif
call GroupRemoveUnit(MS_Group[3], MS_PickedUnit)
endloop
loop
set MS_PickedUnit = FirstOfGroup(MS_Group[4])
exitwhen MS_PickedUnit == null
if (GetOwningPlayer(MS_PickedUnit) != GetOwningPlayer(MS_Caster) and not IsUnitType(MS_PickedUnit, UNIT_TYPE_STRUCTURE)) then
call UnitDamageTarget(MS_Caster, MS_PickedUnit, 50, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_FIRE, null)
endif
call GroupRemoveUnit(MS_Group[4], MS_PickedUnit)
endloop
/*Function Here*/
call RemoveLocation(MS_AttackLoc[0])
call RemoveLocation(MS_AttackLoc[1])
call RemoveLocation(MS_AttackLoc[2])
call RemoveLocation(MS_AttackLoc[3])
call RemoveLocation(MS_AttackLoc[4])
call DestroyEffect(MS_Effect[0])
call DestroyEffect(MS_Effect[1])
call DestroyEffect(MS_Effect[2])
call DestroyEffect(MS_Effect[3])
call DestroyEffect(MS_Effect[4])
call DestroyGroup(MS_Group[0])
call DestroyGroup(MS_Group[1])
call DestroyGroup(MS_Group[2])
call DestroyGroup(MS_Group[3])
call DestroyGroup(MS_Group[4])
call PolledWait(.8)
endloop
else
call PolledWait(0.01)
call UnitResetCooldown(MS_Caster)
endif
endfunction
//===========================================================================
function InitTrig_Meteor_Strike takes nothing returns nothing
set gg_trg_Meteor_Strike = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Meteor_Strike, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Meteor_Strike, Condition( function Trig_Meteor_Strike_Conditions ) )
call TriggerAddAction( gg_trg_Meteor_Strike, function Trig_Meteor_Strike_Actions )
endfunction
function Trig_Sky_Bash_Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A004' ) ) then
return false
endif
return true
endfunction
function Trig_Sky_Bash_Conditions takes nothing returns boolean
if ( not Trig_Sky_Bash_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Sky_Bash_Func002Func001C takes nothing returns boolean
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(0) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 700 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(1) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 700 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(2) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 700 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(3) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 700 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(4) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 700 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(5) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 700 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(6) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 700 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(7) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 700 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(8) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 700 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(9) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 700 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(10) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 700 ) ) then
return true
endif
if ( ( GetOwningPlayer(GetSpellAbilityUnit()) == Player(11) ) and ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER) >= 700 ) ) then
return true
endif
return false
endfunction
function Trig_Sky_Bash_Func002C takes nothing returns boolean
if ( not Trig_Sky_Bash_Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Sky_Bash_Actions takes nothing returns nothing
local unit GR = null
local group GR_DamageGroup = null
local location GR_AttackLoc = null
local effect GR_Effect = null
local unit GR_PickedUnit = null
local unit GR_Caster = GetSpellAbilityUnit()
if ( Trig_Sky_Bash_Func002C() ) then
call AdjustPlayerStateBJ( -700, GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_LUMBER )
call CreateNUnitsAtLoc( 1, 'h01T', GetOwningPlayer(GetSpellAbilityUnit()), GetRectCenter(udg_SpecUnitRegion[udg_PlayerEnemy[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))]]), bj_UNIT_FACING )
set GR = GetLastCreatedUnit()
call SetUnitUserData(GR, udg_PlayerEnemy[GetConvertedPlayerId(GetOwningPlayer(GR))])
call IssuePointOrderLocBJ( GR, "move", GetRectCenter(udg_PlayerOpposition[udg_PlayerEnemy[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))]]) )
loop
exitwhen GetUnitState(GR, UNIT_STATE_LIFE) <= 0
set GR_AttackLoc = GetUnitLoc(GR)
set GR_Effect = AddSpecialEffectLocBJ( GR_AttackLoc, "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl" )
set GR_DamageGroup = CreateGroup()
call GroupEnumUnitsInRangeOfLoc(GR_DamageGroup, GR_AttackLoc, 256, null)
loop
set GR_PickedUnit = FirstOfGroup(GR_DamageGroup)
exitwhen GR_PickedUnit == null
if( (GetOwningPlayer(GR_PickedUnit) != GetOwningPlayer(GR) and GetUnitTypeId(GR_PickedUnit) != 'h01T' ) and not IsUnitType(GR_PickedUnit, UNIT_TYPE_STRUCTURE)) then
call UnitDamageTarget(GR, GR_PickedUnit, 200, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_LIGHTNING, null)
endif
call GroupRemoveUnit(GR_DamageGroup, GR_PickedUnit)
endloop
call DestroyGroup(GR_DamageGroup)
call DestroyEffect(GR_Effect)
call RemoveLocation(GR_AttackLoc)
call PolledWait(1)
endloop
else
call PolledWait(.01)
call UnitResetCooldown(GR_Caster)
endif
endfunction
//===========================================================================
function InitTrig_Sky_Bash takes nothing returns nothing
set gg_trg_Sky_Bash = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Sky_Bash, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Sky_Bash, Condition( function Trig_Sky_Bash_Conditions ) )
call TriggerAddAction( gg_trg_Sky_Bash, function Trig_Sky_Bash_Actions )
endfunction