14 public static Map<HullSize, Float>
BONUS =
new HashMap<ShipAPI.HullSize, Float>();
16 BONUS.put(HullSize.FRIGATE, 5f);
17 BONUS.put(HullSize.DESTROYER, 10f);
18 BONUS.put(HullSize.CRUISER, 15f);
19 BONUS.put(HullSize.CAPITAL_SHIP, 30f);
22 public static class Level1
implements ShipSkillEffect {
23 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
24 Float bonus =
BONUS.get(hullSize);
26 stats.getDynamic().getMod(Stats.ELECTRONIC_WARFARE_FLAT).modifyFlat(
id, bonus);
29 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
30 stats.getDynamic().getMod(Stats.ELECTRONIC_WARFARE_FLAT).unmodify(
id);
32 public String getEffectDescription(
float level) {
33 int min = (int)Math.round(
BONUS.get(HullSize.FRIGATE));
34 int max = (int)Math.round(
BONUS.get(HullSize.CAPITAL_SHIP));
35 return "+" + min +
"-" + max +
"% to ECM rating of ships, depending on ship size";
37 public String getEffectPerLevelDescription() {
41 public ScopeDescription getScopeDescription() {
42 return ScopeDescription.PILOTED_SHIP;