From 5be9b1529ee5a8414bc9c1eaeb18ae86304a446b Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Thu, 19 Aug 2021 10:08:36 +0200 Subject: [PATCH] Do not use mana in god mode --- Source/spells.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/spells.cpp b/Source/spells.cpp index f98b63e76..418d1be74 100644 --- a/Source/spells.cpp +++ b/Source/spells.cpp @@ -7,6 +7,9 @@ #include "control.h" #include "cursor.h" +#ifdef _DEBUG +#include "debug.h" +#endif #include "engine/point.hpp" #include "engine/random.hpp" #include "gamemenu.h" @@ -171,7 +174,7 @@ void UseMana(int id, spell_id sn) break; case RSPLTYPE_SPELL: #ifdef _DEBUG - if (debug_mode_key_inverted_v) + if (DebugGodMode) break; #endif ma = GetManaAmount(myPlayer, sn); @@ -199,7 +202,7 @@ void EnsureValidReadiedSpell(PlayerStruct &player) SpellCheckResult CheckSpell(int id, spell_id sn, spell_type st, bool manaonly) { #ifdef _DEBUG - if (debug_mode_key_inverted_v) + if (DebugGodMode) return SpellCheckResult::Success; #endif