File tree 3 files changed +45
-4
lines changed
3 files changed +45
-4
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ v0.41.29-git
10
10
+ Fix #295: Variable contract length option no longer works
11
11
+ Fix #292: Starleague cache 1: IndexOutOfBoundsException when generating enemy
12
12
+ Fix #250: [AtB] Wrong deployment edge for bot reinforcements in Chase(Att) scenario.
13
+ + [AtB] Chase scenario uses unit speed to determine deployment turn.
13
14
14
15
v0.41.28 (2016-12-18 17:35 UTC)
15
16
+ Issue #237: Remove Tech From Lance assignments upon retiring
Original file line number Diff line number Diff line change @@ -167,8 +167,8 @@ public void run() {
167
167
entity .setOwner (client .getLocalPlayer ());
168
168
// Calculate deployment round
169
169
int speed = entity .getWalkMP ();
170
- if (unit . getEntity () .getJumpMP () > 0 ) {
171
- if (unit . getEntity () instanceof megamek .common .Infantry ) {
170
+ if (entity .getJumpMP () > 0 ) {
171
+ if (entity instanceof megamek .common .Infantry ) {
172
172
speed = entity .getJumpMP ();
173
173
} else {
174
174
speed ++;
@@ -195,6 +195,21 @@ public void run() {
195
195
continue ;
196
196
}
197
197
entity .setOwner (client .getLocalPlayer ());
198
+ int speed = entity .getWalkMP ();
199
+ if (entity .getJumpMP () > 0 ) {
200
+ if (entity instanceof megamek .common .Infantry ) {
201
+ speed = entity .getJumpMP ();
202
+ } else {
203
+ speed ++;
204
+ }
205
+ }
206
+ int deploymentRound = Math .max (entity .getDeployRound (), scenario .getDeploymentDelay () - speed );
207
+ if (scenario .getLanceRole () == Lance .ROLE_SCOUT
208
+ && scenario .getLance (campaign ).getForceId () == scenario .getLanceForceId ()
209
+ && !useDropship ) {
210
+ deploymentRound = Math .max (deploymentRound , 6 - speed );
211
+ }
212
+ entity .setDeployRound (Math .max (0 , deploymentRound ));
198
213
client .sendAddEntity (entity );
199
214
Thread .sleep (campaign .getCampaignOptions ().getStartGameDelay ());
200
215
}
Original file line number Diff line number Diff line change @@ -936,7 +936,7 @@ private void setStandardBattleForces(Campaign campaign) {
936
936
botForces .add (botForce );
937
937
938
938
break ;
939
- case CHASE :
939
+ case CHASE :
940
940
start = Board .START_S ;
941
941
enemyStart = Board .START_S ;
942
942
playerHome = Board .START_N ;
@@ -966,7 +966,32 @@ private void setStandardBattleForces(Campaign campaign) {
966
966
}
967
967
botForces .add (botForce );
968
968
969
- break ;
969
+ /* All forces deploy in 12 - WP turns */
970
+ deploymentDelay = 12 ;
971
+ for (Entity en : allyBot ) {
972
+ int speed = en .getWalkMP ();
973
+ if (en .getJumpMP () > 0 ) {
974
+ if (en instanceof megamek .common .Infantry ) {
975
+ speed = en .getJumpMP ();
976
+ } else {
977
+ speed ++;
978
+ }
979
+ }
980
+ en .setDeployRound (Math .max (0 , 12 - speed ));
981
+ }
982
+ for (Entity en : enemy ) {
983
+ int speed = en .getWalkMP ();
984
+ if (en .getJumpMP () > 0 ) {
985
+ if (en instanceof megamek .common .Infantry ) {
986
+ speed = en .getJumpMP ();
987
+ } else {
988
+ speed ++;
989
+ }
990
+ }
991
+ en .setDeployRound (Math .max (0 , 12 - speed ));
992
+ }
993
+
994
+ break ;
970
995
case PROBE :
971
996
start = playerHome = startPos [Compute .randomInt (4 )];
972
997
enemyStart = start + 4 ;
You can’t perform that action at this time.
0 commit comments