1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-07 22:49:54 +00:00

bow:: while rosed, you can now only shoot when this kills a monster at point blank in the rose direction

This commit is contained in:
Zeno Rogue 2024-02-22 17:49:45 +01:00
parent 2a7e2e96ca
commit d86f70886d

View File

@ -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();