diff --git a/megamek/src/megamek/common/Aero.java b/megamek/src/megamek/common/Aero.java index 3af59370fde..7d7f30e0793 100644 --- a/megamek/src/megamek/common/Aero.java +++ b/megamek/src/megamek/common/Aero.java @@ -143,8 +143,8 @@ public String[] getLocationNames() { * applied before the attack resolves. */ private int altLossThisRound = 0; - private int avionicsHitsThisRound = 0; - private int controlHitsThisRound = 0; + private boolean avionicsHitThisRound = false; + private boolean controlHitThisRound = false; private boolean spheroid = false; @@ -762,21 +762,21 @@ public void setAvionicsHits(int hits) { } @Override - public int getAvionicsHitsThisRound() { - return avionicsHitsThisRound; + public boolean isAvionicsHitThisRound() { + return avionicsHitThisRound; } @Override - public void setAvionicsHitsThisRound(int hits) { - avionicsHitsThisRound = hits; + public void setAvionicsHitThisRound(boolean hit) { + avionicsHitThisRound = hit; } - public int getControlHitsThisRound() { - return controlHitsThisRound; + public boolean isControlHitThisRound() { + return controlHitThisRound; } - public void setControlHitsThisRound(int hits) { - controlHitsThisRound = hits; + public void setControlHitThisRound(boolean hit) { + controlHitThisRound = hit; } public boolean isGearHit() { @@ -1053,8 +1053,8 @@ public void newRound(int roundNumber) { setWhoFirst(); resetAltLossThisRound(); - setAvionicsHitsThisRound(0); - setControlHitsThisRound(0); + setAvionicsHitThisRound(false); + setControlHitThisRound(false); // Reset usedInternalBombs setUsedInternalBombs(0); diff --git a/megamek/src/megamek/common/IAero.java b/megamek/src/megamek/common/IAero.java index d50a788bddc..8896d30d431 100644 --- a/megamek/src/megamek/common/IAero.java +++ b/megamek/src/megamek/common/IAero.java @@ -107,9 +107,9 @@ public interface IAero { int getAvionicsHits(); - int getAvionicsHitsThisRound(); + boolean isAvionicsHitThisRound(); - void setAvionicsHitsThisRound(int i); + void setAvionicsHitThisRound(boolean hit); int getSensorHits(); diff --git a/megamek/src/megamek/common/LandAirMech.java b/megamek/src/megamek/common/LandAirMech.java index 71850cf3cfd..569b187bb80 100644 --- a/megamek/src/megamek/common/LandAirMech.java +++ b/megamek/src/megamek/common/LandAirMech.java @@ -126,7 +126,7 @@ public String[] getLocationAbbrs() { private int straightMoves = 0; private int altLoss = 0; private int altLossThisRound = 0; - private int avionicsHitsThisRound = 0; + private boolean avionicsHitThisRound = false; //Autoejection @@ -882,7 +882,7 @@ public void newRound(int roundNumber) { setWhoFirst(); resetAltLossThisRound(); - setAvionicsHitsThisRound(0); + setAvionicsHitThisRound(false); } } @@ -1335,13 +1335,13 @@ public int getAvionicsHits() { } @Override - public int getAvionicsHitsThisRound() { - return avionicsHitsThisRound; + public boolean isAvionicsHitThisRound() { + return avionicsHitThisRound; } @Override - public void setAvionicsHitsThisRound(int hits) { - avionicsHitsThisRound = hits; + public void setAvionicsHitThisRound(boolean hit) { + avionicsHitThisRound = hit; } @Override diff --git a/megamek/src/megamek/server/GameManager.java b/megamek/src/megamek/server/GameManager.java index c213847c4ea..9700308e8fb 100644 --- a/megamek/src/megamek/server/GameManager.java +++ b/megamek/src/megamek/server/GameManager.java @@ -24044,7 +24044,7 @@ private Vector applyMechSystemCritical(Entity en, int loc, CriticalSlot break; case LandAirMech.LAM_AVIONICS: if (en.getConversionMode() == LandAirMech.CONV_MODE_FIGHTER) { - ((LandAirMech)en).setAvionicsHitsThisRound(((LandAirMech)en).getAvionicsHitsThisRound() + 1); + ((LandAirMech)en).setAvionicsHitThisRound(true); if (en.isPartOfFighterSquadron()) { game.addControlRoll(new PilotingRollData( en.getTransportId(), 1, "avionics hit")); @@ -24343,7 +24343,7 @@ private Vector applyAeroCritical(Aero aero, int loc, CriticalSlot cs, in r.subject = aero.getId(); reports.add(r); aero.setAvionicsHits(aero.getAvionicsHits() + 1); - aero.setAvionicsHitsThisRound(aero.getAvionicsHitsThisRound() + 1); + aero.setAvionicsHitThisRound(true); if (aero.isPartOfFighterSquadron()) { game.addControlRoll(new PilotingRollData( aero.getTransportId(), 1, "avionics hit")); @@ -24360,7 +24360,7 @@ private Vector applyAeroCritical(Aero aero, int loc, CriticalSlot cs, in r = new Report(9115); r.subject = aero.getId(); reports.add(r); - aero.setControlHitsThisRound(aero.getControlHitsThisRound() + 1); + aero.setControlHitThisRound(true); if (aero.isPartOfFighterSquadron()) { game.addControlRoll(new PilotingRollData( aero.getTransportId(), 1, "critical hit"));