diff --git a/game.cpp b/game.cpp index 9a5de2e8..6f716e45 100644 --- a/game.cpp +++ b/game.cpp @@ -1954,6 +1954,7 @@ void explodeMine(cell *c) { c->wall = waMineOpen; explosion(c, 20, 20); + auto_teleport_charges(); } void explodeBarrel(cell *c) { @@ -7401,6 +7402,11 @@ vector adj_minefield_cells(cell *c) { return res; } +void auto_teleport_charges() { + if(specialland == laMinefield && firstland == laMinefield && bounded) + items[itOrbTeleport] = isFire(cwt.at->wall) ? 0 : 1; + } + bool uncoverMines(cell *c, int lev, int dist, bool just_checking) { bool b = false; if(c->wall == waMineMine && just_checking) return true; diff --git a/hyper.h b/hyper.h index 22162542..4431d8f8 100644 --- a/hyper.h +++ b/hyper.h @@ -781,6 +781,7 @@ bool isMultitile(eMonster m); void checkFreedom(cell *cf); int rosedist(cell *c); bool canPushStatueOn(cell *c); +void auto_teleport_charges(); namespace hive { void createBugArmy(cell *c); } namespace whirlpool { void generate(cell *wto); } diff --git a/orbs.cpp b/orbs.cpp index cf8fa7a6..ac7621dc 100644 --- a/orbs.cpp +++ b/orbs.cpp @@ -79,6 +79,7 @@ bool reduceOrbPower(eItem it, int cap) { return true; } if(items[it] > cap && timerghost) items[it] = cap; + auto_teleport_charges(); return false; } @@ -571,6 +572,7 @@ void teleportTo(cell *dest) { checkmoveO(); movecost(from, dest, 2); + auto_teleport_charges(); } void jumpTo(cell *dest, eItem byWhat, int bonuskill, eMonster dashmon) { diff --git a/system.cpp b/system.cpp index 0c7173f4..dcb76234 100644 --- a/system.cpp +++ b/system.cpp @@ -302,6 +302,7 @@ void initgame() { #if CAP_INV if(inv::on) inv::init(); #endif + auto_teleport_charges(); if(!use_special_land) { if(firstland != (princess::challenge ? laPalace : laIce)) cheater++; }