U491: xorns, digging and pits

Digging a pit while a xorn set the trap time, but falling into a pit did
not.  While lookin at this, it occurred to me that the same inconsistency
might occur while polymorhing from/to a xorn, and there was.
This commit is contained in:
cohrs
2003-06-30 06:08:06 +00:00
parent fc40ccd7d2
commit 669633eb21
3 changed files with 19 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ const char *fmt, *arg;
{
boolean sticky = sticks(youmonst.data) && u.ustuck && !u.uswallow,
was_mimicking = (youmonst.m_ap_type == M_AP_OBJECT);
boolean could_pass_walls = Passes_walls;
boolean was_blind = !!Blind;
if (Upolyd) {
@@ -87,6 +87,11 @@ const char *fmt, *arg;
if (u.twoweap && !could_twoweap(youmonst.data))
untwoweapon();
if (u.utraptype == TT_PIT) {
if (could_pass_walls) { /* player forms cannot pass walls */
u.utrap = rn1(6,2);
}
}
if (was_blind && !Blind) { /* reverting from eyeless */
Blinded = 1L;
make_blinded(0L, TRUE); /* remove blindness */
@@ -331,6 +336,7 @@ int mntmp;
{
boolean sticky = sticks(youmonst.data) && u.ustuck && !u.uswallow,
was_blind = !!Blind, dochange = FALSE;
boolean could_pass_walls = Passes_walls;
int mlvl;
if (mvitals[mntmp].mvflags & G_GENOD) { /* allow G_EXTINCT */
@@ -462,6 +468,13 @@ int mntmp;
else
u.uundetected = 0;
if (u.utraptype == TT_PIT) {
if (could_pass_walls && !Passes_walls) {
u.utrap = rn1(6,2);
} else if (!could_pass_walls && Passes_walls) {
u.utrap = 0;
}
}
if (was_blind && !Blind) { /* previous form was eyeless */
Blinded = 1L;
make_blinded(0L, TRUE); /* remove blindness */