diff --git a/megamek/src/megamek/common/actions/ChargeAttackAction.java b/megamek/src/megamek/common/actions/ChargeAttackAction.java index c28e8e092fd..3a15cbc5991 100644 --- a/megamek/src/megamek/common/actions/ChargeAttackAction.java +++ b/megamek/src/megamek/common/actions/ChargeAttackAction.java @@ -236,6 +236,7 @@ public ToHitData toHit(Game game, Targetable target, Coords src, int base = ae.getCrew().getPiloting(); toHit = new ToHitData(base, "base"); + toHit.addModifier(0, "Charge"); // attacker movement toHit.append(Compute.getAttackerMovementModifier(game, ae.getId(), movement)); diff --git a/megamek/src/megamek/common/actions/ClubAttackAction.java b/megamek/src/megamek/common/actions/ClubAttackAction.java index c9558b39259..46fe69db251 100644 --- a/megamek/src/megamek/common/actions/ClubAttackAction.java +++ b/megamek/src/megamek/common/actions/ClubAttackAction.java @@ -479,8 +479,8 @@ public static ToHitData toHit(Game game, int attackerId, // Various versions of physical weapons have different base bonuses and // penalties. - base += getHitModFor(clubType); toHit = new ToHitData(base, "base"); + toHit.addModifier(getHitModFor(clubType), clubType.getName()); PhysicalAttackAction.setCommonModifiers(toHit, game, ae, target); diff --git a/megamek/src/megamek/common/actions/DfaAttackAction.java b/megamek/src/megamek/common/actions/DfaAttackAction.java index 1cbc6c55d40..19f2e21a36c 100644 --- a/megamek/src/megamek/common/actions/DfaAttackAction.java +++ b/megamek/src/megamek/common/actions/DfaAttackAction.java @@ -302,6 +302,7 @@ public static ToHitData toHit(Game game, int attackerId, int base = ae.getCrew().getPiloting(); toHit = new ToHitData(base, "base"); + toHit.addModifier(0, "DFA"); // BMR(r), page 33. +3 modifier for DFA on infantry. if (te instanceof Infantry) { diff --git a/megamek/src/megamek/common/actions/JumpJetAttackAction.java b/megamek/src/megamek/common/actions/JumpJetAttackAction.java index c0b1708d392..650a18e1ce3 100644 --- a/megamek/src/megamek/common/actions/JumpJetAttackAction.java +++ b/megamek/src/megamek/common/actions/JumpJetAttackAction.java @@ -227,10 +227,11 @@ public static ToHitData toHit(Game game, int attackerId, Targetable target, int } // Set the base BTH - int base = ae.getCrew().getPiloting() + 2; + int base = ae.getCrew().getPiloting(); // Start the To-Hit toHit = new ToHitData(base, "base"); + toHit.addModifier(+2, "Jump Jet"); setCommonModifiers(toHit, game, ae, target); diff --git a/megamek/src/megamek/common/actions/KickAttackAction.java b/megamek/src/megamek/common/actions/KickAttackAction.java index b79e00220d7..712fb11d471 100644 --- a/megamek/src/megamek/common/actions/KickAttackAction.java +++ b/megamek/src/megamek/common/actions/KickAttackAction.java @@ -244,11 +244,13 @@ public static ToHitData toHit(Game game, int attackerId, } // Set the base BTH - int base = ae.getCrew().getPiloting() - 2; + int base = ae.getCrew().getPiloting(); // Start the To-Hit toHit = new ToHitData(base, "base"); + toHit.addModifier(-2, "Kick"); + PhysicalAttackAction.setCommonModifiers(toHit, game, ae, target); // +3 modifier for kicking infantry in same hex diff --git a/megamek/src/megamek/common/actions/PunchAttackAction.java b/megamek/src/megamek/common/actions/PunchAttackAction.java index bc3e15b3788..055407fd60e 100644 --- a/megamek/src/megamek/common/actions/PunchAttackAction.java +++ b/megamek/src/megamek/common/actions/PunchAttackAction.java @@ -215,6 +215,8 @@ public static ToHitData toHit(Game game, int attackerId, toHit = new ToHitData(base, "base"); + toHit.addModifier(0, "Punch"); + PhysicalAttackAction.setCommonModifiers(toHit, game, ae, target); // Prone Meks can only punch vehicles in the same hex. diff --git a/megamek/src/megamek/common/actions/PushAttackAction.java b/megamek/src/megamek/common/actions/PushAttackAction.java index e2816f3817d..6db806ef1b1 100644 --- a/megamek/src/megamek/common/actions/PushAttackAction.java +++ b/megamek/src/megamek/common/actions/PushAttackAction.java @@ -246,9 +246,10 @@ public static ToHitData toHit(Game game, int attackerId, Targetable target) { } // Set the base BTH - int base = ae.getCrew().getPiloting() - 1; + int base = ae.getCrew().getPiloting(); toHit = new ToHitData(base, "base"); + toHit.addModifier(-1, "Push"); // attacker movement toHit.append(Compute.getAttackerMovementModifier(game, attackerId)); diff --git a/megamek/src/megamek/common/actions/TripAttackAction.java b/megamek/src/megamek/common/actions/TripAttackAction.java index 9eae15435b7..4d3cacf5476 100644 --- a/megamek/src/megamek/common/actions/TripAttackAction.java +++ b/megamek/src/megamek/common/actions/TripAttackAction.java @@ -160,10 +160,11 @@ public static ToHitData toHit(Game game, int attackerId, Targetable target) { } // Set the base BTH - int base = ae.getCrew().getPiloting() - 1; + int base = ae.getCrew().getPiloting(); // Start the To-Hit toHit = new ToHitData(base, "base"); + toHit.addModifier(-1, "Trip"); PhysicalAttackAction.setCommonModifiers(toHit, game, ae, target);