Skip to content

Commit

Permalink
Simplify GM reinforcement logic in Stratcon wizard
Browse files Browse the repository at this point in the history
Removed unnecessary calculations and Support Point cost deduction for GM reinforcement attempts. Updated tooltip to reflect bypass of both reinforcement checks and Support Point costs. This clarifies and streamlines GM-specific functionality.
  • Loading branch information
IllianiCBT committed Jan 7, 2025
1 parent afa1d92 commit e8820f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion MekHQ/resources/mekhq/resources/AtBStratCon.properties
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ reinforcementConfirmation.confirmButton=Reinforce
reinforcementConfirmation.confirmButton.tooltip=Make reinforcement attempt.
reinforcementConfirmation.confirmButton.gm=Reinforce (GM)
reinforcementConfirmation.confirmButton.gm.tooltip=Make a reinforcement attempt, bypassing the\
\ reinforcement check.
\ reinforcement check and Support Point cost.
reinforcementConfirmation.cancelButton=Cancel
unitsSelectedLabel.bv=selected (ignores crew skill)
unitsSelectedLabel.count=selected
Expand Down
7 changes: 1 addition & 6 deletions MekHQ/src/mekhq/gui/stratcon/StratconScenarioWizard.java
Original file line number Diff line number Diff line change
Expand Up @@ -789,12 +789,7 @@ private void reinforcementConfirmDialog() {
JButton reinforceButtonGM = new JButton(resources.getString("reinforcementConfirmation.confirmButton.gm"));
reinforceButtonGM.setToolTipText(resources.getString("reinforcementConfirmation.confirmButton.gm.tooltip"));
reinforceButtonGM.addActionListener(evt -> {
int spentSupportPoints = (int) spnSupportPointCost.getValue();
int finalTargetNumber = targetNumber - ((spentSupportPoints - 1) * 2);

currentCampaignState.setSupportPoints(currentCampaignState.getSupportPoints() - spentSupportPoints);

btnCommitClicked(evt, finalTargetNumber, true);
btnCommitClicked(evt, 0, true);
dialog.dispose();
});
reinforceButtonGM.setVisible(campaign.isGM());
Expand Down

0 comments on commit e8820f4

Please sign in to comment.