28 public static class Level0
implements DescriptionSkillEffect {
29 public String getString() {
34 return "*The total \"automated ship points\" are equal to the deployment points cost of " +
35 "all automated ships in the fleet, with a multiplier for installed AI cores - " +
36 alpha + Strings.X +
" for an Alpha Core, " +
37 beta + Strings.X +
" for a Beta Core, and " +
38 gamma + Strings.X +
" for a Gamma Core. "
39 +
"Due to safety interlocks, ships with AI cores do not contribute to the deployment point distribution.";
60 public Color[] getHighlightColors() {
61 Color h = Misc.getHighlightColor();
62 h = Misc.getDarkHighlightColor();
63 Color bad = Misc.getNegativeHighlightColor();
65 return new Color[] {h, h, h, bad};
67 public String[] getHighlights() {
74 return new String [] {
"" + alpha + Strings.X,
"" + beta + Strings.X,
"" + gamma + Strings.X,
75 "do not contribute to the deployment point distribution"};
77 public Color getTextColor() {
85 public FleetTotalItem getFleetTotalItem() {
89 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
90 if (Misc.isAutomated(stats) &&
91 !Automated.isAutomatedNoPenalty(stats)) {
94 stats.getMaxCombatReadiness().modifyFlat(
id, crBonus * 0.01f, skill.getName() +
" skill");
98 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
99 stats.getMaxCombatReadiness().unmodifyFlat(
id);
102 public String getEffectDescription(
float level) {
106 public void createCustomDescription(MutableCharacterStatsAPI stats, SkillSpecAPI skill,
107 TooltipMakerAPI info,
float width) {
113 String partially =
"";
114 String penalty =
"" + (int)Math.round(Automated.MAX_CR_PENALTY * 100f) +
"%%";
115 if ((
int) crBonus < 100f) partially =
"partially ";
116 info.addPara(
"+%s combat readiness (maximum: %s); " + partially +
"offsets built-in " + penalty +
" penalty", 0f,
hc,
hc,
117 "" + (
int) crBonus +
"%",
124 public ScopeDescription getScopeDescription() {
125 return ScopeDescription.ALL_SHIPS;
129 public static class Level2
extends BaseSkillEffectDescription implements CharacterStatsSkillEffect {
131 public void apply(MutableCharacterStatsAPI stats, String
id,
float level) {
132 if (stats.isPlayerStats()) {
133 Misc.getAllowedRecoveryTags().add(Tags.AUTOMATED_RECOVERABLE);
137 public void unapply(MutableCharacterStatsAPI stats, String
id) {
138 if (stats.isPlayerStats()) {
139 Misc.getAllowedRecoveryTags().remove(Tags.AUTOMATED_RECOVERABLE);
143 public void createCustomDescription(MutableCharacterStatsAPI stats, SkillSpecAPI skill,
144 TooltipMakerAPI info,
float width) {
146 info.addPara(
"Enables the recovery of some automated ships, such as derelict drones",
hc, 0f);
147 info.addPara(
"Automated ships can only be captained by AI cores",
hc, 0f);
151 public String getEffectPerLevelDescription() {
155 public ScopeDescription getScopeDescription() {
156 return ScopeDescription.FLEET;