Skip to content

Conversation

@HammerGS
Copy link
Member

@HammerGS HammerGS commented Jan 8, 2026

Data part of MegaMek/megamek#7865

  Files Modified:

  | File                        | Changes                                                                  |
  |-----------------------------|--------------------------------------------------------------------------|
  | messages.properties         | Added 2 i18n keys: hullBreach, crewExited                                |
  | TWDamageManager.java        | Added import, replaced hardcoded "hull breach" with Messages.getString() |
  | TWGameManager.java          | Replaced hardcoded "crew exited" with Messages.getString()               |
  | CombatVehicleEscapePod.java | Closed 3 <p> tags in class JavaDoc                                       |

  Unstaged Changes Ready:

  megamek/resources/megamek/client/messages.properties
  megamek/src/megamek/client/ui/util/EntityWreckHelper.java
  megamek/src/megamek/common/units/CombatVehicleEscapePod.java
  megamek/src/megamek/server/totalWarfare/TWDamageManager.java
  megamek/src/megamek/server/totalWarfare/TWGameManager.java

  Also Ready (mm-data branch):

  - Branch: Add-CVEP-wreck-entry
  - Staged: data/images/units/wrecks/wreckset.txt with Life Boat entry
@HammerGS HammerGS changed the title Summary of Coding Standards Fixes Data part of Implementation CVEP Jan 8, 2026
HammerGS added a commit to MegaMek/megamek that referenced this pull request Jan 9, 2026
  ## Summary

Implements the Combat Vehicle Escape Pod (CVEP) system per Tactical
Operations: Advanced Units & Equipment p.121.

  **Key Features:**
- Combat vehicles with CVEP can launch escape pod during Movement Phase
  - Player selects landing hex in rear arc (0-4 hexes behind vehicle)
  - Piloting Skill Roll +2 for launch, +2 for landing
  - Failed rolls injure crew members
  - Surviving crew land in escape pod entity (Life Boat sprite)
  - Crew can exit pod as conventional foot infantry (unless in water)
  - Pod uses unique damage model: breached after >2 cumulative damage
  - Vehicle is destroyed after pod launch

  ## Changes

  ### New Files
  - `CombatVehicleEscapePod.java` - New entity extending EjectedCrew
  - `CombatVehicleEscapePodTest.java` - 554 lines of unit tests

  ### Core Changes
- `Tank.java` - Added `hasCombatVehicleEscapePod()`,
`hasUndamagedCombatVehicleEscapePod()`, `canLaunchEscapePod()`
  - `Entity.java` - Added `ETYPE_COMBAT_VEHICLE_ESCAPE_POD` constant
- `MiscType.java` - Added `tankSlots = 1` for critical hit vulnerability
  - `MoveStepType.java` - Added `LAUNCH_ESCAPE_POD`
  - `MoveStep.java` - Landing coordinate handling

  ### Server Logic
- `TWGameManager.java` - `launchCombatVehicleEscapePod()` and
`exitEscapePod()` methods
- `TWDamageManager.java` - Special damage handling (2-point breach
threshold)
  - `MovePathHandler.java` - Process escape pod launch move step

  ### UI
  - `MovementDisplay.java` - Hex selection UI with rear arc highlighting
  - `MoveCommand.java` - Added `MOVE_LAUNCH_ESCAPE_POD`
  - `messages.properties` - UI strings
  - `report-messages.properties` - 14 game log messages

  ### Validation
  - `TestTank.java` already validates CVEP must be in rear location

  ## Rules Implementation (TO:AUE p.121)

  | Rule | Status |
  |------|--------|
  | Only Combat Vehicles may mount CVEP | ✅ F_TANK_EQUIPMENT flag |
| CVEP treated as weapon item in rear | ✅ tankSlots = 1, rear location
enforced |
  | Can be damaged by critical hits | ✅ Hittable slot in rear |
  | Launch during Movement Phase | ✅ Via button/hex selection |
  | PSR +2 for launch | ✅ In launchCombatVehicleEscapePod() |
  | Pod travels up to 4 hexes behind | ✅ Rear arc hex selection |
  | Landing roll +2 | ✅ In launchCombatVehicleEscapePod() |
  | Failed rolls = crew injury | ✅ Decrements surviving crew |
  | Crew as conventional foot infantry | ✅ Can exit pod as EjectedCrew |
  | Pod breached after >2 damage | ✅ BREACH_THRESHOLD = 2 |
  | Vehicle destroyed after launch | ✅ destroyEntity() called |

  ## Test Plan

  - [x] Unit tests pass (29 tests in CombatVehicleEscapePodTest)
  - [x] Manual test: Equip vehicle with CVEP in MegaMekLab
  - [x] Manual test: Launch pod during game, verify hex selection
  - [x] Manual test: Verify pod appears with Life Boat sprite
  - [x] Manual test: Exit pod as infantry
  - [x] Manual test: Attack pod, verify breach at 3+ damage
  - [x] Manual test: Critical hit to rear damages CVEP

  ## Known Limitations

1. **Crew injury tracking**: Currently decrements crew count rather than
applying specific damage to individual crew members. TODO comment notes
MekHQ coordination needed for campaign continuity.

  ## Screenshots

  [Add screenshots of hex selection UI and game log output]

<img width="304" height="354" alt="image"
src="https://github.com/user-attachments/assets/27a9e2f9-845f-4804-8a80-1ad149327285"
/><img width="400" height="455" alt="image"
src="https://github.com/user-attachments/assets/1e779e61-c1f2-442a-9795-aa66d1f3a25d"
/>

<img width="403" height="383" alt="image"
src="https://github.com/user-attachments/assets/19bc0690-9a08-4997-ad14-746db23c5e81"
/><img width="707" height="391" alt="image"
src="https://github.com/user-attachments/assets/18c3eeab-4bca-42d9-bf69-a5cdc90dd5f6"
/>

<img width="476" height="406" alt="image"
src="https://github.com/user-attachments/assets/849e1804-1ec4-4c1a-8432-d360fca49336"
/>


  
  Requires MegaMek/mm-data#239
@HammerGS HammerGS merged commit f1e8ecb into main Jan 9, 2026
4 checks passed
@HammerGS HammerGS deleted the Add-CVEP-wreck-entry branch January 9, 2026 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants