Debug action: clear trapped souls
This commit is contained in:
@@ -2415,7 +2415,7 @@ void show_debug_help() {
|
||||
}
|
||||
|
||||
// Non-comprehensive list of unused keys:
|
||||
// chijklnoqvy @#$-_+[]{},.'"`~/\|;:
|
||||
// hijklnoqvy @#$-_+[]{},.'"`~/\|;:
|
||||
void init_debug_actions() {
|
||||
add_debug_action({'B'}, "Leave town", debug_leave_town);
|
||||
add_debug_action({'C'}, "Get cleaned up (lose negative status effects)", debug_clean_up);
|
||||
@@ -2448,6 +2448,7 @@ void init_debug_actions() {
|
||||
add_debug_action({'T'}, "Enter town", debug_enter_town);
|
||||
add_debug_action({'W'}, "Refresh jobs/shops", debug_refresh_stores);
|
||||
add_debug_action({'X'}, "Kill party", debug_kill_party);
|
||||
add_debug_action({'c'}, "Clear captured souls", clear_trapped_monst);
|
||||
add_debug_action({'='}, "Heal, increase magic skills", debug_heal_plus_extra);
|
||||
add_debug_action({'<'}, "Make one day pass", debug_increase_age);
|
||||
add_debug_action({'>'}, "Reset towns (excludes the one you're in, if any)", debug_towns_forget);
|
||||
@@ -4008,4 +4009,13 @@ void save_replay_log(){
|
||||
fs::path out_file = nav_put_rsrc({"xml"});
|
||||
|
||||
start_log_file(out_file.string());
|
||||
}
|
||||
|
||||
void clear_trapped_monst() {
|
||||
if(recording){
|
||||
record_action("clear_trapped_monst", "");
|
||||
}
|
||||
univ.party.imprisoned_monst.fill(0);
|
||||
ASB("Debug: Captures souls cleared.");
|
||||
print_buf();
|
||||
}
|
@@ -119,5 +119,6 @@ void easter_egg(int idx);
|
||||
void preview_dialog_xml();
|
||||
void preview_every_dialog_xml();
|
||||
void save_replay_log();
|
||||
void clear_trapped_monst();
|
||||
|
||||
#endif
|
||||
|
@@ -926,6 +926,8 @@ static void replay_action(Element& action) {
|
||||
debug_fight_encounter(str_to_bool(action.GetText()));
|
||||
}else if(t == "preview_every_dialog_xml"){
|
||||
preview_every_dialog_xml();
|
||||
}else if(t == "clear_trapped_monst"){
|
||||
clear_trapped_monst();
|
||||
}else if(t == "advance_time"){
|
||||
// This is bad regardless of strictness, because visual changes may have occurred which won't get redrawn/reprinted
|
||||
throw std::string { "Replay system internal error! advance_time() was supposed to be called by the last action, but wasn't: " } + _last_action_type;
|
||||
|
Reference in New Issue
Block a user