From d86f70886ddbee2d30dc1ed13511932fb3104cde Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 22 Feb 2024 17:49:45 +0100 Subject: [PATCH] bow:: while rosed, you can now only shoot when this kills a monster at point blank in the rose direction --- pcmove.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pcmove.cpp b/pcmove.cpp index ec7607c7..ddabd34c 100644 --- a/pcmove.cpp +++ b/pcmove.cpp @@ -275,6 +275,9 @@ bool pcmove::try_shooting(bool auto_target) { addMessage(XLAT("Fire!")); } items[itCrossbow] = bow::loading_time(); + cell *fst = cwt.peek(); + if(bow::bowpath.size() >= 1) fst = bow::bowpath[1].prev.at; + eMonster blocked = fst->monst; bow::shoot(); int v = -1; for(auto p: bow::bowpath) if(p.next.at == cwt.at && (p.flags & bow::bpFIRST)) v = p.next.spin; @@ -285,6 +288,13 @@ bool pcmove::try_shooting(bool auto_target) { if(gravity_state) markOrb(itOrbGravity); } + if(againstRose(cwt.at, nullptr) && !scentResistant() && (againstRose(cwt.at, fst) || blocked == fst->monst)) { + if(vmsg(miRESTRICTED, siROSE, nullptr, moNone)) { + addMessage(XLAT("You cannot stay in place and shoot, those roses smell too nicely.") + its(celldistance(cwt.at, fst))); + } + return false; + } + if(cellEdgeUnstable(cwt.at) || cwt.at->land == laWhirlpool) { if(checkonly) return true; if(changes.on) changes.commit();