Prisoner feature bugfix (#110)

* Allow game to continue after offering to surrender to enemies

* Fix issues related to surrender and POW quests

- Quests were ended prematurely if one had prisoners in both alma and tixa
- Strategic status flags for rescue/escape were not set properly
- Only the maximum amount a prison can hold will be taken as POWs, rest of the mercs will either escape or have to fight to the death, to prevent a player having unrescuable POWs
- Capturing a mercenary had a lot of functions called that should not have been, IF the merc is not going to be captured after all

* Switch all tactical surrender calls to use one unified function

* Only mercs that are capable can escape

Incapacitated mercs left behind will die.
Should probably prioritize incapacitated mercs to be captured by the enemy to prevent needless deaths

* Combine pow quest state changes into one function

* Add JumpIntoEscapedSector to header file

* Allow enemy to demand surrender even if they already have POWs in Tixa and Alma

* Remove surrender from UB

* Address review feedback
This commit is contained in:
Asdow
2023-01-22 23:35:08 +02:00
committed by GitHub
parent 57d2674f37
commit ae1fd0a2ee
21 changed files with 434 additions and 351 deletions
+2
View File
@@ -886,6 +886,8 @@ enum
STR_PRISONER_DETECTION_VIP,
STR_PRISONER_REFUSE_SURRENDER_LEADER,
STR_PRISONER_TURN_VOLUNTEER,
STR_PRISONER_ESCAPE,
STR_PRISONER_NO_ESCAPE,
TEXT_NUM_PRISONER_STR
};
+2
View File
@@ -9194,6 +9194,8 @@ STR16 szPrisonerTextStr[]=
L"一个高阶军官%s被发现!", //L"A high-ranking army officer in %s has been revealed!",
L"敌方领袖拒绝考虑投降!", //L"The enemy leader refuses to even consider surrender!",
L"%d名囚犯自愿加入我军。", //L"%d prisoners volunteered to join our forces.",
L"Some of your mercs managed to escape the enemy capture!",
L"No possible escape is seen, it's a fight to the death!"
};
STR16 szMTATextStr[]=
+2
View File
@@ -9205,6 +9205,8 @@ STR16 szPrisonerTextStr[]=
L"A high-ranking army officer in %s has been revealed!", // TODO.Translate
L"The enemy leader refuses to even consider surrender!",
L"%d prisoners volunteered to join our forces.",
L"Some of your mercs managed to escape the enemy capture!",
L"No possible escape is seen, it's a fight to the death!"
};
STR16 szMTATextStr[]= // TODO.Translate
+2
View File
@@ -9194,6 +9194,8 @@ STR16 szPrisonerTextStr[]=
L"A high-ranking army officer in %s has been revealed!",
L"The enemy leader refuses to even consider surrender!",
L"%d prisoners volunteered to join our forces.",
L"Some of your mercs managed to escape the enemy capture!",
L"No possible escape is seen, it's a fight to the death!"
};
STR16 szMTATextStr[]=
+2
View File
@@ -9187,6 +9187,8 @@ STR16 szPrisonerTextStr[]=
L"A high-ranking army officer in %s has been revealed!", // TODO.Translate
L"The enemy leader refuses to even consider surrender!",
L"%d prisoners volunteered to join our forces.",
L"Some of your mercs managed to escape the enemy capture!",
L"No possible escape is seen, it's a fight to the death!"
};
STR16 szMTATextStr[]=
+2
View File
@@ -9047,6 +9047,8 @@ STR16 szPrisonerTextStr[]=
L"Ein ranghoher Offizier in %s wurde enttarnt!",
L"Der feindliche Anführer denkt nicht mal an Kapitulation!",
L"%d Gefangene sind uns als Freiwillige beigetreten.",
L"Some of your mercs managed to escape the enemy capture!",
L"No possible escape is seen, it's a fight to the death!"
};
STR16 szMTATextStr[]=
+2
View File
@@ -9195,6 +9195,8 @@ STR16 szPrisonerTextStr[]=
L"A high-ranking army officer in %s has been revealed!", // TODO.Translate
L"The enemy leader refuses to even consider surrender!",
L"%d prisoners volunteered to join our forces.",
L"Some of your mercs managed to escape the enemy capture!",
L"No possible escape is seen, it's a fight to the death!"
};
STR16 szMTATextStr[]= // TODO.Translate
+2
View File
@@ -9209,6 +9209,8 @@ STR16 szPrisonerTextStr[]=
L"A high-ranking army officer in %s has been revealed!", // TODO.Translate
L"The enemy leader refuses to even consider surrender!",
L"%d prisoners volunteered to join our forces.",
L"Some of your mercs managed to escape the enemy capture!",
L"No possible escape is seen, it's a fight to the death!"
};
STR16 szMTATextStr[]= // TODO.Translate
+2
View File
@@ -9189,6 +9189,8 @@ STR16 szPrisonerTextStr[]=
L"В %s был раскрыт высокопоставленный офицер!",
L"Вражеский командир отказывается даже подумать о сдаче!",
L"%d заключенных добровольно присоединились к нашим силам.",
L"Some of your mercs managed to escape the enemy capture!",
L"No possible escape is seen, it's a fight to the death!"
};
STR16 szMTATextStr[]=