Starsector API
Loading...
Searching...
No Matches
StormTricksterGhost.java
Go to the documentation of this file.
1package com.fs.starfarer.api.impl.campaign.ghosts.types;
2
3import com.fs.starfarer.api.Global;
4import com.fs.starfarer.api.campaign.CampaignFleetAPI;
5import com.fs.starfarer.api.campaign.SectorEntityToken;
6import com.fs.starfarer.api.impl.campaign.ghosts.BaseSensorGhost;
7import com.fs.starfarer.api.impl.campaign.ghosts.GBCircle;
8import com.fs.starfarer.api.impl.campaign.ghosts.GBITowardsEntity;
9import com.fs.starfarer.api.impl.campaign.ghosts.GBIntercept;
10import com.fs.starfarer.api.impl.campaign.ghosts.GBLeadPlayerTo;
11import com.fs.starfarer.api.impl.campaign.ghosts.GBStayInPlace;
12import com.fs.starfarer.api.impl.campaign.ghosts.GBStormArea;
13import com.fs.starfarer.api.impl.campaign.ghosts.SensorGhostManager;
14
16
17 public StormTricksterGhost(SensorGhostManager manager, SectorEntityToken target) {
18 super(manager, 40);
19
20 CampaignFleetAPI pf = Global.getSector().getPlayerFleet();
21
22 float circleRadius = genFloat(300f, 400f);
23
25 if (!placeNearPlayer()) {
27 return;
28 }
29
30 addBehavior(new GBIntercept(pf, 10f, 40, circleRadius + 500f, true));
31 addBehavior(new GBCircle(pf, genDelay(2f), 40, circleRadius, 1f));
32 addInterrupt(new GBITowardsEntity(genDelay(1.5f), pf, target));
33 addBehavior(new GBLeadPlayerTo(20f, target, genFloat(500f, 600f), 25));
34 addBehavior(new GBStayInPlace(0.4f + manager.getRandom().nextFloat() * 0.3f));
35 addBehavior(new GBStormArea(1000f));
36 }
37
38}
39
40
41
42
43
44
static SectorAPI getSector()
Definition Global.java:59
void addInterrupt(GhostBehaviorInterrupt interrupt)
StormTricksterGhost(SensorGhostManager manager, SectorEntityToken target)