30 if (member ==
null)
return 0f;
33 if (data ==
null)
return 0f;
35 return getReplacementRateBonus(data);
39 protected float getReplacementRateBonus(
FleetDataAPI data) {
42 if (bonus !=
null)
return bonus;
46 bays += curr.getNumFlightDecks();
49 bonus = (float) Math.round(300f / (Math.max(bays, 6)));
56 float bonus = getReplacementRateBonus(stats);
57 float timeMult = 1f / ((100f + bonus) / 100f);
66 public boolean hasCustomDescription() {
75 Color darkHighlightColor =
Misc.
setAlpha(highlightColor, 155);
77 float level = stats.getSkillLevel(skill.
getId());
80 highlightColor = darkHighlightColor;
86 info.
addPara(
"%s faster fighter replacements " +
87 "(based on number of fighter bays in fleet)", 0f, textColor, highlightColor,
88 "" + (
int)(bonus) +
"%");
92 public String getEffectDescription(
float level) {
94 return "" + (int)(bonus) +
"% faster fighter replacements (based on number of fighter bays in fleet)";
98 public String getEffectPerLevelDescription() {
102 public ScopeDescription getScopeDescription() {
103 return ScopeDescription.ALL_SHIPS;
118 public String getEffectDescription(
float level) {
122 public String getEffectPerLevelDescription() {
126 public ScopeDescription getScopeDescription() {
127 return ScopeDescription.ALL_SHIPS;
131 public static class Level2
implements ShipSkillEffect {
132 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
138 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
139 stats.getHullDamageTakenMult().unmodify(
id);
140 stats.getArmorDamageTakenMult().unmodify(
id);
141 stats.getShieldDamageTakenMult().unmodify(
id);
144 public String getEffectDescription(
float level) {
148 public String getEffectPerLevelDescription() {
152 public ScopeDescription getScopeDescription() {
153 return ScopeDescription.ALL_FIGHTERS;
157 public static class Level3
implements ShipSkillEffect {
159 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
161 stats.getFighterRefitTimeMult().modifyMult(
id, timeMult);
164 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
165 stats.getFighterRefitTimeMult().unmodify(
id);
168 public String getEffectDescription(
float level) {
172 public String getEffectPerLevelDescription() {
176 public ScopeDescription getScopeDescription() {
177 return ScopeDescription.ALL_SHIPS;