1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-05-02 05:11:22 +00:00

Protection from accidentally activating Flash/Lightning (not implemented)

This commit is contained in:
Zeno Rogue
2017-09-01 23:01:10 +02:00
parent c54ed7222f
commit 42da061f2f
2 changed files with 6 additions and 0 deletions

View File

@@ -6401,6 +6401,7 @@ bool movepcto(int d, int subdir, bool checkonly) {
if(!passable(c2, cwt.c, P_ISPLAYER | P_MIRROR | P_USEBOAT | P_FRIENDSWAP) && items[itOrbFlash]) {
if(checkonly) return true;
if(orbProtection(itOrbFlash)) return true;
activateFlash();
bfs();
if(multi::players > 1) { multi::whereto[multi::cpid].d = MD_UNDECIDED; return false; }
@@ -6410,6 +6411,7 @@ bool movepcto(int d, int subdir, bool checkonly) {
if(!passable(c2, cwt.c, P_ISPLAYER | P_MIRROR | P_USEBOAT | P_FRIENDSWAP) && items[itOrbLightning]) {
if(checkonly) return true;
if(orbProtection(itOrbLightning)) return true;
activateLightning();
keepLightning = true;
bfs();
@@ -6724,6 +6726,7 @@ bool movepcto(int d, int subdir, bool checkonly) {
if(items[itOrbFlash]) {
if(checkonly) return true;
if(orbProtection(itOrbFlash)) return true;
activateFlash();
checkmove();
return true;
@@ -6731,6 +6734,7 @@ bool movepcto(int d, int subdir, bool checkonly) {
if(items[itOrbLightning]) {
if(checkonly) return true;
if(orbProtection(itOrbLightning)) return true;
activateLightning();
checkmove();
return true;