Initial commit

This commit is contained in:
2026-02-28 14:00:45 -06:00
commit 16d3170787
1134 changed files with 589134 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/GenerateMagicSpaceDefense.lua#1 $
--/////////////////////////////////////////////////////////////////////////////////////////////////
--
-- (C) Petroglyph Games, Inc.
--
--
-- ***** ** * *
-- * ** * * *
-- * * * * *
-- * * * * * * * *
-- * * *** ****** * ** **** *** * * * ***** * ***
-- * ** * * * ** * ** ** * * * * ** ** ** *
-- *** ***** * * * * * * * * ** * * * *
-- * * * * * * * * * * * * * * *
-- * * * * * * * * * * ** * * * *
-- * ** * * ** * ** * * ** * * * *
-- ** **** ** * **** ***** * ** *** * *
-- * * *
-- * * *
-- * * *
-- * * * *
-- **** * *
--
--/////////////////////////////////////////////////////////////////////////////////////////////////
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
--/////////////////////////////////////////////////////////////////////////////////////////////////
--
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/GenerateMagicSpaceDefense.lua $
--
-- Original Author: James Yarrow
--
-- $Author: Brian_Hayes $
--
-- $Change: 637819 $
--
-- $DateTime: 2017/03/22 10:16:16 $
--
-- $Revision: #1 $
--
--/////////////////////////////////////////////////////////////////////////////////////////////////
require("pgevents")
function Definitions()
Category = "Generate_Magic_Space_Defense"
IgnoreTarget = true
TaskForce = {
{
"ReserveForce"
,"DenyHeroAttach"
,"Fighter | Bomber = 6"
,"Corvette | Frigate = 4"
}
}
AllowFreeStoreUnits = false
MagicPlan = true
MagicPlanStealing = false
end
function ReserveForce_Thread()
ReserveForce.Set_As_Goal_System_Removable(false)
BlockOnCommand(ReserveForce.Produce_Force(Target))
ReserveForce.Set_Plan_Result(true)
Sleep(20)
--Use the Easy version of Needs_Magic_Space_Defense (just in case the units we spawned don't pull us past the
--Normal threshold)
wait_start_time = GetCurrentTime()
wait_duration = Determine_Magic_Wait_Duration()
while (GetCurrentTime() - wait_start_time < wait_duration) and
(EvaluatePerception("Needs_Magic_Space_Defense_Easy", PlayerObject, Target) == 0.0) do
Sleep(1)
end
ScriptExit()
end