35 public static class Level0
implements DescriptionSkillEffect {
36 public String getString() {
46 return "*Enemy weapon range is reduced by the total ECM rating of your deployed ships, "
47 +
"up to a maximum of " + max +
". This penalty is reduced by the ratio "
48 +
"of the enemy ECM rating to yours." +
49 "Does not apply to fighters, affects all weapons including missiles.";
51 public Color[] getHighlightColors() {
52 Color h = Misc.getHighlightColor();
53 h = Misc.getDarkHighlightColor();
54 return new Color[] {h, h, h};
56 public String[] getHighlights() {
62 return new String [] {max};
65 public Color getTextColor() {
70 public static class Level0WithNewline
extends Level0 {
71 public String getString() {
72 return "\n" + super.getString();
76 public static class Level1A
implements ShipSkillEffect {
77 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
78 if (!BaseSkillEffectDescription.isCivilian(stats)) {
79 stats.getDynamic().getMod(Stats.ELECTRONIC_WARFARE_FLAT).modifyFlat(
id,
PER_SHIP_BONUS);
82 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
83 stats.getDynamic().getMod(Stats.ELECTRONIC_WARFARE_FLAT).unmodify(
id);
85 public String getEffectDescription(
float level) {
88 return "Every deployed combat ship contributes +" + (int)
PER_SHIP_BONUS +
"% to ECM rating* of fleet";
90 public String getEffectPerLevelDescription() {
93 public ScopeDescription getScopeDescription() {
94 return ScopeDescription.ALL_SHIPS;
99 public static class Level1B
implements ShipSkillEffect {
100 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
101 if (!BaseSkillEffectDescription.isCivilian(stats)) {
102 stats.getDynamic().getMod(Stats.SHIP_OBJECTIVE_CAP_RANGE_MOD).modifyFlat(
id,
CAP_RANGE);
103 stats.getDynamic().getStat(Stats.SHIP_OBJECTIVE_CAP_RATE_MULT).modifyMult(
id,
CAP_RATE);
106 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
107 stats.getDynamic().getMod(Stats.SHIP_OBJECTIVE_CAP_RANGE_MOD).unmodifyFlat(
id);
108 stats.getDynamic().getStat(Stats.SHIP_OBJECTIVE_CAP_RATE_MULT).unmodifyMult(
id);
110 public String getEffectDescription(
float level) {
111 return "Combat objectives are captured much more quickly and from longer range";
113 public String getEffectPerLevelDescription() {
116 public ScopeDescription getScopeDescription() {
117 return ScopeDescription.ALL_SHIPS;
121 public static class Level1C
implements ShipSkillEffect {
122 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
123 stats.getDynamic().getMod(Stats.SHIP_BELONGS_TO_FLEET_THAT_CAN_COUNTER_EW).modifyFlat(
id, 1f);
125 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
126 stats.getDynamic().getMod(Stats.SHIP_BELONGS_TO_FLEET_THAT_CAN_COUNTER_EW).unmodifyFlat(
id);
128 public String getEffectDescription(
float level) {
129 String excess =
"" + (int)Math.round(ElectronicWarfareScript.BASE_MAXIMUM * 2f);
130 return "Half of your fleet's excess (above " + excess +
"%) ECM rating reduces the maximum range penalty due to enemy ECM";
132 public String getEffectPerLevelDescription() {
135 public ScopeDescription getScopeDescription() {
136 return ScopeDescription.ALL_SHIPS;