Skip to content

Commit

Permalink
feat: added nuke drawing for player commited war crimes
Browse files Browse the repository at this point in the history
  • Loading branch information
Scoppio committed Nov 17, 2024
1 parent b4b004a commit aca9459
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions megamek/src/megamek/common/weapons/AreaEffectHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,11 @@ public static DamageFalloff calculateDamageFallOff(AmmoType ammo, int attackingB
*/
public static void doNuclearExplosion(Entity entity, Coords coords, int nukeType, Vector<Report> vPhaseReport,
TWGameManager gameManager) {

// this +1 is necessary because the drawNuke method subtracts 1 from them
int[] nukeArgs = { coords.getX() + 1, coords.getY() + 1};
gameManager.drawNukeHitOnBoard(nukeArgs);

NukeStats nukeStats = getNukeStats(nukeType);

if (nukeStats == null) {
Expand Down
2 changes: 1 addition & 1 deletion megamek/src/megamek/server/totalwarfare/TWGameManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -20513,7 +20513,7 @@ void resolveScheduledOrbitalBombardments() {
getvPhaseReport().add(r);
}

private void drawNukeHitOnBoard(int[] nukeArgs) {
public void drawNukeHitOnBoard(int[] nukeArgs) {
var nuke = new OrbitalBombardment.Builder().x(nukeArgs[0] - 1).y(nukeArgs[1] -1).radius(4).damage(0).build();

var allCoords = nuke.getAllAffectedCoords();
Expand Down

0 comments on commit aca9459

Please sign in to comment.