22 public static final float MIN_CR = 30f;
23 public static final float MAX_CR = 40f;
30 public static class Level5A
implements FleetStatsSkillEffect {
31 public void apply(MutableFleetStatsAPI stats, String
id,
float level) {
32 stats.getDynamic().getMod(Stats.RECOVERED_HULL_MIN).modifyFlat(
id,
MIN_HULL * 0.01f);
33 stats.getDynamic().getMod(Stats.RECOVERED_HULL_MAX).modifyFlat(
id,
MAX_HULL * 0.01f);
36 public void unapply(MutableFleetStatsAPI stats, String
id) {
37 stats.getDynamic().getMod(Stats.RECOVERED_HULL_MIN).unmodify(
id);
38 stats.getDynamic().getMod(Stats.RECOVERED_HULL_MAX).unmodify(
id);
41 public String getEffectDescription(
float level) {
42 return "Recovered ships start with " + (int)
MIN_HULL +
"-" + (
int)
MAX_HULL +
"% hull integrity";
45 public String getEffectPerLevelDescription() {
49 public ScopeDescription getScopeDescription() {
50 return ScopeDescription.FLEET;
54 public static class Level5B
implements FleetStatsSkillEffect {
55 public void apply(MutableFleetStatsAPI stats, String
id,
float level) {
56 stats.getDynamic().getMod(Stats.RECOVERED_CR_MIN).modifyFlat(
id,
MIN_CR * 0.01f);
57 stats.getDynamic().getMod(Stats.RECOVERED_CR_MAX).modifyFlat(
id,
MAX_CR * 0.01f);
60 public void unapply(MutableFleetStatsAPI stats, String
id) {
61 stats.getDynamic().getMod(Stats.RECOVERED_CR_MIN).unmodify(
id);
62 stats.getDynamic().getMod(Stats.RECOVERED_CR_MAX).unmodify(
id);
65 public String getEffectDescription(
float level) {
66 return "Recovered ships start with " + (int)
MIN_CR +
"-" + (
int)
MAX_CR +
"% combat readiness";
69 public String getEffectPerLevelDescription() {
73 public ScopeDescription getScopeDescription() {
74 return ScopeDescription.FLEET;
100 public static class Level1
extends BaseSkillEffectDescription implements CharacterStatsSkillEffect, FleetTotalSource {
102 public FleetTotalItem getFleetTotalItem() {
106 public void apply(MutableCharacterStatsAPI stats, String
id,
float level) {
108 FleetDataAPI data =
null;
109 if (stats !=
null && stats.getFleet() !=
null) {
110 data = stats.getFleet().getFleetData();
113 stats.getRepairRateMult().modifyPercent(
id, repBonus);
117 public void unapply(MutableCharacterStatsAPI stats, String
id) {
118 stats.getRepairRateMult().unmodify(
id);
121 public void createCustomDescription(MutableCharacterStatsAPI stats, SkillSpecAPI skill,
122 TooltipMakerAPI info,
float width) {
125 FleetDataAPI data =
null;
126 if (stats !=
null && stats.getFleet() !=
null) {
127 data = stats.getFleet().getFleetData();
131 info.addPara(
"+%s ship repair rate outside of combat (maximum: %s)", 0f,
hc,
hc,
132 "" + (
int) damBonus +
"%",
138 public ScopeDescription getScopeDescription() {
139 return ScopeDescription.ALL_SHIPS;
143 public static class Level2
extends BaseSkillEffectDescription implements ShipSkillEffect, FleetTotalSource {
145 public FleetTotalItem getFleetTotalItem() {
149 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
152 stats.getDynamic().getMod(Stats.INSTA_REPAIR_FRACTION).modifyFlat(
id, instaRep * 0.01f);
156 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
157 stats.getDynamic().getMod(Stats.INSTA_REPAIR_FRACTION).unmodifyFlat(
id);
160 public String getEffectDescription(
float level) {
164 public void createCustomDescription(MutableCharacterStatsAPI stats, SkillSpecAPI skill,
165 TooltipMakerAPI info,
float width) {
171 info.addPara(
"%s of hull and armor damage taken repaired after combat ends, at no cost (maximum: %s)", 0f,
hc,
hc,
172 "" + (
int) instaRep +
"%",
179 public ScopeDescription getScopeDescription() {
180 return ScopeDescription.ALL_SHIPS;