mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-10 17:30:33 +00:00
warning protection no longer evokes Flash/Lightning
This commit is contained in:
parent
a6151f185f
commit
68ba57142a
@ -246,6 +246,7 @@ bool pcmove::movepcto() {
|
|||||||
if(d >= 0 && !checkonly && subdir != 1 && subdir != -1) printf("subdir = %d\n", subdir);
|
if(d >= 0 && !checkonly && subdir != 1 && subdir != -1) printf("subdir = %d\n", subdir);
|
||||||
mip.t = NULL;
|
mip.t = NULL;
|
||||||
switchplaces = false;
|
switchplaces = false;
|
||||||
|
warning_shown = false;
|
||||||
|
|
||||||
if(d == MD_USE_ORB)
|
if(d == MD_USE_ORB)
|
||||||
return targetRangedOrb(multi::whereto[multi::cpid].tgt, roMultiGo);
|
return targetRangedOrb(multi::whereto[multi::cpid].tgt, roMultiGo);
|
||||||
@ -293,7 +294,7 @@ bool pcmove::movepcto() {
|
|||||||
|
|
||||||
if(items[itOrbFlash]) {
|
if(items[itOrbFlash]) {
|
||||||
if(checkonly) { nextmovetype = lmInstant; return true; }
|
if(checkonly) { nextmovetype = lmInstant; return true; }
|
||||||
if(orbProtection(itOrbFlash)) return true;
|
if(warning_shown || orbProtection(itOrbFlash)) return true;
|
||||||
activateFlash();
|
activateFlash();
|
||||||
checkmove();
|
checkmove();
|
||||||
return true;
|
return true;
|
||||||
@ -301,7 +302,7 @@ bool pcmove::movepcto() {
|
|||||||
|
|
||||||
if(items[itOrbLightning]) {
|
if(items[itOrbLightning]) {
|
||||||
if(checkonly) { nextmovetype = lmInstant; return true; }
|
if(checkonly) { nextmovetype = lmInstant; return true; }
|
||||||
if(orbProtection(itOrbLightning)) return true;
|
if(warning_shown || orbProtection(itOrbLightning)) return true;
|
||||||
activateLightning();
|
activateLightning();
|
||||||
checkmove();
|
checkmove();
|
||||||
return true;
|
return true;
|
||||||
@ -1277,11 +1278,13 @@ bool pcmove::stay() {
|
|||||||
inline bool movepcto(const movedir& md) { return movepcto(md.d, md.subdir); }
|
inline bool movepcto(const movedir& md) { return movepcto(md.d, md.subdir); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
EX bool warning_shown;
|
||||||
|
|
||||||
EX bool warningprotection(const string& s) {
|
EX bool warningprotection(const string& s) {
|
||||||
if(hardcore) return false;
|
if(hardcore) return false;
|
||||||
if(multi::activePlayers() > 1) return false;
|
if(multi::activePlayers() > 1) return false;
|
||||||
if(items[itWarning]) return false;
|
if(items[itWarning]) return false;
|
||||||
|
warning_shown = true;
|
||||||
pushScreen([s] () {
|
pushScreen([s] () {
|
||||||
gamescreen(1);
|
gamescreen(1);
|
||||||
dialog::addBreak(250);
|
dialog::addBreak(250);
|
||||||
|
Loading…
Reference in New Issue
Block a user