From a1072b57e2b9e53b283d9a98aa39e93481e341a5 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Tue, 27 Aug 2024 16:41:30 -0500 Subject: [PATCH] record and replay debug stealth, detect life, firewalk --- src/game/boe.actions.cpp | 21 ++++++++++++++------- src/game/boe.actions.hpp | 1 + src/game/boe.main.cpp | 2 ++ 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/game/boe.actions.cpp b/src/game/boe.actions.cpp index cfa950f2..819cbf04 100644 --- a/src/game/boe.actions.cpp +++ b/src/game/boe.actions.cpp @@ -1910,6 +1910,19 @@ void debug_clean_up() { put_pc_screen(); } +void debug_stealth_detect_life_firewalk() { + if(recording){ + record_action("debug_stealth_detect_life_firewalk", ""); + } + univ.party.status[ePartyStatus::STEALTH] += 10; + univ.party.status[ePartyStatus::DETECT_LIFE] += 10; + univ.party.status[ePartyStatus::FIREWALK] += 10; + add_string_to_buf("Debug: Stealth, Detect Life, Firewalk!"); + draw_text_bar(); + print_buf(); + put_pc_screen(); +} + bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){ bool are_done = false; location pass_point; // TODO: This isn't needed @@ -2115,13 +2128,7 @@ bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){ case 'E': if(!univ.debug_mode) break; - univ.party.status[ePartyStatus::STEALTH] += 10; - univ.party.status[ePartyStatus::DETECT_LIFE] += 10; - univ.party.status[ePartyStatus::FIREWALK] += 10; - add_string_to_buf("Debug: Stealth, Detect Life, Firewalk!"); - draw_text_bar(); - print_buf(); - put_pc_screen(); + debug_stealth_detect_life_firewalk(); break; case 'F': diff --git a/src/game/boe.actions.hpp b/src/game/boe.actions.hpp index 7a993ca4..fde200b0 100644 --- a/src/game/boe.actions.hpp +++ b/src/game/boe.actions.hpp @@ -80,5 +80,6 @@ void debug_magic_map(); void debug_enter_town(); void debug_refresh_stores(); void debug_clean_up(); +void debug_stealth_detect_life_firewalk(); #endif diff --git a/src/game/boe.main.cpp b/src/game/boe.main.cpp index 691fb63f..bd50f865 100644 --- a/src/game/boe.main.cpp +++ b/src/game/boe.main.cpp @@ -499,6 +499,8 @@ static void replay_next_action() { debug_refresh_stores(); }else if(t == "debug_clean_up"){ debug_clean_up(); + }else if(t == "debug_stealth_detect_life_firewalk"){ + debug_stealth_detect_life_firewalk(); } // TODO some of these actions shouldn't call advance_time(). They should return