23 public void apply(MutableShipStatsAPI stats, String
id, State state,
float effectLevel) {
25 if (stats.getEntity() instanceof ShipAPI) {
26 ship = (ShipAPI) stats.getEntity();
32 if (effectLevel > 0) {
33 float jitterLevel = effectLevel;
34 float maxRangeBonus = 5f;
35 float jitterRangeBonus = jitterLevel * maxRangeBonus;
36 for (ShipAPI fighter : getFighters(ship)) {
37 if (fighter.isHulk())
continue;
38 MutableShipStatsAPI fStats = fighter.getMutableStats();
47 if (jitterLevel > 0) {
49 fighter.setWeaponGlow(effectLevel, Misc.setAlpha(
JITTER_UNDER_COLOR, 255), EnumSet.allOf(WeaponType.class));
80 public void unapply(MutableShipStatsAPI stats, String
id) {
82 if (stats.getEntity() instanceof ShipAPI) {
83 ship = (ShipAPI) stats.getEntity();
87 for (ShipAPI fighter : getFighters(ship)) {
88 if (fighter.isHulk())
continue;
89 MutableShipStatsAPI fStats = fighter.getMutableStats();
90 fStats.getBallisticWeaponDamageMult().unmodify(
id);
91 fStats.getEnergyWeaponDamageMult().unmodify(
id);
92 fStats.getMissileWeaponDamageMult().unmodify(
id);