auto-charged teleport in bounded minefield

This commit is contained in:
Zeno Rogue 2019-04-10 02:33:54 +02:00
parent 5e9a54129b
commit 14b32ced68
4 changed files with 10 additions and 0 deletions

View File

@ -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<cell*> 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;

View File

@ -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); }

View File

@ -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) {

View File

@ -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++;
}