diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..31ffcfca1e --- /dev/null +++ b/.gitignore @@ -0,0 +1,76 @@ +*.swp +*.swo +compile + +# / +/Makefile +/config.log +/config.status +/tags +/TAGS +/.svn + +# /dat/ +/dat/Makefile +/dat/*.lev +/dat/data +/dat/dungeon.pdf +/dat/dungeon +/dat/ghdat +/dat/options +/dat/oracles +/dat/quest.dat +/dat/quest_levs +/dat/rumors +/dat/spec_levs +/dat/vaults.dat +/dat/pet_mark.xbm +/dat/rip.xpm +/dat/x11tiles + + +# /doc/ +/doc/Makefile +/doc/Guidebook + +# /include/ +/include/autoconf.h +/include/autoconf_paths.h +/include/date.h +/include/dgn_comp.h +/include/lev_comp.h +/include/onames.h +/include/pm.h +/include/tile.h +/include/vis_tab.h +/include/win32api.h + +# /src/ +/src/*.o +/src/nhwin.a +/src/grunthack +/src/Makefile +/src/Sysunix +/src/config.h-t +/src/hack.h-t +/src/vis_tab.c +/src/monstr.c +/src/tile.c + +# /util/ +/util/*.o +/util/Makefile +/util/dgn_comp +/util/dgn_lex.c +/util/dgn_yacc.c +/util/dlb +/util/lev_comp +/util/lev_lex.c +/util/lev_yacc.c +/util/makedefs +/util/recover +/util/tile2x11 +/util/tilemap + +# /win/ +/win/*/*.o diff --git a/src/bones.c b/src/bones.c index addbaab49e..eea7ee0e29 100644 --- a/src/bones.c +++ b/src/bones.c @@ -78,7 +78,13 @@ boolean restore; *ONAME(otmp) = '\0'; } else if (otmp->oartifact && restore) artifact_exists(otmp,ONAME(otmp),TRUE,FALSE); - if (!restore) { + if (restore) { + /* keep ring/wand materials in line with appearance */ + if ((otmp->oclass == RING_CLASS) + || (otmp->oclass == WAND_CLASS)) { + otmp->omaterial = objects[otmp->otyp].oc_material; + } + } else { /* do not zero out o_ids for ghost levels anymore */ if(objects[otmp->otyp].oc_uses_known) otmp->known = 0; diff --git a/src/lock.c b/src/lock.c index 91b2a613b8..7f217a1377 100644 --- a/src/lock.c +++ b/src/lock.c @@ -107,7 +107,9 @@ picklock(VOID_ARGS) /* try to open/close a lock */ You("succeed in %s.", lock_action()); if (xlock.door) { - if(xlock.door->doormask & D_TRAPPED) { + if((xlock.door->doormask & D_TRAPPED) && !In_sokoban(&u.uz)) { + /* In soko, the "trap" is that the other doors seal + * We don't want to spring this trap on [un]locking */ boolean retval = !!(xlock.usedtime == 0); b_trapped("door", FINGER); /*xlock.door->doormask = D_NODOOR;*/ @@ -118,8 +120,8 @@ picklock(VOID_ARGS) /* try to open/close a lock */ exercise(A_DEX, TRUE); return retval; } else if (xlock.door->doormask & D_LOCKED) - xlock.door->doormask = D_CLOSED; - else xlock.door->doormask = D_LOCKED; + xlock.door->doormask = D_CLOSED | (xlock.door->doormask & D_TRAPPED); + else xlock.door->doormask = D_LOCKED | (xlock.door->doormask & D_TRAPPED); } else { xlock.box->olocked = !xlock.box->olocked; if(xlock.box->otrapped) diff --git a/src/mthrowu.c b/src/mthrowu.c index e83889ab10..ad5d8aceab 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -783,7 +783,9 @@ struct monst *mtmp; struct monst *mat, *mret = (struct monst *)0, *oldmret = (struct monst *)0; - boolean conflicted = Conflict && !resist(mtmp, RING_CLASS, 0, 0); + boolean conflicted = Conflict && couldsee(mtmp->mx,mtmp->my) && + (distu(mtmp->mx,mtmp->my) <= BOLT_LIM*BOLT_LIM) && + !resist(mtmp, RING_CLASS, 0, 0); if (is_covetous(mtmp->data) && !mtmp->mtame) { @@ -1136,13 +1138,13 @@ register struct attack *mattk; otmp = mksobj(ACID_VENOM, TRUE, FALSE); break; } - if(!rn2(BOLT_LIM-distmin(mtmp->mx,mtmp->my,mtmp->mux,mtmp->muy))) { + if(!rn2(BOLT_LIM-distmin(mtmp->mx,mtmp->my,mdef->mx,mdef->my))) { if (canseemon(mtmp)) { pline("%s spits venom!", Monnam(mtmp)); nomul(0); } m_throw(mtmp, mtmp->mx, mtmp->my, sgn(tbx), sgn(tby), - distmin(mtmp->mx,mtmp->my,mtmp->mux,mtmp->muy), otmp, + distmin(mtmp->mx,mtmp->my,mdef->mx,mdef->my), otmp, FALSE); return 0; } diff --git a/src/rnd.c b/src/rnd.c index 0cc021d583..8c68a3e002 100644 --- a/src/rnd.c +++ b/src/rnd.c @@ -22,16 +22,12 @@ int rn2(x) /* 0 <= rn2(x) < x */ register int x; { -#ifdef DEBUG if (x <= 0) { impossible("rn2(%d) attempted", x); return(0); } x = RND(x); return(x); -#else - return(RND(x)); -#endif } #endif /* OVL0 */ diff --git a/src/sp_lev.c b/src/sp_lev.c index 7739f40698..c76855f9e1 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -2867,7 +2867,7 @@ dlb *fd; } else { - if (x < 5 || x > COLNO-5 || y < 5 || y > COLNO - 5) + if (x < 5 || x > COLNO-5 || y < 5 || y > ROWNO - 5) goto try_again; inv_pos.x = x, inv_pos.y = y; } diff --git a/src/zap.c b/src/zap.c index 8b81463b52..cc778b47e1 100644 --- a/src/zap.c +++ b/src/zap.c @@ -4001,7 +4001,7 @@ boolean *shopdamage; int new_doormask = -1; const char *see_txt = 0, *sense_txt = 0, *hear_txt = 0; rangemod = -1000; - if ((lev->doormask | D_TRAPPED) && In_sokoban(&u.uz)) + if ((lev->doormask & D_TRAPPED) && In_sokoban(&u.uz)) goto def_case; switch(abstype) { case ZT_FIRE: