38 public static class Level2
implements ShipSkillEffect {
40 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
44 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
45 stats.getCrewLossMult().unmodify(
id);
48 public String getEffectDescription(
float level) {
52 public String getEffectPerLevelDescription() {
56 public ScopeDescription getScopeDescription() {
57 return ScopeDescription.PILOTED_SHIP;
61 public static class Level1
implements ShipSkillEffect {
63 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
64 stats.getDynamic().getMod(Stats.INDIVIDUAL_SHIP_RECOVERY_MOD).modifyFlat(
id, 1000f);
67 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
68 stats.getDynamic().getMod(Stats.INDIVIDUAL_SHIP_RECOVERY_MOD).unmodify(
id);
71 public String getEffectDescription(
float level) {
72 return "If lost in combat, ship is almost always recoverable";
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) {
88 stats.getCombatWeaponRepairTimeMult().modifyMult(
id, timeMult);
89 stats.getCombatEngineRepairTimeMult().modifyMult(
id, timeMult);
92 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
93 stats.getCombatWeaponRepairTimeMult().unmodify(
id);
94 stats.getCombatEngineRepairTimeMult().unmodify(
id);
97 public String getEffectDescription(
float level) {
101 public String getEffectPerLevelDescription() {
105 public ScopeDescription getScopeDescription() {
106 return ScopeDescription.PILOTED_SHIP;
110 public static class Level4
implements ShipSkillEffect {
112 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
116 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
117 stats.getHullDamageTakenMult().unmodify(
id);
120 public String getEffectDescription(
float level) {
124 public String getEffectPerLevelDescription() {
128 public ScopeDescription getScopeDescription() {
129 return ScopeDescription.PILOTED_SHIP;
133 public static class Level5
implements ShipSkillEffect {
134 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
135 stats.getDynamic().getMod(Stats.INSTA_REPAIR_FRACTION).modifyFlat(
id,
INSTA_REPAIR);
138 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
139 stats.getDynamic().getMod(Stats.INSTA_REPAIR_FRACTION).unmodify(
id);
142 public String getEffectDescription(
float level) {
143 return "" + (int) Math.round(
INSTA_REPAIR * 100f) +
"% of hull and armor damage taken repaired after combat ends, at no cost";
146 public String getEffectPerLevelDescription() {
150 public ScopeDescription getScopeDescription() {
151 return ScopeDescription.PILOTED_SHIP;
155 public static class Level6
extends BaseSkillEffectDescription implements AfterShipCreationSkillEffect {
156 public void applyEffectsAfterShipCreation(ShipAPI ship, String
id) {
157 ship.addListener(
new DamageControlDamageTakenMod(ship));
160 public void unapplyEffectsAfterShipCreation(ShipAPI ship, String
id) {
161 ship.removeListenerOfClass(DamageControlDamageTakenMod.class);
164 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {}
165 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {}
167 public String getEffectDescription(
float level) {
171 public void createCustomDescription(MutableCharacterStatsAPI stats, SkillSpecAPI skill,
172 TooltipMakerAPI info,
float width) {
176 float level = stats.getSkillLevel(skill.getId());
183 info.addPara(
"At most once every " + seconds +
", single-hit hull damage above %s points has the portion above %s reduced by %s",
191 public ScopeDescription getScopeDescription() {
192 return ScopeDescription.PILOTED_SHIP;
197 public static class DamageControlDamageTakenMod
implements DamageTakenModifier, AdvanceableListener {
198 protected ShipAPI ship;
200 public DamageControlDamageTakenMod(ShipAPI ship) {
204 public void advance(
float amount) {
208 public String modifyDamageTaken(Object param, CombatEntityAPI target,
209 DamageAPI damage, Vector2f point,
220 public static class Level7
implements ShipSkillEffect {
222 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
226 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
227 stats.getDamageToTargetHullMult().unmodifyPercent(
id);
230 public String getEffectDescription(
float level) {
234 public String getEffectPerLevelDescription() {
238 public ScopeDescription getScopeDescription() {
239 return ScopeDescription.PILOTED_SHIP;
245 public static class Level8Desc
implements DescriptionSkillEffect {
246 public String getString() {
247 return "\n\n*Normally, a damaged but functional module would not be repaired until 5 seconds have passed "
248 +
"without it taking damage.";
250 public Color[] getHighlightColors() {
251 Color h = Misc.getHighlightColor();
252 h = Misc.getDarkHighlightColor();
253 return new Color[] {h};
255 public String[] getHighlights() {
256 return new String [] {
"5"};
258 public Color getTextColor() {
262 public static class Level8
implements ShipSkillEffect {
264 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
265 stats.getDynamic().getMod(Stats.CAN_REPAIR_MODULES_UNDER_FIRE).modifyFlat(
id, 1f);
268 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
269 stats.getDynamic().getMod(Stats.CAN_REPAIR_MODULES_UNDER_FIRE).unmodifyFlat(
id);
272 public String getEffectDescription(
float level) {
273 return "Repairs of damaged but functional weapons and engines can continue while they are under fire*";
276 public String getEffectPerLevelDescription() {
280 public ScopeDescription getScopeDescription() {
281 return ScopeDescription.PILOTED_SHIP;