Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
8 changes: 7 additions & 1 deletion src/bones.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 5 additions & 3 deletions src/lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;*/
Expand All @@ -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)
Expand Down
8 changes: 5 additions & 3 deletions src/mthrowu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 0 additions & 4 deletions src/rnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion src/sp_lev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/zap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down