package data.scripts.world;

import java.awt.Color;
import java.util.List;

import com.fs.starfarer.api.campaign.CampaignFleetAPI;
import com.fs.starfarer.api.campaign.CargoAPI;
import com.fs.starfarer.api.campaign.FactionAPI;
import com.fs.starfarer.api.campaign.FleetAssignment;
import com.fs.starfarer.api.campaign.SectorAPI;
import com.fs.starfarer.api.campaign.SectorEntityToken;
import com.fs.starfarer.api.campaign.SectorGeneratorPlugin;
import com.fs.starfarer.api.campaign.StarSystemAPI;
import com.fs.starfarer.api.campaign.CargoAPI.CrewXPLevel;
import com.fs.starfarer.api.fleet.FleetMemberType;

@SuppressWarnings("unchecked")
public class LotusSectorGen implements SectorGeneratorPlugin {

	public void generate(SectorAPI sector) {
		
		StarSystemAPI system = sector.getStarSystem("Corvus");
		
		SectorEntityToken lot = system.createToken(0, 0);
		
		SectorEntityToken Emerald = system.addPlanet(lot, "Synchrony", "lava", 235, 150, 1500, 200);
		system.addAsteroidBelt (Emerald, 50, 300, 300, 300, 45);
        
		SectorEntityToken stationl = system.addOrbitalStation(system.getEntityByName("Synchrony"), 45, 300, 50, "Anchorage", "lotus_pirates");
		SectorEntityToken lot2 = system.createToken(-12000, 12000);
		system.addSpawnPoint(new LotusPiratesConvoySpawnPoint(sector, system, 12, 1, lot2, stationl));
		
		LotusPiratesSpawnPoint lotSpawn = new LotusPiratesSpawnPoint(sector, system, 5, 5, stationl);
		system.addSpawnPoint(lotSpawn);
		
		for (int i = 0; i < 10; i++) lotSpawn.spawnFleet();		
				
		CargoAPI cargo = stationl.getCargo();
		cargo.addWeapons("annihilator", 9);
		cargo.addWeapons("annihilatorpod", 6);
		cargo.addWeapons("arbalest", 6);
		cargo.addWeapons("atropos", 9);
		cargo.addWeapons("atropos_single", 9);
		cargo.addWeapons("bomb", 9);
		cargo.addWeapons("clusterbomb", 9);
		cargo.addWeapons("chaingun", 6);
		cargo.addWeapons("cyclone", 3);
		cargo.addWeapons("dualflak", 6);
		cargo.addWeapons("flak", 6);
		cargo.addWeapons("fragbomb", 9);
		cargo.addWeapons("gauss", 3);
		cargo.addWeapons("harpoon", 9);
		cargo.addWeapons("harpoon_single", 9);
		cargo.addWeapons("harpoonpod", 6);
		cargo.addWeapons("hdstinger", 3);
		cargo.addWeapons("heatseeker", 9);
		cargo.addWeapons("heavyac", 6);
		cargo.addWeapons("heavymauler", 6);
		cargo.addWeapons("heavymg", 6);
		cargo.addWeapons("heavyneedler", 6);
		cargo.addWeapons("hellbore", 3);
		cargo.addWeapons("hephag", 3);
		cargo.addWeapons("hurricane", 3);
		cargo.addWeapons("hveldriver", 6);
		cargo.addWeapons("lightac", 9);
		cargo.addWeapons("lightag", 9);
		cargo.addWeapons("lightdualac", 9);
		cargo.addWeapons("lightmg", 9);
		cargo.addWeapons("lightmortar", 9);
		cargo.addWeapons("lightneedler", 9);
		cargo.addWeapons("mjolnir", 3);
		cargo.addWeapons("multineedler", 3);
		cargo.addWeapons("phasecl", 6);
		cargo.addWeapons("pilum", 6);
		cargo.addWeapons("railgun", 9);
		cargo.addWeapons("reaper", 9);
		cargo.addWeapons("revolver", 9);
		cargo.addWeapons("sabot", 9);
		cargo.addWeapons("sabot_single", 9);
		cargo.addWeapons("sabotpod", 6);
		cargo.addWeapons("salamanderpod", 6);
		cargo.addWeapons("shredder", 6);
		cargo.addWeapons("stinger_single", 9);
		cargo.addWeapons("stinger", 9);
		cargo.addWeapons("stingerlauncher", 6);
		cargo.addWeapons("swarmer", 9);
		cargo.addWeapons("typhoon", 6);
		cargo.addWeapons("vulcan", 9);
		cargo.addCrew(CrewXPLevel.VETERAN, 40);
		cargo.addCrew(CrewXPLevel.REGULAR, 120);
		cargo.addCrew(CrewXPLevel.GREEN, 360);
		cargo.addMarines(120);
		cargo.addSupplies(500);
		cargo.addFuel(500);
		cargo.addMothballedShip(FleetMemberType.SHIP, "blizzard_Hunter", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "blizzard_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "jackal_Hunter", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "jackal_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "stingray_Hunter", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "stingray_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "hydra_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "hydra_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "rive_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "rive_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "eventide_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "eventide_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "ajax_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "ajax_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "buffalo2_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "condor_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "venture_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "dominator_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "argos_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "argos_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "hound_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "lasher_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "brawler_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "aria_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "aria_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "vanquish_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "arcadia_Hull", null);
		cargo.addMothballedShip(FleetMemberType.SHIP, "arcadia_Hull", null);
		cargo.addMothballedShip(FleetMemberType.FIGHTER_WING, "thunder_wing", null);
		cargo.addMothballedShip(FleetMemberType.FIGHTER_WING, "gladius_wing", null);
		cargo.addMothballedShip(FleetMemberType.FIGHTER_WING, "warthog_wing", null);
		cargo.addMothballedShip(FleetMemberType.FIGHTER_WING, "stigma_wing", null);
		cargo.addMothballedShip(FleetMemberType.FIGHTER_WING, "stigma_wing", null);
		cargo.addMothballedShip(FleetMemberType.FIGHTER_WING, "stigma_wing", null);
		cargo.addMothballedShip(FleetMemberType.FIGHTER_WING, "javelin_wing", null);
		cargo.addMothballedShip(FleetMemberType.FIGHTER_WING, "javelin_wing", null);
		cargo.addMothballedShip(FleetMemberType.FIGHTER_WING, "cutlass_wing", null);
		cargo.addMothballedShip(FleetMemberType.FIGHTER_WING, "sarissa_wing", null);
		cargo.addMothballedShip(FleetMemberType.FIGHTER_WING, "sarissa_wing", null);
		cargo.addMothballedShip(FleetMemberType.FIGHTER_WING, "cutlass_wing", null);
		cargo.addMothballedShip(FleetMemberType.FIGHTER_WING, "bolt_wing", null);
		cargo.addMothballedShip(FleetMemberType.FIGHTER_WING, "bolt_wing", null);

		FactionAPI lotus_pirates = sector.getFaction("lotus_pirates");
        
		lotus_pirates.setRelationship("hegemony", -1);
		lotus_pirates.setRelationship("tritachyon", -1);
		lotus_pirates.setRelationship("pirates", -1);
		lotus_pirates.setRelationship("independent", -1);
		lotus_pirates.setRelationship("player", 0);      
        
        
	}
}















