Starsector API
Loading...
Searching...
No Matches
BattleCreationContext.java
Go to the documentation of this file.
1package com.fs.starfarer.api.combat;
2
3import com.fs.starfarer.api.Global;
4import com.fs.starfarer.api.campaign.CampaignFleetAPI;
5import com.fs.starfarer.api.fleet.FleetGoal;
6import com.fs.starfarer.api.impl.campaign.ids.Factions;
7import com.fs.starfarer.api.impl.campaign.ids.MemFlags;
8
10
11 private float initialStepSize = 1f;
12 private float initialNumSteps = 0f;
13
14
15 private float initialDeploymentBurnDuration = 1f;
16 private float normalDeploymentBurnDuration = 6f;
17 private float escapeDeploymentBurnDuration = 1.5f;
18 private float standoffRange = 6000f;
19 private float initialEscapeRange = Global.getSettings().getFloat("escapeStartDistance");
20 private float flankDeploymentDistance = Global.getSettings().getFloat("escapeFlankDistance");
21
22
23 private CampaignFleetAPI playerFleet;
24 private FleetGoal playerGoal;
25 private CampaignFleetAPI otherFleet;
26 private FleetGoal otherGoal;
27
28 private float pursuitRangeModifier = 0f;
29
30 public float extraEnemyStandoffRange = 0f;
31
32 private int playerCommandPoints = 0;
33
34 public boolean aiRetreatAllowed = true;
35 public boolean objectivesAllowed = true;
36 public boolean forceObjectivesOnMap = false;
37 public boolean enemyDeployAll = false;
38// public boolean playerDefendingStation = false;
39// public boolean enemyDefendingStation = false;
40
41 public boolean fightToTheLast = false;
42
44 FleetGoal playerGoal, CampaignFleetAPI otherFleet,
45 FleetGoal otherGoal) {
46 this.playerFleet = playerFleet;
47 this.playerGoal = playerGoal;
48 this.otherFleet = otherFleet;
49 this.otherGoal = otherGoal;
50
51 if (otherFleet != null && otherFleet.getFaction() != null) {
55 }
56 fightToTheLast = ftl;
57 }
58 }
59
61 return playerCommandPoints;
62 }
63
64 public void setPlayerCommandPoints(int playerCommandPoints) {
65 this.playerCommandPoints = playerCommandPoints;
66 }
67
69 return playerFleet;
70 }
71
73 return playerGoal;
74 }
75
77 return otherFleet;
78 }
79
81 return otherGoal;
82 }
83
84 public float getPursuitRangeModifier() {
85 return pursuitRangeModifier;
86 }
87
88 public void setPursuitRangeModifier(float pursuitRangeModifier) {
89 this.pursuitRangeModifier = pursuitRangeModifier;
90 }
91
93 return initialDeploymentBurnDuration;
94 }
95
96 public void setInitialDeploymentBurnDuration(float initialDeploymentBurnDuration) {
97 this.initialDeploymentBurnDuration = initialDeploymentBurnDuration;
98 }
99
101 return normalDeploymentBurnDuration;
102 }
103
104 public void setNormalDeploymentBurnDuration(float normalDeploymentBurnDuration) {
105 this.normalDeploymentBurnDuration = normalDeploymentBurnDuration;
106 }
107
109 return escapeDeploymentBurnDuration;
110 }
111
112 public void setEscapeDeploymentBurnDuration(float escapeDeploymentBurnDuration) {
113 this.escapeDeploymentBurnDuration = escapeDeploymentBurnDuration;
114 }
115
116 public float getStandoffRange() {
117 return standoffRange;
118 }
119
120 public void setStandoffRange(float standoffRange) {
121 this.standoffRange = standoffRange;
122 }
123
124 public float getInitialEscapeRange() {
125 return initialEscapeRange;
126 }
127
128 public void setInitialEscapeRange(float initialEscapeRange) {
129 this.initialEscapeRange = initialEscapeRange;
130 }
131
133 return flankDeploymentDistance;
134 }
135
136 public void setFlankDeploymentDistance(float sideDeploymentDistance) {
137 this.flankDeploymentDistance = sideDeploymentDistance;
138 }
139
140 public float getInitialStepSize() {
141 return initialStepSize;
142 }
143
144 public void setInitialStepSize(float initialStepSize) {
145 this.initialStepSize = initialStepSize;
146 }
147
148 public float getInitialNumSteps() {
149 return initialNumSteps;
150 }
151
152 public void setInitialNumSteps(float initialNumSteps) {
153 this.initialNumSteps = initialNumSteps;
154 }
155
158 }
159
160}
161
162
163
164
static SettingsAPI getSettings()
Definition Global.java:57
void setInitialDeploymentBurnDuration(float initialDeploymentBurnDuration)
void setNormalDeploymentBurnDuration(float normalDeploymentBurnDuration)
void setEscapeDeploymentBurnDuration(float escapeDeploymentBurnDuration)
BattleCreationContext(CampaignFleetAPI playerFleet, FleetGoal playerGoal, CampaignFleetAPI otherFleet, FleetGoal otherGoal)
void setFlankDeploymentDistance(float sideDeploymentDistance)