Skip to content

Commit

Permalink
Merge pull request #4862 from kuronekochomusuke/issue4541
Browse files Browse the repository at this point in the history
fix #4541
  • Loading branch information
NickAragua authored Oct 31, 2023
2 parents 2e7699e + d44a332 commit 9d00faf
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions megamek/src/megamek/server/GameManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -32047,7 +32047,11 @@ private PhysicalResult preTreatPhysicalAttack(AbstractAttackAction aaa) {
int damage = 0;
PhysicalResult pr = new PhysicalResult();
ToHitData toHit = new ToHitData();
pr.roll = Compute.d6(2);
if (aaa instanceof PhysicalAttackAction && ae.getCrew() != null) {
pr.roll = ae.getCrew().rollPilotingSkill();
} else {
pr.roll = Compute.d6(2);
}
pr.aaa = aaa;
if (aaa instanceof BrushOffAttackAction) {
BrushOffAttackAction baa = (BrushOffAttackAction) aaa;
Expand All @@ -32061,7 +32065,11 @@ private PhysicalResult preTreatPhysicalAttack(AbstractAttackAction aaa) {
damage = BrushOffAttackAction.getDamageFor(ae, BrushOffAttackAction.LEFT);
pr.damageRight = BrushOffAttackAction.getDamageFor(ae, BrushOffAttackAction.RIGHT);
baa.setArm(arm);
pr.rollRight = Compute.d6(2);
if (ae.getCrew() != null) {
pr.rollRight = ae.getCrew().rollPilotingSkill();
} else {
pr.rollRight = Compute.d6(2);
}
} else if (aaa instanceof ChargeAttackAction) {
ChargeAttackAction caa = (ChargeAttackAction) aaa;
toHit = caa.toHit(game);
Expand Down Expand Up @@ -32151,7 +32159,11 @@ else if (clubType.hasSubType(MiscType.S_WRECKING_BALL)) {
}
pr.damageRight = damageRight;
pr.toHitRight = toHitRight;
pr.rollRight = Compute.d6(2);
if (ae.getCrew() != null) {
pr.rollRight = ae.getCrew().rollPilotingSkill();
} else {
pr.rollRight = Compute.d6(2);
}
} else if (aaa instanceof PushAttackAction) {
PushAttackAction paa = (PushAttackAction) aaa;
toHit = paa.toHit(game);
Expand Down

0 comments on commit 9d00faf

Please sign in to comment.