Skip to content

Commit

Permalink
show the initial tohit and roll on when trigging an automatic self hi…
Browse files Browse the repository at this point in the history
…t with wrecking ball
  • Loading branch information
kuronekochomusuke committed Nov 18, 2023
1 parent acac3e0 commit 9b95eac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion megamek/src/megamek/common/Report.java
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ public Report add(TargetRoll targetRoll) {
}

public Report add(Roll diceRoll) {
return addDataWithTooltip(String.valueOf(diceRoll.getReport()), diceRoll.getReport());
return addDataWithTooltip(String.valueOf(diceRoll.getIntValue()), diceRoll.getReport());
}

public Report addDataWithTooltip(Integer data, String tooltip) {
Expand Down
5 changes: 4 additions & 1 deletion megamek/src/megamek/server/GameManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -16318,9 +16318,12 @@ private void resolveClubAttack(PhysicalResult pr, int lastEntityId) {
if ((caa.getClub().getType().hasSubType(MiscType.S_FLAIL)
|| caa.getClub().getType().hasSubType(MiscType.S_WRECKING_BALL)) && (rollValue == 2)) {
// miss
r = new Report(4035);
r = new Report(4025);
r.subject = ae.getId();
r.add(toHit);
r.add(pr.roll);
addReport(r);
// setup miss
ToHitData newToHit = new ToHitData(TargetRoll.AUTOMATIC_SUCCESS, "hit with own flail/wrecking ball");
pr.damage = ClubAttackAction.getDamageFor(ae, caa.getClub(), false, caa.isZweihandering());
pr.damage = (pr.damage / 2) + (pr.damage % 2);
Expand Down

0 comments on commit 9b95eac

Please sign in to comment.