24 public static HullSize
getHullSize(MutableShipStatsAPI stats) {
25 if (stats.getEntity() instanceof ShipAPI) {
26 ShipAPI ship = (ShipAPI) stats.getEntity();
27 return ship.getHullSize();
29 FleetMemberAPI member = stats.getFleetMember();
30 if (member ==
null)
return HullSize.CAPITAL_SHIP;
31 return member.getHullSpec().getHullSize();
61 public static class Level2
implements ShipSkillEffect {
63 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
67 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
68 stats.getArmorDamageTakenMult().unmodify(
id);
71 public String getEffectDescription(
float level) {
75 public String getEffectPerLevelDescription() {
79 public ScopeDescription getScopeDescription() {
80 return ScopeDescription.PILOTED_SHIP;
84 public static class Level3
implements ShipSkillEffect {
86 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
90 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
91 stats.getKineticArmorDamageTakenMult().unmodify(
id);
94 public String getEffectDescription(
float level) {
98 public String getEffectPerLevelDescription() {
102 public ScopeDescription getScopeDescription() {
103 return ScopeDescription.PILOTED_SHIP;
107 public static class Level4
implements ShipSkillEffect {
109 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
114 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
115 stats.getEngineDamageTakenMult().unmodify(
id);
116 stats.getWeaponDamageTakenMult().unmodify(
id);
119 public String getEffectDescription(
float level) {
123 public String getEffectPerLevelDescription() {
127 public ScopeDescription getScopeDescription() {
128 return ScopeDescription.PILOTED_SHIP;
131 public static class Level5
implements ShipSkillEffect {
133 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
137 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
138 stats.getMaxArmorDamageReduction().unmodify(
id);
141 public String getEffectDescription(
float level) {
142 return "Maximum damage reduction by armor increased from 85% to 90%";
145 public String getEffectPerLevelDescription() {
149 public ScopeDescription getScopeDescription() {
150 return ScopeDescription.PILOTED_SHIP;
155 public static class Level6
implements ShipSkillEffect {
156 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
159 if (size == HullSize.FRIGATE || size == HullSize.DESTROYER) {
162 stats.getAcceleration().modifyPercent(
id, bonus);
163 stats.getDeceleration().modifyPercent(
id, bonus);
164 stats.getTurnAcceleration().modifyPercent(
id, bonus * 2f);
165 stats.getMaxTurnRate().modifyPercent(
id, bonus);
168 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
169 stats.getAcceleration().unmodify(
id);
170 stats.getDeceleration().unmodify(
id);
171 stats.getTurnAcceleration().unmodify(
id);
172 stats.getMaxTurnRate().unmodify(
id);
175 public String getEffectDescription(
float level) {
180 public String getEffectPerLevelDescription() {
184 public ScopeDescription getScopeDescription() {
185 return ScopeDescription.PILOTED_SHIP;
189 public static class Level7
implements ShipSkillEffect {
191 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
195 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
196 stats.getHitStrengthBonus().unmodifyPercent(
id);
199 public String getEffectDescription(
float level) {
203 public String getEffectPerLevelDescription() {
207 public ScopeDescription getScopeDescription() {
208 return ScopeDescription.PILOTED_SHIP;