-
Notifications
You must be signed in to change notification settings - Fork 340
Implement Mek Abandonment per TacOps:AR p.165 and Reorganize Ejection Options #7842
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
Conversation
…n Options --- PR Body ## Summary Implements Mek abandonment per TacOps: Advanced Rules p.165 and reorganizes ejection/crew game options under Advanced Rules for better discoverability. ## What's New ### Mek Abandonment (TacOps:AR p.165) - Meks that are **prone AND shutdown** can announce abandonment during Movement Phase - Crew exits during End Phase of the **following turn** (two-phase process) - Creates MekWarrior entity in same/adjacent hex - **Mek remains intact** on battlefield (unlike ejection which destroys cockpit) - Multi-crew Meks create separate MekWarrior for each crew member ### Game Options Reorganization All ejection/crew options moved to Advanced Rules section: - TacOps Vehicle Crews - Skin of the Teeth Ejection - Units Can Be Abandoned (+ note about vehicle requirement) - Ejected Crews Flee - Auto Eject on Destruction (renamed from "Auto Abandon Unit") - Conditional Ejection ### Option Improvements - "Units Can Be Abandoned" description now notes vehicles require TacOps Vehicle Crews - Combined redundant "Ejected Crews Flee" and "Auto Eject on Destruction" via helper method - Backwards compatible (option keys unchanged, only display names updated) ## Key Differences: Abandonment vs Ejection | Aspect | Abandonment | Ejection | |--------|-------------|----------| | Unit Status | Remains INTACT | Cockpit DESTROYED | | Timing | Two-phase (announce → execute next turn) | Immediate | | Piloting Roll | Not required | Required | | Result | Crewless salvage | Destroyed unit | ## Test Plan ### Unit Tests - 18 automated tests in `AbandonmentTest.java` - Covers `canAbandon()`, `isAbandoned()`, pending state management - All tests passing ### Manual Testing Scenarios - [ ] Basic Mek abandonment flow (prone + shutdown → abandon → MekWarrior exits) - [ ] Abandonment cancellation when Mek stands up or restarts - [ ] Multi-crew Meks (Command Console creates 2 MekWarriors) - [ ] Tank abandonment requires both options enabled - [ ] Stacking limit handling (MekWarrior to adjacent hex) - [ ] No legal hex available (abandonment fails gracefully) - [ ] Abandoned Mek can be targeted and destroyed - [ ] Abandoned Mek not selectable for movement - [ ] Ejection vs abandonment comparison (cockpit intact vs destroyed) - [ ] Auto Eject options work identically (combined via helper) - [ ] Backwards compatibility with saved games ## Known Limitations - Re-crewing abandoned Meks: Not implemented (future feature) - Boarding actions: Cannot board to take control (future feature) - Princess AI: Does not use abandonment strategically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements Mek abandonment per TacOps: Advanced Rules p.165, introducing a two-phase abandonment process where crews can exit prone and shutdown Meks without destroying the unit. It also reorganizes ejection/crew game options under Advanced Rules for better discoverability.
Key Changes:
- Implements two-phase Mek abandonment (announce during Movement/End Phase → execute next End Phase)
- Adds abandonment support for vehicles (requires TacOps Vehicle Crews option)
- Reorganizes all ejection/crew options from various sections into Advanced Rules
- Refactors auto-eject logic using helper method
shouldAutoEjectOnDestruction()
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| AbandonmentTest.java | Comprehensive unit tests for Mek/Tank abandonment state management and eligibility checks |
| TWPhasePreparationManager.java | Adds processUnitAbandonments() call to End Phase processing |
| TWGameManager.java | Core abandonment logic including announce/execute flow, multi-crew reporting, and auto-eject refactoring |
| TWDamageManagerModular.java | Updates auto-eject calls to use new shouldAutoEjectOnDestruction() helper |
| TWDamageManager.java | Updates auto-eject calls to use new shouldAutoEjectOnDestruction() helper |
| MovePathHandler.java | Minor formatting change (blank line removal) |
| Tank.java | Implements canAbandon() and isAbandoned() for vehicle abandonment |
| Mek.java | Implements canAbandon() (prone+shutdown requirement) and isAbandoned() for Meks |
| Entity.java | Adds pending abandonment state fields and prevents actions when abandonment is pending |
| GameOptions.java | Reorganizes ejection/crew options from multiple sections into Advanced Rules |
| PacketCommand.java | Adds ENTITY_ABANDON_ANNOUNCE packet command |
| MoveStepType.java | Adds ABANDON move step type |
| MoveCommand.java | Adds MOVE_ABANDON command for Movement Phase UI |
| ReportDisplay.java | Adds Abandon button and dialog trigger for End Phase |
| MovementDisplay.java | Adds Abandon button handler for Movement Phase Mek abandonment |
| AbandonUnitDialog.java | New dialog for selecting units to abandon during End Phase |
| Client.java | Adds sendUnitAbandonmentAnnouncement() method |
| report-messages.properties | Updates report 2027 and adds new abandonment reports (5325-5330) |
| options/messages.properties | Updates option descriptions for reorganized ejection/crew options |
| client/messages.properties | Adds UI strings for abandonment dialogs and buttons |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I'm pretty sure that the TO Vehicle Crews option should not be required here for anything vehicle-abandonment-related. That optional rule generates certain effects in gameplay based on the size of the vehicle crew, but the actual crew size is tracked for abandonment purposes regardless of whether it is active or not. The only relevant portion - that vehicle crews have one member per 15 tons, round up - is also present in TechManual page 103, specifically for combat vehicles (support vehicles have different crew requirements, detailed in TM page 131). |
Yeah, I misread the rules on this, will fix. |
…ment()
- Mek abandonment during Movement Phase now properly calls
announceUnitAbandonment() and generates game reports
- Previously the ABANDON step was added but never processed
2. Removed ADVANCED_TAC_OPS_TANK_CREWS requirement from Tank.canAbandon()
- Vehicle crew size (1 per 15 tons) is defined in TM p.103 as a base rule
- TacOps Vehicle Crews option adds crew specialization mechanics,
not crew size itself
- Vehicle abandonment now only requires the eject/abandon option
…ement-Abandonment
Fixes #7842 1. Added missing ABANDON step handler in MovePathHandler.processMovement() - Mek abandonment during Movement Phase now properly calls announceUnitAbandonment() and generates game reports - Previously the ABANDON step was added but never processed 2. Removed ADVANCED_TAC_OPS_TANK_CREWS requirement from Tank.canAbandon() - Vehicle crew size (1 per 15 tons) is defined in TM p.103 as a base rule - TacOps Vehicle Crews option adds crew specialization mechanics, not crew size itself - Vehicle abandonment now only requires the eject/abandon option 3. Updated AbandonmentTest to match corrected behavior - Removed obsolete test for TacOps option requirement - Updated test names and removed unnecessary mock setups
…ment()
- Mek abandonment during Movement Phase now properly calls
announceUnitAbandonment() and generates game reports
2. Removed ADVANCED_TAC_OPS_TANK_CREWS requirement from Tank.canAbandon()
- Vehicle crew size (1 per 15 tons) is defined in TM p.103 as a base rule
- Vehicle abandonment now only requires the eject/abandon option
3. Updated AbandonmentTest to match corrected behavior
4. Added warning dialog when starting up a Mek with pending abandonment
- User is now warned that startup will cancel the pending abandonment
5. Fixed units with pending abandonment being skipped in Movement Phase
- Units now get their turn so they can startup (cancel abandonment)
or skip their turn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Tested and i can't find anything not working. |
Sleet01
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
Implements Mek abandonment per TacOps: Advanced Rules p.165 and reorganizes ejection/crew game options under Advanced Rules for better discoverability.
Fixes #3716
What's New
Mek Abandonment (TacOps:AR p.165)
Game Options Reorganization
All ejection/crew options moved to Advanced Rules section:
Option Improvements
Key Differences: Abandonment vs Ejection
Test Plan
Unit Tests
AbandonmentTest.javacanAbandon(),isAbandoned(), pending state managementManual Testing Scenarios
Known Limitations