Kill party action: allow target single, specify death type
This commit is contained in:
@@ -33,6 +33,7 @@
|
|||||||
#include "dialogxml/dialogs/pictchoice.hpp"
|
#include "dialogxml/dialogs/pictchoice.hpp"
|
||||||
#include "dialogxml/dialogs/dialog.hpp"
|
#include "dialogxml/dialogs/dialog.hpp"
|
||||||
#include "dialogxml/dialogs/strdlog.hpp"
|
#include "dialogxml/dialogs/strdlog.hpp"
|
||||||
|
#include "dialogxml/dialogs/strchoice.hpp"
|
||||||
#include "dialogxml/widgets/scrollbar.hpp"
|
#include "dialogxml/widgets/scrollbar.hpp"
|
||||||
#include "boe.menus.hpp"
|
#include "boe.menus.hpp"
|
||||||
#include "tools/keymods.hpp"
|
#include "tools/keymods.hpp"
|
||||||
@@ -2142,6 +2143,22 @@ void debug_kill_party() {
|
|||||||
if(recording){
|
if(recording){
|
||||||
record_action("debug_kill_party", "");
|
record_action("debug_kill_party", "");
|
||||||
}
|
}
|
||||||
|
// New behavior to match debug_hurt_party and debug_give_status: allow choosing a PC,
|
||||||
|
// and the type of death
|
||||||
|
if(has_feature_flag("debug-kill-party", "V2")){
|
||||||
|
size_t choice = cStringChoice({"Dead", "Dust", "Stone"}, "Kill how?").show(-1);
|
||||||
|
if(choice == -1) return;
|
||||||
|
eMainStatus death_type = static_cast<eMainStatus>(static_cast<size_t>(eMainStatus::DEAD) + choice);
|
||||||
|
short pc = select_pc(0, "Kill who?", true);
|
||||||
|
if(pc == 6) return;
|
||||||
|
for(int i = 0; i < 6; ++i){
|
||||||
|
if(i == pc || (univ.party[i].is_alive() && pc == 7)) {
|
||||||
|
// Kill PCs so you can test resurrection (or game over)
|
||||||
|
kill_pc(univ.party[i], death_type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
advance_time(false, true, true);
|
||||||
|
}else{
|
||||||
std::string confirm = cChoiceDlog("kill-party-confirm",{"yes","no"}).show();
|
std::string confirm = cChoiceDlog("kill-party-confirm",{"yes","no"}).show();
|
||||||
if(confirm == "yes"){
|
if(confirm == "yes"){
|
||||||
for(short i = 0; i < 6; i++) {
|
for(short i = 0; i < 6; i++) {
|
||||||
@@ -2152,6 +2169,7 @@ void debug_kill_party() {
|
|||||||
add_string_to_buf("Debug: Kill the party.");
|
add_string_to_buf("Debug: Kill the party.");
|
||||||
advance_time(false, true, true);
|
advance_time(false, true, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void debug_hurt_party() {
|
void debug_hurt_party() {
|
||||||
|
|||||||
@@ -99,6 +99,9 @@ std::map<std::string,std::vector<std::string>> feature_flags = {
|
|||||||
// Legacy behavior of the T debug action (used by some replays)
|
// Legacy behavior of the T debug action (used by some replays)
|
||||||
// does not change the party's outdoors location
|
// does not change the party's outdoors location
|
||||||
{"debug-enter-town", {"move-outdoors"}},
|
{"debug-enter-town", {"move-outdoors"}},
|
||||||
|
// Legacy behavior of the X debug action (used by the OneOfEverything replay)
|
||||||
|
// kills the whole party with 'Absent' status
|
||||||
|
{"debug-kill-party", {"V2"}},
|
||||||
{"target-lock", {"V1"}},
|
{"target-lock", {"V1"}},
|
||||||
// New in-game save file picker
|
// New in-game save file picker
|
||||||
{"file-picker-dialog", {"V1"}}
|
{"file-picker-dialog", {"V1"}}
|
||||||
|
|||||||
Reference in New Issue
Block a user