1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-07-28 05:22:48 +00:00

option -WT to teleport to a land, but without safety generation

This commit is contained in:
Zeno Rogue 2020-06-03 11:45:52 +02:00
parent b4b891a6dc
commit df2fc6726a
2 changed files with 14 additions and 3 deletions

View File

@ -649,12 +649,18 @@ int read_cheat_args() {
PHASEFROM(2); cheat(); reptilecheat = true; PHASEFROM(2); cheat(); reptilecheat = true;
} }
// cheats // cheats
else if(argis("-WT")) { else if(argis("-WS")) {
PHASE(3); PHASE(3);
shift(); shift();
activateSafety(readland(args())); activateSafety(readland(args()));
cheat(); cheat();
} }
else if(argis("-WT")) {
PHASE(3);
shift();
teleportToLand(readland(args()), false);
cheat();
}
else if(argis("-W2")) { else if(argis("-W2")) {
shift(); cheatdest = readland(args()); cheat(); shift(); cheatdest = readland(args()); cheat();
showstartmenu = false; showstartmenu = false;

View File

@ -218,7 +218,7 @@ EX void saveRecall(cellwalker cw2) {
} }
} }
EX void activateSafety(eLand l) { EX void teleportToLand(eLand l, bool make_it_safe) {
if(recallCell.at && activateRecall()) if(recallCell.at && activateRecall())
return; return;
savePrincesses(); savePrincesses();
@ -242,7 +242,7 @@ EX void activateSafety(eLand l) {
safetyland = l; safetyland = l;
safetyseed = hrandpos(); safetyseed = hrandpos();
clear_euland(firstland); clear_euland(firstland);
safety = true; avengers = 0; safety = make_it_safe; avengers = 0;
clearMemory(); clearMemory();
initcells(); initcells();
initgame(); initgame();
@ -255,6 +255,11 @@ EX void activateSafety(eLand l) {
restartGraph(); restartGraph();
} }
EX void activateSafety(eLand l) {
teleportToLand(l, true);
}
EX void placeGolem(cell *on, cell *moveto, eMonster m) { EX void placeGolem(cell *on, cell *moveto, eMonster m) {
if(on->monst == moFriendlyIvy) if(on->monst == moFriendlyIvy)
killMonster(on, moPlayer); killMonster(on, moPlayer);