mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-27 01:14:52 +00:00
auto-charged teleport in bounded minefield
This commit is contained in:
parent
5e9a54129b
commit
14b32ced68
6
game.cpp
6
game.cpp
@ -1954,6 +1954,7 @@ void explodeMine(cell *c) {
|
|||||||
|
|
||||||
c->wall = waMineOpen;
|
c->wall = waMineOpen;
|
||||||
explosion(c, 20, 20);
|
explosion(c, 20, 20);
|
||||||
|
auto_teleport_charges();
|
||||||
}
|
}
|
||||||
|
|
||||||
void explodeBarrel(cell *c) {
|
void explodeBarrel(cell *c) {
|
||||||
@ -7401,6 +7402,11 @@ vector<cell*> adj_minefield_cells(cell *c) {
|
|||||||
return res;
|
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 uncoverMines(cell *c, int lev, int dist, bool just_checking) {
|
||||||
bool b = false;
|
bool b = false;
|
||||||
if(c->wall == waMineMine && just_checking) return true;
|
if(c->wall == waMineMine && just_checking) return true;
|
||||||
|
1
hyper.h
1
hyper.h
@ -781,6 +781,7 @@ bool isMultitile(eMonster m);
|
|||||||
void checkFreedom(cell *cf);
|
void checkFreedom(cell *cf);
|
||||||
int rosedist(cell *c);
|
int rosedist(cell *c);
|
||||||
bool canPushStatueOn(cell *c);
|
bool canPushStatueOn(cell *c);
|
||||||
|
void auto_teleport_charges();
|
||||||
|
|
||||||
namespace hive { void createBugArmy(cell *c); }
|
namespace hive { void createBugArmy(cell *c); }
|
||||||
namespace whirlpool { void generate(cell *wto); }
|
namespace whirlpool { void generate(cell *wto); }
|
||||||
|
2
orbs.cpp
2
orbs.cpp
@ -79,6 +79,7 @@ bool reduceOrbPower(eItem it, int cap) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if(items[it] > cap && timerghost) items[it] = cap;
|
if(items[it] > cap && timerghost) items[it] = cap;
|
||||||
|
auto_teleport_charges();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -571,6 +572,7 @@ void teleportTo(cell *dest) {
|
|||||||
checkmoveO();
|
checkmoveO();
|
||||||
|
|
||||||
movecost(from, dest, 2);
|
movecost(from, dest, 2);
|
||||||
|
auto_teleport_charges();
|
||||||
}
|
}
|
||||||
|
|
||||||
void jumpTo(cell *dest, eItem byWhat, int bonuskill, eMonster dashmon) {
|
void jumpTo(cell *dest, eItem byWhat, int bonuskill, eMonster dashmon) {
|
||||||
|
@ -302,6 +302,7 @@ void initgame() {
|
|||||||
#if CAP_INV
|
#if CAP_INV
|
||||||
if(inv::on) inv::init();
|
if(inv::on) inv::init();
|
||||||
#endif
|
#endif
|
||||||
|
auto_teleport_charges();
|
||||||
if(!use_special_land) {
|
if(!use_special_land) {
|
||||||
if(firstland != (princess::challenge ? laPalace : laIce)) cheater++;
|
if(firstland != (princess::challenge ? laPalace : laIce)) cheater++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user