package data.missions.genesisinc;

import java.util.ArrayList;
import java.util.List;

import com.fs.starfarer.api.fleet.FleetGoal;
import com.fs.starfarer.api.fleet.FleetMemberType;
import com.fs.starfarer.api.mission.FleetSide;
import com.fs.starfarer.api.mission.MissionDefinitionAPI;
import com.fs.starfarer.api.mission.MissionDefinitionPlugin;

public class MissionDefinition implements MissionDefinitionPlugin {

	public void defineMission(MissionDefinitionAPI api) {

		// Set up the fleets
		api.initFleet(FleetSide.PLAYER, "MSV", FleetGoal.ATTACK, false, 5);
		api.initFleet(FleetSide.ENEMY, "ISS", FleetGoal.DEFEND, true);

		// Set a blurb for each fleet
		api.setFleetTagline(FleetSide.PLAYER, "Trade Scavengers");
		api.setFleetTagline(FleetSide.ENEMY, "Hegemony");
		
		// These show up as items in the bulleted list under 
		// "Tactical Objectives" on the mission detail screen
		api.addBriefingItem("Bear in mind that the Genesis' main strength is in its massive missile complement");
		
		// Set up the player's fleet
		api.addToFleet(FleetSide.PLAYER, "hades_barrage", FleetMemberType.SHIP, "MSV Hades", true);
		api.addToFleet(FleetSide.PLAYER, "razor_wing", FleetMemberType.FIGHTER_WING, false);
		api.addToFleet(FleetSide.PLAYER, "razor_wing", FleetMemberType.FIGHTER_WING, false);

		
		// Set up the enemy fleet
		api.addToFleet(FleetSide.ENEMY, "eagle_Balanced", FleetMemberType.SHIP, false);
		api.addToFleet(FleetSide.ENEMY, "hammerhead_Balanced", FleetMemberType.SHIP, false);
		api.addToFleet(FleetSide.ENEMY, "hammerhead_Balanced", FleetMemberType.SHIP, false);
		api.addToFleet(FleetSide.ENEMY, "lasher_Standard", FleetMemberType.SHIP, false);
		api.addToFleet(FleetSide.ENEMY, "lasher_Standard", FleetMemberType.SHIP, false);
		api.addToFleet(FleetSide.ENEMY, "broadsword_wing", FleetMemberType.FIGHTER_WING, false);
		api.addToFleet(FleetSide.ENEMY, "broadsword_wing", FleetMemberType.FIGHTER_WING, false);
		api.addToFleet(FleetSide.ENEMY, "broadsword_wing", FleetMemberType.FIGHTER_WING, false);
		api.addToFleet(FleetSide.ENEMY, "broadsword_wing", FleetMemberType.FIGHTER_WING, false);
		api.addToFleet(FleetSide.ENEMY, "broadsword_wing", FleetMemberType.FIGHTER_WING, false);

		
		
		// Set up the map.
		float width = 20000f;
		float height = 12000f;
		api.initMap((float)-width/2f, (float)width/2f, (float)-height/2f, (float)height/2f);

		float minX = -width/2;
		float minY = -height/2;
		
		api.addObjective(minX + width * 0.2f, minY + height * 0.8f, "sensor_array");
		api.addObjective(minX + width * 0.8f, minY + height * 0.2f, "sensor_array");

		api.addAsteroidField(minX + width * 0.3f, minY + height * 0.2f, 30, height, 1f, 1f, 100);
		api.addAsteroidField(minX + width * 0.25f, minY + height * 0.3f, 60, height, 1f, 1f, 100);
		api.addAsteroidField(minX + width * 0.3f, minY + height * 0.4f, -75, height, 1f, 1f, 100);
	}

}






