31 public String getString() {
32 return "\n\n*Ships without a shield or a phase cloak are treated as always having " + (int)
NON_SHIELD_FLUX_LEVEL +
"% hard flux.";
34 public Color[] getHighlightColors() {
37 return new Color[] {h};
39 public String[] getHighlights() {
42 public Color getTextColor() {
50 public PolarizedArmorEffectMod(
ShipAPI ship, String
id) {
55 public void advance(
float amount) {
78 if (fluxLevel > 0.75f) {
79 b = 1f * (fluxLevel - 0.75f) / 0.25f;
82 ship.
setJitter(
this, c, 1f * fluxLevel * b, 1, 0f);
86 public String modifyDamageTaken(Object param,
87 CombatEntityAPI target, DamageAPI damage,
88 Vector2f point,
boolean shieldHit) {
94 public static class Level1
implements ShipSkillEffect {
96 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
97 stats.getMaxArmorDamageReduction().modifyFlat(
id, 0.05f);
100 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
101 stats.getMaxArmorDamageReduction().unmodify(
id);
104 public String getEffectDescription(
float level) {
105 return "Maximum damage reduction by armor increased from 85% to 90%";
108 public String getEffectPerLevelDescription() {
112 public ScopeDescription getScopeDescription() {
113 return ScopeDescription.PILOTED_SHIP;
118 public static class Level2
implements AfterShipCreationSkillEffect {
119 public void applyEffectsAfterShipCreation(ShipAPI ship, String
id) {
120 ship.addListener(
new PolarizedArmorEffectMod(ship,
id));
122 public void unapplyEffectsAfterShipCreation(ShipAPI ship, String
id) {
123 MutableShipStatsAPI stats = ship.getMutableStats();
124 ship.removeListenerOfClass(PolarizedArmorEffectMod.class);
125 stats.getEffectiveArmorBonus().unmodify(
id);
126 stats.getEmpDamageTakenMult().unmodify(
id);
129 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {}
130 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {}
132 public String getEffectDescription(
float level) {
135 return "Up to +" + (int)(
EFFECTIVE_ARMOR_BONUS) +
"% armor for damage reduction calculation only, based on current hard flux level*";
137 public String getEffectPerLevelDescription() {
140 public ScopeDescription getScopeDescription() {
141 return ScopeDescription.PILOTED_SHIP;
145 public static class Level3
implements ShipSkillEffect {
146 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {}
147 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {}
149 public String getEffectDescription(
float level) {
150 return "EMP damage taken reduced by up to " + (int)Math.round(
EMP_BONUS_PERCENT) +
"%, based on current hard flux level*";
152 public String getEffectPerLevelDescription() {
155 public ScopeDescription getScopeDescription() {
156 return ScopeDescription.PILOTED_SHIP;
160 public static class Level4
implements ShipSkillEffect {
162 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
166 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
167 stats.getVentRateMult().unmodify(
id);
170 public String getEffectDescription(
float level) {
171 return "+" + (int)(
VENT_RATE_BONUS) +
"% flux dissipation rate while venting";
175 public String getEffectPerLevelDescription() {
179 public ScopeDescription getScopeDescription() {
180 return ScopeDescription.PILOTED_SHIP;