18 public void apply(MutableShipStatsAPI stats, String
id, State state,
float effectLevel) {
20 boolean player =
false;
21 if (stats.getEntity() instanceof ShipAPI) {
22 ship = (ShipAPI) stats.getEntity();
24 id =
id +
"_" + ship.getId();
29 float jitterLevel = effectLevel;
30 float jitterRangeBonus = 0;
31 float maxRangeBonus = 10f;
32 if (state == State.IN) {
33 jitterLevel = effectLevel / (1f / ship.getSystem().getChargeUpDur());
34 if (jitterLevel > 1) {
37 jitterRangeBonus = jitterLevel * maxRangeBonus;
38 }
else if (state == State.ACTIVE) {
40 jitterRangeBonus = maxRangeBonus;
41 }
else if (state == State.OUT) {
42 jitterRangeBonus = jitterLevel * maxRangeBonus;
44 jitterLevel = (float) Math.sqrt(jitterLevel);
45 effectLevel *= effectLevel;
47 ship.setJitter(
this,
JITTER_COLOR, jitterLevel, 3, 0, 0 + jitterRangeBonus);
48 ship.setJitterUnder(
this,
JITTER_UNDER_COLOR, jitterLevel, 25, 0f, 7f + jitterRangeBonus);
52 stats.getTimeMult().modifyMult(
id, shipTimeMult);
64 ship.getEngineController().fadeToOtherColor(
this,
JITTER_COLOR,
new Color(0,0,0,0), effectLevel, 0.5f);
65 ship.getEngineController().extendFlame(
this, -0.25f, -0.25f, -0.25f);