1package com.fs.starfarer.api.impl.campaign.ghosts;
3import org.lwjgl.util.vector.Vector2f;
5import com.fs.starfarer.api.Global;
6import com.fs.starfarer.api.fleet.FleetMemberAPI;
7import com.fs.starfarer.api.impl.campaign.ghosts.types.NoGhostCreator;
8import com.fs.starfarer.api.impl.campaign.ghosts.types.ZigguratGhost;
9import com.fs.starfarer.api.util.Misc;
19 if (!(c instanceof NoGhostCreator)) {
20 float f = c.getFrequency(manager);
26 return Math.max(10f, total) * mult;
76 boolean found =
false;
77 for (FleetMemberAPI member :
Global.
getSector().getPlayerFleet().getFleetData().getMembersListCopy()) {
78 if (member.getHullSpec().getBaseHullId().equals(
id)) {
83 if (!found)
return 0f;
91 Vector2f loc =
Global.
getSector().getPlayerFleet().getLocationInHyperspace();
95 float a = sw * 0.5f * f;
96 float b = sh * 0.5f * f;
100 float test = (x * x) / (a * a) + (y * y)/ (b * b);
105 }
else if (test <= 0.75f) {
108 result = (test - 0.75f) / 0.25f;
115 return factorIfNoBurst;
130 Vector2f loc =
Global.
getSector().getPlayerFleet().getLocationInHyperspace();
132 Vector2f min = Misc.getCoreMin();
133 Vector2f max = Misc.getCoreMax();
134 Vector2f center = Misc.getCoreCenter();
137 float a = (max.x - min.x) * 0.5f * f;
138 float b = (max.y - min.y) * 0.5f * f;
139 float x = loc.x - center.x;
140 float y = loc.y - center.y;
142 float test = (x * x) / (a * a) + (y * y)/ (b * b);
147 }
else if (test <= 0.75f) {
150 result = 1f - (test - 0.75f) / 0.25f;
static SettingsAPI getSettings()
static SectorAPI getSector()
static float getCoreFactor()
static float getStormcallerFrequency(SensorGhostManager manager)
static float getAbyssalDrifterFrequency(SensorGhostManager manager)
static float getRacerFrequency(SensorGhostManager manager)
static float getEncounterTricksterFrequency(SensorGhostManager manager)
static float getSBFactor(SensorGhostManager manager, float factorIfNoBurst, float factorIfBurst)
static float getRemoraFrequency(SensorGhostManager manager)
static boolean isInsideCore()
static float getNoGhostFrequency(SensorGhostManager manager)
static float getNotInCoreFactor()
static float getMinnowFrequency(SensorGhostManager manager)
static float getZigguratFrequency(SensorGhostManager manager)
static float getNotInFringeFactor()
static float getStormTricksterFrequency(SensorGhostManager manager)
static float getChargerFrequency(SensorGhostManager manager)
static float getFringeFactor()
static float getEchoFrequency(SensorGhostManager manager)
static float getRemnantFrequency(SensorGhostManager manager)
static float getLeviathanFrequency(SensorGhostManager manager)
static float getGuideFrequency(SensorGhostManager manager)
static float getShipFrequency(SensorGhostManager manager)
static float getLeviathanCalfFrequency(SensorGhostManager manager)
boolean hasGhostOfClass(Class<?> clazz)
static List< SensorGhostCreator > CREATORS
boolean isSpawnTriggeredBySensorBurst()
float getFloat(String key)