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:
parent
2a7e2e96ca
commit
d86f70886d
10
pcmove.cpp
10
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();
|
||||
|
Loading…
Reference in New Issue
Block a user