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

@@ -97,6 +97,7 @@ don't allow polymorphed player to web over the stairs
geographical shopkeeper updates
stethoscope use should be free the first time it's use per player move
travel command caches last position to make non-mouse less painful
update pit trapped time when polymorphing to or from a monster that passes_walls
Platform- and/or Interface-Specific Fixes

View File

@@ -549,11 +549,12 @@ int ttyp;
if(at_u) {
if (!wont_fall) {
if (!Passes_walls)
u.utrap = rn1(4,2);
u.utraptype = TT_PIT;
vision_full_recalc = 1; /* vision limits change */
u.utraptype = TT_PIT;
vision_full_recalc = 1; /* vision limits change */
} else
u.utrap = 0;
u.utrap = 0;
if (oldobjs != newobjs) /* something unearthed */
(void) pickup(1); /* detects pit */
} else if(mtmp) {

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 */