Skip to content

Commit

Permalink
More cleanup around IBB cargo crits
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleet01 committed Dec 28, 2023
1 parent 1a8774e commit e248415
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions megamek/src/megamek/server/GameManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -24890,9 +24890,7 @@ private Vector<Report> applyAeroCritical(Aero aero, int loc, CriticalSlot cs, in
js = (Jumpship) aero;
}

// For testing purposes
// switch (cs.getIndex()) {
switch (Aero.CRIT_CARGO) {
switch (cs.getIndex()) {
case Aero.CRIT_NONE:
// no effect
r = new Report(6005);
Expand Down Expand Up @@ -25637,9 +25635,9 @@ private void applyCargoCritical(Aero aero, int damageCaused, Vector<Report> repo
// Prompt user, but just randomize bot's bombs to lose.
destroyed = (int) percentDestroyed * aero.getMaxIntBombPoints();
r = new Report(5605);
r.choose(!aero.getOwner().isBot());
r.subject = aero.getId();
r.addDesc(aero);
r.choose(!aero.getOwner().isBot());
r.add((int) destroyed);
reports.add(r);
int bombsDestroyed = (int) (aero.getInternalBombsDamageTotal() / destroyed);
Expand Down Expand Up @@ -25681,6 +25679,7 @@ private void applyCargoCritical(Aero aero, int damageCaused, Vector<Report> repo
}

private void damageBomb(Mounted bomb) {
bomb.setShotsLeft(0);
bomb.setHit(true);
if (bomb.getLinked() != null && (bomb.getLinked().getUsableShotsLeft() > 0)) {
bomb.getLinked().setHit(true);
Expand Down

0 comments on commit e248415

Please sign in to comment.