--/////////////////////////////////////////////////////////////////////////////////////////////////
--  (c) Galyana's Ultimate Empire at War Modifications
--  
--     ******    ***        *** ************           ***         ***
--    *      *    *          *   *         *            *           *
--   *        *   *          *   *                      *           *
--  *         *   *          *   *                      *           *
--  *             *          *   *    *         **** *  *           *
--  *             *          *   ******        *    *   *           *
--  *      ****   *          *   *    *       *     *   *    ***    *
--  *         *   *          *   *           *      *   *     *     *
--   *        *    *        *    *           *      *    *    *    *
--    *      *      *      *     *         *  *    **     *   *   *
--     ******        ******     ************   **** **     *******
--/////////////////////////////////////////////////////////////////////////////////////////////////
-- 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: GUEaW/Data/Scripts/AI/AI_Plan_ExpansionGeneric_RemoveCorruption.LUA
--
-- Original Editor: Giovanni Galyana
--
--   Final Edit By: Giovanni Galyana
--
--            Date: 25 October, 2020
--
--       Revisions: 1
--
--/////////////////////////////////////////////////////////////////////////////////////////////////

require("pgevents")

function Definitions()
	
	Category = "Remove_Corruption"
	IgnoreTarget = true
	TaskForce = {
		{
			"MainForce",
			"DenyHeroAttach",
			"Mon_Mothma_Team | Obi_Wan_Team | Yoda_Team | Luke_Skywalker_Jedi_Team | Emperor_Palpatine_Team | UEAW_Sate_Pestage_Team | Darth_Team | Admonitor_Star_Destroyer | Cuarson_Team | Pestelous_Team | Galyana_SSD_GC = 1"
		}
	}
end

function MainForce_Thread()
	AssembleForce(MainForce)
	LaunchUnits(MainForce)
	MainForce.Set_As_Goal_System_Removable(false)
	MainForce.Activate_Ability()
	MainForce.Set_Plan_Result(true)	
	Sleep(300)
end

function MainForce_No_Units_Remaining(tf)
	--No action
end

function MainForce_Production_Failed(tf, failed_object_type)
	ScriptExit()
end