1package com.fs.starfarer.api.impl.combat;
5import com.fs.starfarer.api.Global;
6import com.fs.starfarer.api.combat.MutableShipStatsAPI;
7import com.fs.starfarer.api.combat.PhaseCloakSystemAPI;
8import com.fs.starfarer.api.combat.ShipAPI;
9import com.fs.starfarer.api.combat.ShipSystemAPI;
10import com.fs.starfarer.api.impl.campaign.ids.Stats;
11import com.fs.starfarer.api.impl.campaign.ids.Tags;
68 if (threshold <= 0)
return 1f;
70 if (level > 1f) level = 1f;
77 float level = effectLevel;
81 if (cloak ==
null) cloak = playerShip.
getSystem();
82 if (cloak ==
null)
return;
104 String speedPercentStr = (int) Math.round(
getSpeedMult(playerShip, effectLevel) * 100f) +
"%";
109 "top speed at " + speedPercentStr,
true);
332 boolean player =
false;
336 id =
id +
"_" + ship.
getId();
357 if (cloak ==
null) cloak = ship.
getSystem();
358 if (cloak ==
null)
return;
366 if (state == State.ACTIVE || state == State.OUT || state == State.IN) {
377 if (state == State.COOLDOWN || state == State.IDLE) {
394 float level = effectLevel;
399 float jitterLevel = 0f;
400 float jitterRangeBonus = 0f;
401 float levelForAlpha = level;
407 if (state == State.IN || state == State.ACTIVE) {
409 levelForAlpha = level;
410 }
else if (state == State.OUT) {
416 levelForAlpha = level;
461 float shipTimeMult = 1f + (
getMaxTimeMult(stats) - 1f) * levelForAlpha * (1f - extra);
514 if (cloak ==
null) cloak = ship.
getSystem();
526 public StatusData
getStatusData(
int index, State state,
float effectLevel) {
static CombatEngineAPI getCombatEngine()
void modifyPercent(String source, float value)
void unmodifyMult(String source)
void modifyMult(String source, float value)
float computeEffective(float baseValue)
static final String PHASE_CLOAK_SPEED_MOD
static final String PHASE_CLOAK_ACCEL_MOD
static final String PHASE_CLOAK_FLUX_LEVEL_FOR_MIN_SPEED_MOD
static final String PHASE_TIME_BONUS_MULT
boolean isDisruptable(ShipSystemAPI cloak)
static float BASE_FLUX_LEVEL_FOR_MIN_SPEED
static boolean FLUX_LEVEL_AFFECTS_SPEED
static float VULNERABLE_FRACTION
static float MAX_TIME_MULT
void unapply(MutableShipStatsAPI stats, String id)
static Color JITTER_COLOR
static float MIN_SPEED_MULT
StatusData getStatusData(int index, State state, float effectLevel)
static float SHIP_ALPHA_MULT
float getDisruptionLevel(ShipAPI ship)
void apply(MutableShipStatsAPI stats, String id, State state, float effectLevel)
void maintainStatus(ShipAPI playerShip, State state, float effectLevel)
float getSpeedMult(ShipAPI ship, float effectLevel)
static float JITTER_FADE_TIME
static float INCOMING_DAMAGE_MULT
static float getMaxTimeMult(MutableShipStatsAPI stats)
void maintainStatusForPlayerShip(Object key, String spriteName, String title, String data, boolean isDebuff)
MutableStat getTimeMult()
DynamicStatsAPI getDynamic()
MutableStat getTimeMult()
MutableStat getDeceleration()
MutableStat getMaxSpeed()
CombatEntityAPI getEntity()
MutableStat getAcceleration()
ShipSystemAPI getPhaseCloak()
MutableShipStatsAPI getMutableStats()
void setExtraAlphaMult(float transparency)
void setApplyExtraAlphaToEngines(boolean applyExtraAlphaToEngines)
ShipSystemAPI getSystem()
void setPhased(boolean phased)
ShipSystemSpecAPI getSpecAPI()
String getIconSpriteName()
boolean hasTag(String tag)
float getValue(String id)
StatBonus getMod(String id)