From dc0b4228b3af5bc988ba0618a4d353d6630f6bb1 Mon Sep 17 00:00:00 2001 From: James Magnan Date: Fri, 8 Jan 2021 09:45:03 -0800 Subject: [PATCH 1/3] Potential fix for this issue by allowing isEligibleFor to proceed if the advanced artillery pre-plotted option is selected and artillery is present. This allows for the artillery to be plotted even with on-board artillery. --- megamek/src/megamek/common/Entity.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/megamek/src/megamek/common/Entity.java b/megamek/src/megamek/common/Entity.java index dde7d78435a..0560a2e273b 100644 --- a/megamek/src/megamek/common/Entity.java +++ b/megamek/src/megamek/common/Entity.java @@ -9761,7 +9761,12 @@ public int getKillerId() { public boolean isEligibleFor(IGame.Phase phase) { // only deploy in deployment phase if ((phase == IGame.Phase.PHASE_DEPLOYMENT) == isDeployed()) { - return false; + if ((isDeployed() == false) && isEligibleForTargetingPhase() && game.getOptions().booleanOption( + OptionsConstants.ADVCOMBAT_ON_MAP_PREDESIGNATE)) { + MegaMek.getLogger().info("Artillery Units Present and Advanced PreDesignate option enabled"); + } else { + return false; + } } // carcass can't do anything From 811c1394d8a7ccfc0c3ae61b2c51859098ef5f98 Mon Sep 17 00:00:00 2001 From: TenkawaBC <52716504+TenkawaBC@users.noreply.github.com> Date: Fri, 8 Jan 2021 10:59:44 -0800 Subject: [PATCH 2/3] Update megamek/src/megamek/common/Entity.java Co-authored-by: Christopher Watford --- megamek/src/megamek/common/Entity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/megamek/src/megamek/common/Entity.java b/megamek/src/megamek/common/Entity.java index 0560a2e273b..fef70c84c54 100644 --- a/megamek/src/megamek/common/Entity.java +++ b/megamek/src/megamek/common/Entity.java @@ -9763,7 +9763,7 @@ public boolean isEligibleFor(IGame.Phase phase) { if ((phase == IGame.Phase.PHASE_DEPLOYMENT) == isDeployed()) { if ((isDeployed() == false) && isEligibleForTargetingPhase() && game.getOptions().booleanOption( OptionsConstants.ADVCOMBAT_ON_MAP_PREDESIGNATE)) { - MegaMek.getLogger().info("Artillery Units Present and Advanced PreDesignate option enabled"); + MegaMek.getLogger().debug("Artillery Units Present and Advanced PreDesignate option enabled"); } else { return false; } From 4766f6a04f6b85f8304b8dc9dff29285ba47a01a Mon Sep 17 00:00:00 2001 From: TenkawaBC <52716504+TenkawaBC@users.noreply.github.com> Date: Fri, 8 Jan 2021 11:00:13 -0800 Subject: [PATCH 3/3] Update megamek/src/megamek/common/Entity.java Co-authored-by: Christopher Watford --- megamek/src/megamek/common/Entity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/megamek/src/megamek/common/Entity.java b/megamek/src/megamek/common/Entity.java index fef70c84c54..3033baf378f 100644 --- a/megamek/src/megamek/common/Entity.java +++ b/megamek/src/megamek/common/Entity.java @@ -9761,8 +9761,8 @@ public int getKillerId() { public boolean isEligibleFor(IGame.Phase phase) { // only deploy in deployment phase if ((phase == IGame.Phase.PHASE_DEPLOYMENT) == isDeployed()) { - if ((isDeployed() == false) && isEligibleForTargetingPhase() && game.getOptions().booleanOption( - OptionsConstants.ADVCOMBAT_ON_MAP_PREDESIGNATE)) { + if (!isDeployed() && isEligibleForTargetingPhase() + && game.getOptions().booleanOption(OptionsConstants.ADVCOMBAT_ON_MAP_PREDESIGNATE)) { MegaMek.getLogger().debug("Artillery Units Present and Advanced PreDesignate option enabled"); } else { return false;