1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-18 19:24:48 +00:00

crossbow:: no time passes when shooting while unstable

This commit is contained in:
Zeno Rogue 2023-10-29 10:13:00 +01:00
parent 8185657768
commit 858db697d8
2 changed files with 10 additions and 0 deletions

View File

@ -248,6 +248,7 @@ EX void add_fire(cell *c) {
pcmove pcm;
pcm.checkonly = false;
changes.init(false);
addMessage(XLAT("Fire!"));
bool b = pcm.try_shooting(false);
if(!b) changes.rollback();
fire_mode = false;

View File

@ -265,6 +265,15 @@ bool pcmove::try_shooting(bool auto_target) {
if(gravity_state) markOrb(itOrbGravity);
}
lastmovetype = lmAttack; lastmove = NULL;
if(cellEdgeUnstable(cwt.at) || cwt.at->land == laWhirlpool) {
if(checkonly) return true;
if(changes.on) changes.commit();
addMessage(XLAT("(shooting while unstable -- no turn passes)"));
checkmove();
return true;
}
if(checkNeedMove(checkonly, false))
return false;
swordAttackStatic();