Skip to content

Commit

Permalink
check highest thresh even if a normal thresh happened; fix bug in str…
Browse files Browse the repository at this point in the history
…eam filter
  • Loading branch information
Algebro7 committed Aug 8, 2024
1 parent af48dd7 commit 5cced64
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions megamek/src/megamek/server/GameManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -19358,9 +19358,10 @@ void checkForPSRFromDamage() {
damThresh.addModifier(-1, "easy to pilot");
}
getGame().addControlRoll(damThresh);
} else if (getGame().getOptions().booleanOption(OptionsConstants.ADVAERORULES_ATMOSPHERIC_CONTROL)
&& entity.damageThisRound > ((IAero) entity).getHighestThresh()) {
// did the damage exceed the unit's highest threshold?
}
if (getGame().getOptions().booleanOption(OptionsConstants.ADVAERORULES_ATMOSPHERIC_CONTROL)
&& entity.damageThisPhase > ((IAero) entity).getHighestThresh()) {
// did the total damage this round exceed the unit's highest threshold?
PilotingRollData damThresh = new PilotingRollData(entity.getId(), 0,
"highest damage threshold exceeded");
if (entity.hasQuirk(OptionsConstants.QUIRK_POS_EASY_PILOT)
Expand Down Expand Up @@ -20296,7 +20297,7 @@ void resolveControlWithAdvAtmospheric(Entity e, PilotingRollData target, Vector<
if (modifier.getEntityId() != e.getId()) {
continue;
}
if (Stream.of("threshold exceeded", "avionics hit", "critical hit").anyMatch(s -> modifier.getDesc().contains(s))) {
if (Stream.of("threshold", "avionics hit", "critical hit").anyMatch(s -> modifier.getDesc().contains(s))) {
if (atmosphericControlRoll == null) {
atmosphericControlRoll = modifier;
} else {
Expand Down

0 comments on commit 5cced64

Please sign in to comment.