32 if (stats.getEntity() instanceof ShipAPI) {
33 ShipAPI ship = (ShipAPI) stats.getEntity();
34 if (!ship.getHullSpec().isPhase())
return false;
35 return !ship.getCaptain().isDefault();
37 FleetMemberAPI member = stats.getFleetMember();
38 if (member ==
null)
return false;
39 if (!member.isPhaseShip())
return false;
40 return !member.getCaptain().isDefault();
43 public static boolean isPhase(MutableShipStatsAPI stats) {
44 FleetMemberAPI member = stats.getFleetMember();
45 if (member ==
null)
return false;
46 return member.isPhaseShip();
49 public static class Level0
implements DescriptionSkillEffect {
50 public String getString() {
51 return "\n*The sensor strength of phase ships also contributes to the fleetwide stealth bonus granted by the Phase Field hullmod.";
53 public Color[] getHighlightColors() {
56 public String[] getHighlights() {
59 public Color getTextColor() {
115 public static class Level3
extends BaseSkillEffectDescription implements ShipSkillEffect, FleetTotalSource {
117 public FleetTotalItem getFleetTotalItem() {
121 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String
id,
float level) {
127 stats.getPeakCRDuration().modifyFlat(
id, peakBonus);
130 stats.getSensorStrength().modifyPercent(
id, sensorBonus);
133 stats.getDynamic().getMod(Stats.PHASE_CLOAK_SPEED_MOD).modifyFlat(
id, speedBonus);
134 stats.getDynamic().getMod(Stats.PHASE_CLOAK_ACCEL_MOD).modifyFlat(
id, speedBonus);
138 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String
id) {
139 stats.getPeakCRDuration().unmodifyFlat(
id);
140 stats.getSensorStrength().unmodifyPercent(
id);
141 stats.getDynamic().getMod(Stats.PHASE_CLOAK_SPEED_MOD).unmodifyFlat(
id);
142 stats.getDynamic().getMod(Stats.PHASE_CLOAK_ACCEL_MOD).unmodifyFlat(
id);
145 public String getEffectDescription(
float level) {
156 public void createCustomDescription(MutableCharacterStatsAPI stats, SkillSpecAPI skill,
157 TooltipMakerAPI info,
float width) {
175 info.addPara(
"+%s seconds peak operating time for combat phase ships (maximum: %s)", 0f,
hc,
hc,
176 "" + (
int) peakBonus,
178 info.addPara(
"+%s top speed and acceleration while phase cloak active (maximum: %s)", 0f,
hc,
hc,
179 "" + (
int) speedBonus +
"%",
181 info.addPara(
"+%s to sensor strength of combat phase ships* (maximum: %s)", 0f,
hc,
hc,
182 "" + (
int) sensorBonus +
"%",
189 public ScopeDescription getScopeDescription() {
190 return ScopeDescription.ALL_SHIPS;