From 9bc0623022251da87b7611e671abe18bcf699be8 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 17 May 2022 09:44:18 +0200 Subject: [PATCH] disable_orb_range cheat for presentations --- orbs.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/orbs.cpp b/orbs.cpp index 952f5227..bb39a6f2 100644 --- a/orbs.cpp +++ b/orbs.cpp @@ -1257,6 +1257,8 @@ EX int check_vault(cell *cf, cell *ct, flagtype flags, cell*& jumpthru) { return 6; } +EX bool disable_orb_range = false; + EX eItem targetRangedOrb(cell *c, orbAction a) { if(!haveRangedOrb()) { @@ -1282,15 +1284,17 @@ EX eItem targetRangedOrb(cell *c, orbAction a) { // (-1) distance - if(c == cwt.at || isNeighbor(cwt.at, c)) { - if(!isWeakCheck(a)) - addMessage(XLAT("You cannot target that close!")); - return itNone; - } - if(c->cpdist > 7) { - if(!isWeakCheck(a)) - addMessage(XLAT("You cannot target that far away!")); - return itNone; + if(!disable_orb_range) { + if(c == cwt.at || isNeighbor(cwt.at, c)) { + if(!isWeakCheck(a)) + addMessage(XLAT("You cannot target that close!")); + return itNone; + } + if(c->cpdist > 7) { + if(!isWeakCheck(a)) + addMessage(XLAT("You cannot target that far away!")); + return itNone; + } } vector orb_error_messages;