-
Notifications
You must be signed in to change notification settings - Fork 376
Implement RFE #7032 / Core Rules - Walk on deployment #8812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
TenkawaBC
wants to merge
99
commits into
MegaMek:main
Choose a base branch
from
TenkawaBC:walk-on-deployment
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 8 commits
Commits
Show all changes
99 commits
Select commit
Hold shift + click to select a range
8bf97da
Create the deployment step and wire it so that it sets the moved hexe…
TenkawaBC 3bcd4a8
Merge branch 'MegaMek:main' into walk-on-deployment
TenkawaBC 8ac357c
When determining turn order, exclude items from deployment if they ar…
TenkawaBC 2cea2a0
Tell entity only to do things when it is the right phase.
TenkawaBC 9e6a003
Deployment and movement working
TenkawaBC d1a5538
Deployment zone limited to 1 hex
TenkawaBC a58cf94
Merge branch 'MegaMek:main' into walk-on-deployment
TenkawaBC a269ff5
Adding server packet logic to handle movepath with deployment
TenkawaBC 655b6b7
Fixing method names to say deployment not initiative.
TenkawaBC dd90ed5
Adding null checks to guard against NPEs.
TenkawaBC 809e917
Merge branch 'MegaMek:main' into walk-on-deployment
TenkawaBC ed3a08f
Princess deploys correctly
TenkawaBC 7d467c9
Merge remote-tracking branch 'origin/walk-on-deployment' into walk-on…
TenkawaBC 6251f31
Correct MP used for first hex when not jumping.
TenkawaBC 04201c4
Add Option for enabling walk-on deployment with TW.
TenkawaBC e5ca205
Add Pre-game deployment (-1) to the lobby menu when walkOnDeployment …
TenkawaBC 2c1dd17
Merge branch 'main' into walk-on-deployment
HammerGS 6f17df8
Merge branch 'main' into walk-on-deployment
HammerGS 77ac96d
Walk on not skipped.
TenkawaBC 1c241fe
Merge remote-tracking branch 'origin/walk-on-deployment' into walk-on…
TenkawaBC 255f107
Changes for starting Width amounts
TenkawaBC 7c269cd
Set positioning of the deployment at the first step.
TenkawaBC b4f7fdd
Renamed walkOnDeployment to isWalkOnDeployment
TenkawaBC a95173f
String compares are now .equals instead of ==
TenkawaBC 34d2d4e
Starting to move common deployment code to DeploymentHelper from Depl…
TenkawaBC 2bf7b6c
Moved helper into clientGUI. Updated DeploymentDisplay to use helper,…
TenkawaBC 282850f
Deployment facing now working on deployment with shift.
TenkawaBC fa59836
Fixing Lobby to display pregame properly, and deployment zone when wi…
TenkawaBC 82b5fbc
Update logic
TenkawaBC 08646f4
Updating for movement
TenkawaBC cf9e0b7
Merge branch 'main' into walk-on-deployment
TenkawaBC a26c251
Removing a forbidden word.
TenkawaBC ffeb861
Fix player list to show proper deployment zone.
TenkawaBC 9757cb1
Trying to fix the starting width to display 1 when the deployment is …
TenkawaBC 0284467
Revert "Trying to fix the starting width to display 1 when the deploy…
TenkawaBC 3693a7a
Reapply "Trying to fix the starting width to display 1 when the deplo…
TenkawaBC 9e177bd
Back to not taking movement commands properly with deployment. my cle…
TenkawaBC a5ba994
Merge branch 'main' into walk-on-deployment
HammerGS b4a0f20
Moving deployment of loaded entities to a shared helper class on the …
TenkawaBC 6e1911f
Merge remote-tracking branch 'origin/walk-on-deployment' into walk-on…
TenkawaBC d652dac
Moving common code to DeploymentHelper
TenkawaBC 668c2bb
Making several fixes.
TenkawaBC 0ba5685
Merge branch 'main' into walk-on-deployment
HammerGS 0723a51
AI assisted.
TenkawaBC f883377
Merge remote-tracking branch 'origin/walk-on-deployment' into walk-on…
TenkawaBC 963888a
Fixing deployment processor test and helper
TenkawaBC 89f44e5
Fixing width getter to use common code, and ignore bots
TenkawaBC 35509cc
Board selections are working.
TenkawaBC b48beb5
Adding unit tests for the movement display.
TenkawaBC 9561e97
Merge branch 'main' into walk-on-deployment
TenkawaBC 7811358
Merge branch 'main' into walk-on-deployment
TenkawaBC 932c26c
New deployment facing code. It now faces the enemy rather than just a…
TenkawaBC 1e02132
Fixing AI identified issues.
TenkawaBC f6a909c
Something is broken in the mainline on this file. made minor change a…
TenkawaBC 62c8012
Removing old code
TenkawaBC 01017c1
removing unused variable
TenkawaBC ea629c5
Merge branch 'main' into walk-on-deployment
TenkawaBC 7a23c82
AI Assisted updates to the MovementDisplay tests to cover updates to …
TenkawaBC 82dd936
AI Created testing added for all the Rules classes
TenkawaBC fb5d024
tests(rules): add behavior-focused rules tests and headers\n\nCo-auth…
TenkawaBC bba428b
Updating to remove unused elements added by copilot
TenkawaBC 2eba672
Changing deployment width design to make it clear when walkon is occu…
TenkawaBC 57a4b57
Update the deployment elevation
TenkawaBC fc0114d
Clearing unused variable added by Copilot
TenkawaBC ed20269
Fixing test constructor
TenkawaBC 3896605
Dropship walk on now works without NPE.
TenkawaBC 9d7cb0b
Fixing Messages.properties
TenkawaBC 0e6513d
Merge branch 'main' into walk-on-deployment
TenkawaBC a402334
Gradle Spotless application and update to board starting position.
TenkawaBC 904dcb3
Allowing accelerate/decelerate with walk-on deployment
TenkawaBC 029244d
Add new movement button to clear the deployment (including elevation)
TenkawaBC 72786ed
Fixing issue from gradle spotlessApply
TenkawaBC 9263595
Switching from System.copyarray to Arrays.copyOf
TenkawaBC 6e2d5c9
Adding button to reset the deployment, handling the deployment with b…
TenkawaBC c61c4e8
Merge branch 'main' into walk-on-deployment
TenkawaBC f0444b7
Switching to a restrict deployment check that all the calls can use, …
TenkawaBC 9e7b5db
Spotless update
TenkawaBC a03c502
Changes to avoid NPEs on double-escape with dropships
TenkawaBC 6e92141
Changes to avoid NPEs on double-escape with dropships
TenkawaBC 3468e1a
Changes to avoid NPEs
TenkawaBC 5b50bb8
Merge remote-tracking branch 'megamek/main' into walk-on-deployment
TenkawaBC 1d63225
Spotless
TenkawaBC bed1a03
Merge remote-tracking branch 'megamek/main' into walk-on-deployment
TenkawaBC 5d0cd89
Adding back in walk-on-deployment code
TenkawaBC fa581ea
Removing unused variable
TenkawaBC 2eab127
spotless
TenkawaBC 20a0a56
Adding clear deployment to DeploymentDisplay. No NPE with dropships
TenkawaBC 843ceea
Due to NPEs around Dropship deployment in movement, and issues with m…
TenkawaBC 45f665d
Some guards. shouldn't be needed, but being careful
TenkawaBC 38ff20f
spotless
TenkawaBC 3b4b7ec
New method for figuring out the facing for deployment, and focus on s…
TenkawaBC ca94400
More null guards and removing an unused variable
TenkawaBC 96be27e
NPE now fixed. Dropships can return to walk-on deployment.
TenkawaBC 2290790
Merge branch 'main' into walk-on-deployment
TenkawaBC 82b6f16
Confirmed aerospace can move now.
TenkawaBC 77f2350
Starting facing now evaluated from the entity when the hex is clicked…
TenkawaBC a7ac8a3
Merge branch 'main' into walk-on-deployment
TenkawaBC df60f82
Deployment now says deploy on the hex
TenkawaBC bcf2255
Merge remote-tracking branch 'origin/walk-on-deployment' into walk-on…
TenkawaBC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| package megamek.common.moves; | ||
|
|
||
| /* | ||
| * Copyright (C) 2026 The MegaMek Team. All Rights Reserved. | ||
| * | ||
| * This file is part of MegaMek. | ||
| * | ||
| * MegaMek is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License (GPL), | ||
| * version 3 or (at your option) any later version, | ||
| * as published by the Free Software Foundation. | ||
| * | ||
| * MegaMek is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty | ||
| * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| * See the GNU General Public License for more details. | ||
| * | ||
| * A copy of the GPL should have been included with this project; | ||
| * if not, see <https://www.gnu.org/licenses/>. | ||
| * | ||
| * NOTICE: The MegaMek organization is a non-profit group of volunteers | ||
| * creating free software for the BattleTech community. | ||
| * | ||
| * MechWarrior, BattleMech, `Mech and AeroTech are registered trademarks | ||
| * of The Topps Company, Inc. All Rights Reserved. | ||
| * | ||
| * Catalyst Game Labs and the Catalyst Game Labs logo are trademarks of | ||
| * InMediaRes Productions, LLC. | ||
| * | ||
| * MechWarrior Copyright Microsoft Corporation. MegaMek was created under | ||
| * Microsoft's "Game Content Usage Rules" | ||
| * <https://www.xbox.com/en-US/developers/rules> and it is not endorsed by or | ||
| * affiliated with Microsoft. | ||
| */ | ||
|
|
||
| import java.util.EnumSet; | ||
| import java.util.Set; | ||
|
|
||
| import megamek.common.enums.MoveStepType; | ||
| import megamek.common.game.Game; | ||
| import megamek.common.pathfinder.CachedEntityState; | ||
| import megamek.common.units.Entity; | ||
|
|
||
| public class DeployStep implements PhasePass { | ||
| private static final EnumSet<MoveStepType> TYPES = EnumSet.of(MoveStepType.DEPLOY); | ||
|
|
||
| @Override | ||
| public Set<MoveStepType> getTypesOfInterest() { | ||
| return TYPES; | ||
| } | ||
|
|
||
| @Override | ||
| public PhasePassResult preCompilation(final MoveStep moveStep, final Game game, final Entity entity, MoveStep prev, | ||
| final CachedEntityState cachedEntityState) { | ||
| moveStep.setDeploying(true); | ||
| moveStep.setDistance(1); | ||
| return PhasePassResult.BREAK; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.