Skip to content

Commit c82de13

Browse files
committed
Prevent levelporting throughout the Wizard's tower until the Wizard of Yendor has been defeated.
The revamped Wizard's tower was never meant to be skipped through to get to the Wizard. Levelporting through the Wizard's tower becomes available only after he has been initially defeated.
1 parent 416878a commit c82de13

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

doc/evilhack-changelog.md

+2
Original file line numberDiff line numberDiff line change
@@ -3393,4 +3393,6 @@ The following changes to date are:
33933393
- Underline peaceful monsters via config (tty and curses)
33943394
- New trap: ice
33953395
- Fix: cmap ordering in tilemap.c (addition of ice trap)
3396+
- Prevent levelporting throughout the Wizard's tower until the Wizard of
3397+
Yendor has been defeated
33963398

src/potion.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ register struct obj *otmp;
11371137
}
11381138

11391139
/* revamped wizard's tower is also prohibited */
1140-
if (Is_wiz2_level(&u.uz) || Is_wiz3_level(&u.uz)) {
1140+
if (On_W_tower_level(&u.uz)) {
11411141
You("have an uneasy feeling.");
11421142
goto no_rise;
11431143
}

src/teleport.c

+7
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,13 @@ level_tele()
863863
return;
864864
}
865865
}
866+
/* Prevent levelporting in the Wizard's tower until the
867+
Wizard has been defeated for the first time */
868+
if (!u.uevent.udemigod && On_W_tower_level(&u.uz)
869+
&& (!wizard || yn("The Wizard of Yendor has not been defeated. Override?") != 'y')) {
870+
pline("Powerful magic prevents you from teleporting.");
871+
return;
872+
}
866873
if ((Teleport_control && !Stunned) || wizard) {
867874
char qbuf[BUFSZ];
868875
int trycnt = 0;

0 commit comments

Comments
 (0)