Skip to content

Commit 6657a66

Browse files
committed
Allow Illithids with intrinsic flying to enter into and stay in pools/moats.
Much like the Monk with intrinsic water walking commit (0d4dce6), this commit allows Illithids that have gained intrinsic flying to go for a swim, and they'll stay at the bottom of the pool if they have a means of breathing underwater. There's a fix here as well. I noticed that when flying or having intrinsic water walking, you couldn't get back out of the water unless you climbed out to adjacent dry land. That did not feel right, so now you can use the up command to step up/fly out of the water.
1 parent 0355268 commit 6657a66

File tree

4 files changed

+28
-4
lines changed

4 files changed

+28
-4
lines changed

doc/evilhack-changelog.md

+2
Original file line numberDiff line numberDiff line change
@@ -3415,4 +3415,6 @@ The following changes to date are:
34153415
- Sling bullets can have object properties
34163416
- New spell - critical healing
34173417
- New player race/role combo - giant Healer
3418+
- Allow Illithids with intrinsic flying to enter into and stay
3419+
in pools/moats
34183420

src/do.c

+21-2
Original file line numberDiff line numberDiff line change
@@ -1215,8 +1215,10 @@ dodown()
12151215
if (trap && (uteetering_at_seen_pit(trap) || uescaped_shaft(trap))) {
12161216
dotrap(trap, TOOKPLUNGE);
12171217
return 1;
1218-
} else if (IS_POOL(levl[u.ux][u.uy].typ) && HWwalking) {
1219-
/* Monks that have intrinsic water walking but
1218+
} else if (IS_POOL(levl[u.ux][u.uy].typ)
1219+
&& (HWwalking || HFlying)) {
1220+
/* Monks that have intrinsic water walking,
1221+
or Illithids that have obtained flight, but
12201222
still wish to go for a dip in the pool */
12211223
drown();
12221224
return 1;
@@ -1312,6 +1314,23 @@ doup()
13121314
return 1;
13131315
}
13141316

1317+
/* "up" to get out of a pool if you have
1318+
intrinsic water walking or flying */
1319+
if (u.uinwater && (HWwalking || HFlying)) {
1320+
boolean was_underwater = (Underwater && !Is_waterlevel(&u.uz));
1321+
1322+
You("%s out of the water.",
1323+
HWwalking ? "step up" : "fly");
1324+
u.uinwater = 0; /* leave the water */
1325+
if (was_underwater) { /* restore vision */
1326+
if (See_underwater)
1327+
vision_reset();
1328+
docrt();
1329+
vision_full_recalc = 1;
1330+
}
1331+
return 1;
1332+
}
1333+
13151334
if ((u.ux != xupstair || u.uy != yupstair)
13161335
&& (!xupladder || u.ux != xupladder || u.uy != yupladder)
13171336
&& (!sstairs.sx || u.ux != sstairs.sx || u.uy != sstairs.sy

src/hack.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2422,7 +2422,7 @@ boolean newspot; /* true if called by spoteffects */
24222422
still_inwater = TRUE;
24232423
} else if (Levitation) {
24242424
You("pop out of the %s like a cork!", hliquid("water"));
2425-
} else if (Flying) {
2425+
} else if (EFlying) { /* extrinsic source only */
24262426
You("fly out of the %s.", hliquid("water"));
24272427
} else if (EWwalking) { /* extrinsic source only */
24282428
You("slowly rise above the surface.");

src/trap.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -4613,7 +4613,10 @@ drown()
46134613

46144614
if (!u.uinwater) {
46154615
You("%s into the %s%c",
4616-
(Is_waterlevel(&u.uz) || HWwalking) ? "plunge" : "fall",
4616+
(Is_waterlevel(&u.uz)
4617+
? "plunge" : HWwalking
4618+
? "step down" : HFlying
4619+
? "fly down" : "fall"),
46174620
hliquid(!is_sewage(u.ux, u.uy) ? "water" : "sewage"),
46184621
Amphibious || Swimming ? '.' : '!');
46194622
if (!Swimming && !Is_waterlevel(&u.uz))

0 commit comments

Comments
 (0)