This adds in <Someone>'s autodig patch.
This commit is contained in:
@@ -2,6 +2,7 @@ Boolean options not under specific compile flags (with default values in []):
|
|||||||
(You can learn which options exist in your version by checking your current
|
(You can learn which options exist in your version by checking your current
|
||||||
option setting, which is reached via the 'O' cmd.)
|
option setting, which is reached via the 'O' cmd.)
|
||||||
|
|
||||||
|
autodig dig if moving and wielding digging tool [FALSE]
|
||||||
autopickup automatically pick up objects you move over [TRUE]
|
autopickup automatically pick up objects you move over [TRUE]
|
||||||
autoquiver when firing with an empty quiver, select some
|
autoquiver when firing with an empty quiver, select some
|
||||||
suitable inventory weapon to fill the quiver [FALSE]
|
suitable inventory weapon to fill the quiver [FALSE]
|
||||||
|
|||||||
@@ -1596,6 +1596,9 @@ Your starting alignment (align:lawful, align:neutral,
|
|||||||
or align:chaotic). You may specify just the first letter.
|
or align:chaotic). You may specify just the first letter.
|
||||||
The default is to randomly pick an appropriate alignment.
|
The default is to randomly pick an appropriate alignment.
|
||||||
Cannot be set with the `O' command.
|
Cannot be set with the `O' command.
|
||||||
|
.lp autodig
|
||||||
|
Automatically dig if you are wielding a digging tool and moving into a place
|
||||||
|
that can be dug (default false).
|
||||||
.lp "autopickup "
|
.lp "autopickup "
|
||||||
Automatically pick up things onto which you move (default on).
|
Automatically pick up things onto which you move (default on).
|
||||||
.lp "autoquiver "
|
.lp "autoquiver "
|
||||||
|
|||||||
@@ -2006,6 +2006,10 @@ or {\tt align:chaotic}). You may specify just the first letter.
|
|||||||
The default is to randomly pick an appropriate alignment.
|
The default is to randomly pick an appropriate alignment.
|
||||||
Cannot be set with the `{\tt O}' command.
|
Cannot be set with the `{\tt O}' command.
|
||||||
%.lp
|
%.lp
|
||||||
|
\item[\ib{autodig}]
|
||||||
|
Automatically dig if you are wielding a digging tool and moving into a place
|
||||||
|
that can be dug (default false).
|
||||||
|
%.lp
|
||||||
\item[\ib{autopickup}]
|
\item[\ib{autopickup}]
|
||||||
Automatically pick up things onto which you move (default on).
|
Automatically pick up things onto which you move (default on).
|
||||||
%.Ip
|
%.Ip
|
||||||
|
|||||||
@@ -469,6 +469,7 @@ blessed gold detection now detects anything made of gold, not just
|
|||||||
coins, including candelabrum and gold rings
|
coins, including candelabrum and gold rings
|
||||||
new T-shirt messages from Scott Bigham
|
new T-shirt messages from Scott Bigham
|
||||||
option to get rid of resistance 'sparkle' (shieldeffect) (Scott Bigham)
|
option to get rid of resistance 'sparkle' (shieldeffect) (Scott Bigham)
|
||||||
|
option for autodig (Malcolm Ryan)
|
||||||
glowing Sunsword (inspired by Slashem)
|
glowing Sunsword (inspired by Slashem)
|
||||||
msg_window option for ^P in TTY mode (Jay Tilton)
|
msg_window option for ^P in TTY mode (Jay Tilton)
|
||||||
ninjas should get multishot bonus with yumi and ya (Dylan O'Donnell)
|
ninjas should get multishot bonus with yumi and ya (Dylan O'Donnell)
|
||||||
|
|||||||
@@ -228,6 +228,7 @@ E boolean FDECL(dig_check, (struct monst *, BOOLEAN_P, int, int));
|
|||||||
E void FDECL(digactualhole, (int,int,struct monst *,int));
|
E void FDECL(digactualhole, (int,int,struct monst *,int));
|
||||||
E boolean FDECL(dighole, (BOOLEAN_P));
|
E boolean FDECL(dighole, (BOOLEAN_P));
|
||||||
E int FDECL(use_pick_axe, (struct obj *));
|
E int FDECL(use_pick_axe, (struct obj *));
|
||||||
|
E int FDECL(use_pick_axe2, (struct obj *));
|
||||||
E boolean FDECL(mdig_tunnel, (struct monst *));
|
E boolean FDECL(mdig_tunnel, (struct monst *));
|
||||||
E void FDECL(watch_dig, (struct monst *,XCHAR_P,XCHAR_P,BOOLEAN_P));
|
E void FDECL(watch_dig, (struct monst *,XCHAR_P,XCHAR_P,BOOLEAN_P));
|
||||||
E void NDECL(zap_dig);
|
E void NDECL(zap_dig);
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ struct flag {
|
|||||||
#ifdef MFLOPPY
|
#ifdef MFLOPPY
|
||||||
boolean asksavedisk;
|
boolean asksavedisk;
|
||||||
#endif
|
#endif
|
||||||
|
boolean autodig; /* MRKR: Automatically dig */
|
||||||
boolean autoquiver; /* Automatically fill quiver */
|
boolean autoquiver; /* Automatically fill quiver */
|
||||||
boolean beginner;
|
boolean beginner;
|
||||||
#ifdef MAIL
|
#ifdef MAIL
|
||||||
|
|||||||
19
src/dig.c
19
src/dig.c
@@ -773,9 +773,8 @@ struct obj *obj;
|
|||||||
char dirsyms[12];
|
char dirsyms[12];
|
||||||
char qbuf[QBUFSZ];
|
char qbuf[QBUFSZ];
|
||||||
register char *dsp = dirsyms;
|
register char *dsp = dirsyms;
|
||||||
register struct rm *lev;
|
|
||||||
register int rx, ry;
|
register int rx, ry;
|
||||||
int dig_target, res = 0;
|
int res = 0;
|
||||||
register const char *sdp;
|
register const char *sdp;
|
||||||
if(iflags.num_pad) sdp = ndir; else sdp = sdir; /* DICE workaround */
|
if(iflags.num_pad) sdp = ndir; else sdp = sdir; /* DICE workaround */
|
||||||
|
|
||||||
@@ -804,6 +803,22 @@ struct obj *obj;
|
|||||||
Sprintf(qbuf, "In what direction do you want to dig? [%s]", dirsyms);
|
Sprintf(qbuf, "In what direction do you want to dig? [%s]", dirsyms);
|
||||||
if(!getdir(qbuf))
|
if(!getdir(qbuf))
|
||||||
return(res);
|
return(res);
|
||||||
|
|
||||||
|
return(use_pick_axe2(obj));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* MRKR: use_pick_axe() is split in two to allow autodig to bypass */
|
||||||
|
/* the "In what direction do you want to dig?" query. */
|
||||||
|
/* use_pick_axe2() uses the existing u.dx, u.dy and u.dz */
|
||||||
|
|
||||||
|
int
|
||||||
|
use_pick_axe2(obj)
|
||||||
|
struct obj *obj;
|
||||||
|
{
|
||||||
|
register int rx, ry;
|
||||||
|
register struct rm *lev;
|
||||||
|
int dig_target;
|
||||||
|
|
||||||
if (u.uswallow && attack(u.ustuck)) {
|
if (u.uswallow && attack(u.ustuck)) {
|
||||||
; /* return(1) */
|
; /* return(1) */
|
||||||
} else if (Underwater) {
|
} else if (Underwater) {
|
||||||
|
|||||||
@@ -545,6 +545,14 @@ boolean test_only;
|
|||||||
} else if (tunnels(youmonst.data) && !needspick(youmonst.data)) {
|
} else if (tunnels(youmonst.data) && !needspick(youmonst.data)) {
|
||||||
/* Eat the rock. */
|
/* Eat the rock. */
|
||||||
if (!test_only && still_chewing(x,y)) return FALSE;
|
if (!test_only && still_chewing(x,y)) return FALSE;
|
||||||
|
} else if (flags.autodig && !flags.run && !flags.nopick && (uwep->otyp == PICK_AXE || uwep->otyp == DWARVISH_MATTOCK)) {
|
||||||
|
/* MRKR: Automatic digging when wielding the appropriate tool */
|
||||||
|
if (!test_only) {
|
||||||
|
use_pick_axe2(uwep);
|
||||||
|
flags.move = 0;
|
||||||
|
nomul(0);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if ( !test_only ) {
|
if ( !test_only ) {
|
||||||
if (Is_stronghold(&u.uz) && is_db_wall(x,y))
|
if (Is_stronghold(&u.uz) && is_db_wall(x,y))
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ static struct Bool_Opt
|
|||||||
#else
|
#else
|
||||||
{"asksavedisk", (boolean *)0, FALSE},
|
{"asksavedisk", (boolean *)0, FALSE},
|
||||||
#endif
|
#endif
|
||||||
|
{"autodig", &flags.autodig, FALSE},
|
||||||
{"autopickup", &flags.pickup, TRUE},
|
{"autopickup", &flags.pickup, TRUE},
|
||||||
{"autoquiver", &flags.autoquiver, FALSE},
|
{"autoquiver", &flags.autoquiver, FALSE},
|
||||||
#if defined(MICRO) && !defined(AMIGA)
|
#if defined(MICRO) && !defined(AMIGA)
|
||||||
|
|||||||
Reference in New Issue
Block a user