34 super.advance(amount, ghost, behavior);
37 if (
tracker.intervalElapsed()) {
39 CustomCampaignEntityAPI entity = ghost.
getEntity();
41 CampaignPingSpec custom =
new CampaignPingSpec();
48 custom.setDuration(0.5f);
49 custom.setAlphaMult(1f);
50 custom.setInFraction(0.1f);
52 custom.setColor(
new Color(255, 100, 100, 255));
58 if (ghost.
getEntity().isInCurrentLocation()) {
63 List<SectorEntityToken> list =
new ArrayList<SectorEntityToken>(entity.getContainingLocation().getFleets());
64 list.addAll(entity.getContainingLocation().getCustomEntities());
66 for (SectorEntityToken other : list) {
67 if (other.hasTag(Tags.IMMUNE_TO_REMORA_PULSE))
continue;
68 float dist = Misc.getDistance(entity, other) - entity.getRadius() - other.getRadius();
70 if (other.isPlayerFleet()) {
71 other.addFloatingText(
"Drive field drain!", Misc.getNegativeHighlightColor(), 1f,
true);
73 float mult = 0.5f + 0.5f * (1f - dist /
drainRange);
74 if (other instanceof CampaignFleetAPI) {