Class PrisonerRansomEvent
java.lang.Object
mekhq.campaign.randomEvents.prisoners.PrisonerRansomEvent
Handles ransom events for prisoners of war (POWs) within the campaign.
This class manages both scenarios where the opposing force requests ransom for captured friendly personnel and where the player can accept ransom offers for enemy prisoners. It calculates the total ransom, determines the list of prisoners involved, and manages the corresponding financial and personnel updates based on the player's decision.
-
Constructor Summary
ConstructorsConstructorDescriptionPrisonerRansomEvent
(Campaign campaign, boolean isFriendlyPOWs) Creates a new ransom event for prisoners of war (POWs). -
Method Summary
-
Constructor Details
-
PrisonerRansomEvent
Creates a new ransom event for prisoners of war (POWs).Depending on the event type (friendly or enemy POWs), this constructor:
- Determines the list of prisoners involved in the ransom event.
- Calculates the ransom amount for the selected prisoners.
- Prompts the player to accept or decline the ransom via a dialog.
- Handles the financial transaction and updates the prisoners' status based on the player's choice.
- Parameters:
campaign
- The current campaign instance, which provides game state and relevant data.isFriendlyPOWs
-true
if the ransom event is for friendly POWs (player's personnel),false
if it's for enemy prisoners.
-