Merge branch 'master' into win32-x64-working
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
Developer.txt NHSUBST
|
*.txt NHSUBST
|
||||||
nhgitset.pl NHSUBST
|
nhgitset.pl NHSUBST
|
||||||
hooksdir/* NHSUBST
|
hooksdir/* NHSUBST
|
||||||
* text=auto
|
* text=auto
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
|___/\___|\_/\___|_\___/ .__/\___|_|
|
|___/\___|\_/\___|_\___/ .__/\___|_|
|
||||||
|_|
|
|_|
|
||||||
|
|
||||||
$NHDT-Date$
|
$NHDT-Date: 1429884664 2015/04/24 14:11:04 $
|
||||||
|
|
||||||
Welcome to the NetHack Infrastructure Developer's Guide.
|
Welcome to the NetHack Infrastructure Developer's Guide.
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
Git has a messy learning curve. This file is an attempt to serve as a quick
|
Git has a messy learning curve. This file is an attempt to serve as a quick
|
||||||
reference for basic tasks while you get up to speed.
|
reference for basic tasks while you get up to speed.
|
||||||
|
|
||||||
|
$NHDT-Date: 1429884051 2015/04/24 14:00:51 $
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
[*] git checkout [-f] (branch)
|
[*] git checkout [-f] (branch)
|
||||||
|
|||||||
@@ -430,6 +430,7 @@ barbed devil
|
|||||||
are quite difficult to kill.
|
are quite difficult to kill.
|
||||||
# takes "bat or bird" when specifying 'B'
|
# takes "bat or bird" when specifying 'B'
|
||||||
~combat
|
~combat
|
||||||
|
~wombat
|
||||||
*bat
|
*bat
|
||||||
bat or bird
|
bat or bird
|
||||||
A bat, flitting in the darkness outside, took the wrong turn
|
A bat, flitting in the darkness outside, took the wrong turn
|
||||||
|
|||||||
@@ -902,6 +902,7 @@ camera may contain a picture-painting demon
|
|||||||
some monsters can eat through iron bars
|
some monsters can eat through iron bars
|
||||||
inaccessible niches occasionally have iron bars in front
|
inaccessible niches occasionally have iron bars in front
|
||||||
sinks may teleport or polymorph
|
sinks may teleport or polymorph
|
||||||
|
shopkeepers give honorifics to vampires and elves
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
@@ -1125,6 +1126,8 @@ tribute to Terry Pratchett
|
|||||||
Some levels in Gehennom now use the old corridor-style maze instead of
|
Some levels in Gehennom now use the old corridor-style maze instead of
|
||||||
the new room-style. Beelzebub's level always does this and the
|
the new room-style. Beelzebub's level always does this and the
|
||||||
"beetle legs" are restored.
|
"beetle legs" are restored.
|
||||||
|
gnomes will occasionally have a candle
|
||||||
|
stop travel or run when you get hungry
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific New Features
|
Platform- and/or Interface-Specific New Features
|
||||||
|
|||||||
@@ -172,6 +172,8 @@
|
|||||||
#define is_mind_flayer(ptr) ((ptr) == &mons[PM_MIND_FLAYER] || \
|
#define is_mind_flayer(ptr) ((ptr) == &mons[PM_MIND_FLAYER] || \
|
||||||
(ptr) == &mons[PM_MASTER_MIND_FLAYER])
|
(ptr) == &mons[PM_MASTER_MIND_FLAYER])
|
||||||
|
|
||||||
|
#define is_vampire(ptr) ((ptr)->mlet == S_VAMPIRE)
|
||||||
|
|
||||||
#define nonliving(ptr) (is_golem(ptr) || is_undead(ptr) || \
|
#define nonliving(ptr) (is_golem(ptr) || is_undead(ptr) || \
|
||||||
(ptr)->mlet == S_VORTEX || \
|
(ptr)->mlet == S_VORTEX || \
|
||||||
(ptr) == &mons[PM_MANES])
|
(ptr) == &mons[PM_MANES])
|
||||||
|
|||||||
@@ -2711,6 +2711,7 @@ boolean incr;
|
|||||||
if (incr && occupation &&
|
if (incr && occupation &&
|
||||||
(occupation != eatfood && occupation != opentin))
|
(occupation != eatfood && occupation != opentin))
|
||||||
stop_occupation();
|
stop_occupation();
|
||||||
|
context.travel = context.travel1 = context.mv = context.run = 0;
|
||||||
break;
|
break;
|
||||||
case WEAK:
|
case WEAK:
|
||||||
if (Hallucination)
|
if (Hallucination)
|
||||||
@@ -2730,6 +2731,7 @@ boolean incr;
|
|||||||
if (incr && occupation &&
|
if (incr && occupation &&
|
||||||
(occupation != eatfood && occupation != opentin))
|
(occupation != eatfood && occupation != opentin))
|
||||||
stop_occupation();
|
stop_occupation();
|
||||||
|
context.travel = context.travel1 = context.mv = context.run = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
u.uhs = newhs;
|
u.uhs = newhs;
|
||||||
|
|||||||
+27
-2
@@ -710,12 +710,37 @@ register int type;
|
|||||||
return((struct obj *) 0);
|
return((struct obj *) 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Fictional and not-so-fictional currencies.
|
||||||
|
* http://concord.wikia.com/wiki/List_of_Fictional_Currencies */
|
||||||
|
static const char * const currencies[] = {
|
||||||
|
"Altarian Dollar", /* The Hitchhiker's Guide to the Galaxy */
|
||||||
|
"Ankh-Morpork Dollar", /* Discworld */
|
||||||
|
"auric", /* The Domination of Draka */
|
||||||
|
"buckazoid", /* Space Quest */
|
||||||
|
"cirbozoid", /* Starslip */
|
||||||
|
"credit chit", /* Deus Ex */
|
||||||
|
"cubit", /* Battlestar Galactica */
|
||||||
|
"Flanian Pobble Bead", /* The Hitchhiker's Guide to the Galaxy */
|
||||||
|
"fretzer", /* Jules Verne */
|
||||||
|
"imperial credit", /* Star Wars */
|
||||||
|
"Hong Kong Luna Dollar",/* The Moon is a Harsh Mistress */
|
||||||
|
"kongbuck", /* Snow Crash */
|
||||||
|
"nanite", /* System Shock 2 */
|
||||||
|
"quatloo", /* Sim City */
|
||||||
|
"simoleon", /* Sim City */
|
||||||
|
"solari", /* Spaceballs */
|
||||||
|
"spacebuck", /* Spaceballs */
|
||||||
|
"sporebuck", /* Spore */
|
||||||
|
"Triganic Pu", /* The Hitchhiker's Guide to the Galaxy */
|
||||||
|
"woolong", /* Cowboy Bebop */
|
||||||
|
};
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
currency(amount)
|
currency(amount)
|
||||||
long amount;
|
long amount;
|
||||||
{
|
{
|
||||||
if (amount == 1L) return "zorkmid";
|
if (amount == 1L) return (Hallucination ? currencies[rn2(SIZE(currencies))] : "zorkmid");
|
||||||
else return "zorkmids";
|
else return (Hallucination ? makeplural(currencies[rn2(SIZE(currencies))]) : "zorkmids");
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean
|
boolean
|
||||||
|
|||||||
@@ -618,6 +618,15 @@ register struct monst *mtmp;
|
|||||||
(void)mongets(mtmp, WAN_FIRE);
|
(void)mongets(mtmp, WAN_FIRE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case S_GNOME:
|
||||||
|
if (!rn2((In_mines(&u.uz) ? 5 : 10))) {
|
||||||
|
otmp = mksobj(rn2(4) ? TALLOW_CANDLE : WAX_CANDLE, TRUE, FALSE);
|
||||||
|
otmp->quan = 1;
|
||||||
|
otmp->owt = weight(otmp);
|
||||||
|
if (!mpickobj(mtmp, otmp) && !levl[mtmp->mx][mtmp->my].lit)
|
||||||
|
begin_burn(otmp, FALSE);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-11
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.5 pager.c $NHDT-Date: 1429408230 2015/04/19 01:50:30 $ $NHDT-Branch: master $:$NHDT-Revision: 1.62 $ */
|
/* NetHack 3.5 pager.c $NHDT-Date: 1429888966 2015/04/24 15:22:46 $ $NHDT-Branch: master $:$NHDT-Revision: 1.65 $ */
|
||||||
/* NetHack 3.5 pager.c $Date: 2012/01/15 09:27:06 $ $Revision: 1.41 $ */
|
/* NetHack 3.5 pager.c $Date: 2012/01/15 09:27:06 $ $Revision: 1.41 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -302,6 +302,7 @@ checkfile(inp, pm, user_typed_name, without_asking)
|
|||||||
unsigned long txt_offset;
|
unsigned long txt_offset;
|
||||||
int chk_skip;
|
int chk_skip;
|
||||||
boolean found_in_file = FALSE, skipping_entry = FALSE;
|
boolean found_in_file = FALSE, skipping_entry = FALSE;
|
||||||
|
winid datawin = WIN_ERR;
|
||||||
|
|
||||||
fp = dlb_fopen(DATAFILE, "r");
|
fp = dlb_fopen(DATAFILE, "r");
|
||||||
if (!fp) {
|
if (!fp) {
|
||||||
@@ -332,6 +333,8 @@ checkfile(inp, pm, user_typed_name, without_asking)
|
|||||||
dbase_str += 9;
|
dbase_str += 9;
|
||||||
if (!strncmp(dbase_str, "invisible ", 10))
|
if (!strncmp(dbase_str, "invisible ", 10))
|
||||||
dbase_str += 10;
|
dbase_str += 10;
|
||||||
|
if (!strncmp(dbase_str, "saddled ", 8))
|
||||||
|
dbase_str += 8;
|
||||||
if (!strncmp(dbase_str, "statue of ", 10))
|
if (!strncmp(dbase_str, "statue of ", 10))
|
||||||
dbase_str[6] = '\0';
|
dbase_str[6] = '\0';
|
||||||
else if (!strncmp(dbase_str, "figurine of ", 12))
|
else if (!strncmp(dbase_str, "figurine of ", 12))
|
||||||
@@ -356,12 +359,8 @@ checkfile(inp, pm, user_typed_name, without_asking)
|
|||||||
* will usually be found under their name, rather than under their
|
* will usually be found under their name, rather than under their
|
||||||
* object type, so looking for a singular form is pointless.
|
* object type, so looking for a singular form is pointless.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!alt)
|
if (!alt)
|
||||||
alt = makesingular(dbase_str);
|
alt = makesingular(dbase_str);
|
||||||
else
|
|
||||||
if (user_typed_name)
|
|
||||||
(void) lcase(alt);
|
|
||||||
|
|
||||||
/* skip first record; read second */
|
/* skip first record; read second */
|
||||||
txt_offset = 0L;
|
txt_offset = 0L;
|
||||||
@@ -408,14 +407,15 @@ checkfile(inp, pm, user_typed_name, without_asking)
|
|||||||
if (!dlb_fgets(buf, BUFSZ, fp)) goto bad_data_file;
|
if (!dlb_fgets(buf, BUFSZ, fp)) goto bad_data_file;
|
||||||
} while (!digit(*buf));
|
} while (!digit(*buf));
|
||||||
if (sscanf(buf, "%ld,%d\n", &entry_offset, &entry_count) < 2) {
|
if (sscanf(buf, "%ld,%d\n", &entry_offset, &entry_count) < 2) {
|
||||||
bad_data_file: impossible("'data' file in wrong format");
|
bad_data_file:
|
||||||
(void) dlb_fclose(fp);
|
impossible("'data' file in wrong format or corrupted");
|
||||||
return;
|
/* window will exist if we came here from below via 'goto' */
|
||||||
|
if (datawin != WIN_ERR) destroy_nhwindow(datawin);
|
||||||
|
(void) dlb_fclose(fp);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user_typed_name || without_asking || yn("More info?") == 'y') {
|
if (user_typed_name || without_asking || yn("More info?") == 'y') {
|
||||||
winid datawin;
|
|
||||||
|
|
||||||
if (dlb_fseek(fp, (long)txt_offset + entry_offset, SEEK_SET) < 0) {
|
if (dlb_fseek(fp, (long)txt_offset + entry_offset, SEEK_SET) < 0) {
|
||||||
pline("? Seek error on 'data' file!");
|
pline("? Seek error on 'data' file!");
|
||||||
(void) dlb_fclose(fp);
|
(void) dlb_fclose(fp);
|
||||||
@@ -676,7 +676,7 @@ do_look(mode, click_cc)
|
|||||||
{
|
{
|
||||||
boolean quick = (mode == 1); /* use cursor && don't search for "more info" */
|
boolean quick = (mode == 1); /* use cursor && don't search for "more info" */
|
||||||
boolean clicklook = (mode == 2); /* right mouse-click method */
|
boolean clicklook = (mode == 2); /* right mouse-click method */
|
||||||
char out_str[BUFSZ];
|
char out_str[BUFSZ] = {0};
|
||||||
const char *firstmatch = 0;
|
const char *firstmatch = 0;
|
||||||
struct permonst *pm = 0;
|
struct permonst *pm = 0;
|
||||||
int i = '\0', ans = 0;
|
int i = '\0', ans = 0;
|
||||||
|
|||||||
+3
-4
@@ -350,7 +350,7 @@ int psflags;
|
|||||||
monsterpoly = (psflags == 2),
|
monsterpoly = (psflags == 2),
|
||||||
draconian = (uarm && Is_dragon_armor(uarm)),
|
draconian = (uarm && Is_dragon_armor(uarm)),
|
||||||
iswere = (u.ulycn >= LOW_PM),
|
iswere = (u.ulycn >= LOW_PM),
|
||||||
isvamp = (youmonst.data->mlet == S_VAMPIRE),
|
isvamp = is_vampire(youmonst.data),
|
||||||
controllable_poly = Polymorph_control && !(Stunned || Unaware);
|
controllable_poly = Polymorph_control && !(Stunned || Unaware);
|
||||||
|
|
||||||
if (Unchanging) {
|
if (Unchanging) {
|
||||||
@@ -730,7 +730,7 @@ int mntmp;
|
|||||||
pline(use_thec,monsterc,"emit a mental blast");
|
pline(use_thec,monsterc,"emit a mental blast");
|
||||||
if (youmonst.data->msound == MS_SHRIEK) /* worthless, actually */
|
if (youmonst.data->msound == MS_SHRIEK) /* worthless, actually */
|
||||||
pline(use_thec,monsterc,"shriek");
|
pline(use_thec,monsterc,"shriek");
|
||||||
if (youmonst.data->mlet == S_VAMPIRE)
|
if (is_vampire(youmonst.data))
|
||||||
pline(use_thec,monsterc,"change shape");
|
pline(use_thec,monsterc,"change shape");
|
||||||
|
|
||||||
if (lays_eggs(youmonst.data) && flags.female)
|
if (lays_eggs(youmonst.data) && flags.female)
|
||||||
@@ -1386,9 +1386,8 @@ dohide()
|
|||||||
int
|
int
|
||||||
dopoly()
|
dopoly()
|
||||||
{
|
{
|
||||||
boolean isvampire = youmonst.data->mlet == S_VAMPIRE;
|
|
||||||
struct permonst *savedat = youmonst.data;
|
struct permonst *savedat = youmonst.data;
|
||||||
if (isvampire) {
|
if (is_vampire(youmonst.data)) {
|
||||||
polyself(2);
|
polyself(2);
|
||||||
if (savedat != youmonst.data) {
|
if (savedat != youmonst.data) {
|
||||||
You("transform into %s.", an(youmonst.data->mname));
|
You("transform into %s.", an(youmonst.data->mname));
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ STATIC_VAR NEARDATA long int followmsg; /* last time of follow message */
|
|||||||
STATIC_VAR const char and_its_contents[] = " and its contents";
|
STATIC_VAR const char and_its_contents[] = " and its contents";
|
||||||
STATIC_VAR const char the_contents_of[] = "the contents of ";
|
STATIC_VAR const char the_contents_of[] = "the contents of ";
|
||||||
|
|
||||||
|
STATIC_DCL void FDECL(append_honorific, (char *));
|
||||||
STATIC_DCL void FDECL(setpaid, (struct monst *));
|
STATIC_DCL void FDECL(setpaid, (struct monst *));
|
||||||
STATIC_DCL long FDECL(addupbill, (struct monst *));
|
STATIC_DCL long FDECL(addupbill, (struct monst *));
|
||||||
STATIC_DCL void FDECL(pacify_shk, (struct monst *));
|
STATIC_DCL void FDECL(pacify_shk, (struct monst *));
|
||||||
@@ -2343,23 +2344,13 @@ boolean ininv, dummy, silent;
|
|||||||
The(xname(obj)), ltmp, currency(ltmp),
|
The(xname(obj)), ltmp, currency(ltmp),
|
||||||
(obj->quan > 1L) ? " each" : "");
|
(obj->quan > 1L) ? " each" : "");
|
||||||
} else {
|
} else {
|
||||||
/* (chooses among [0]..[3] normally; [1]..[4] after the
|
|
||||||
Wizard has been killed or invocation ritual performed) */
|
|
||||||
static const char * const honored[] = {
|
|
||||||
"good", "honored", "most gracious", "esteemed",
|
|
||||||
"most renowned and sacred"
|
|
||||||
};
|
|
||||||
long save_quan = obj->quan;
|
long save_quan = obj->quan;
|
||||||
|
|
||||||
Strcpy(buf, "\"For you, ");
|
Strcpy(buf, "\"For you, ");
|
||||||
if (ANGRY(shkp)) {
|
if (ANGRY(shkp)) {
|
||||||
Strcat(buf, "scum;");
|
Strcat(buf, "scum;");
|
||||||
} else {
|
} else {
|
||||||
int idx = rn2(SIZE(honored) - 1) + u.uevent.udemigod;
|
append_honorific(buf);
|
||||||
|
|
||||||
Strcat(buf, honored[idx]);
|
|
||||||
Strcat(buf, !is_human(youmonst.data) ? " creature" :
|
|
||||||
(flags.female) ? " lady" : " sir");
|
|
||||||
Strcat(buf, "; only");
|
Strcat(buf, "; only");
|
||||||
}
|
}
|
||||||
obj->quan = 1L; /* fool xname() into giving singular */
|
obj->quan = 1L; /* fool xname() into giving singular */
|
||||||
@@ -2384,6 +2375,26 @@ boolean ininv, dummy, silent;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
append_honorific(buf)
|
||||||
|
char *buf;
|
||||||
|
{
|
||||||
|
/* (chooses among [0]..[3] normally; [1]..[4] after the
|
||||||
|
Wizard has been killed or invocation ritual performed) */
|
||||||
|
static const char * const honored[] = {
|
||||||
|
"good", "honored", "most gracious", "esteemed",
|
||||||
|
"most renowned and sacred"
|
||||||
|
};
|
||||||
|
Strcat(buf, honored[rn2(SIZE(honored) - 1) + u.uevent.udemigod]);
|
||||||
|
if (is_vampire(youmonst.data))
|
||||||
|
Strcat(buf, (flags.female) ? " dark lady" : " dark lord");
|
||||||
|
else if (is_elf(youmonst.data))
|
||||||
|
Strcat(buf,(flags.female) ? " hiril" : " hir");
|
||||||
|
else
|
||||||
|
Strcat(buf, !is_human(youmonst.data) ? " creature" :
|
||||||
|
(flags.female) ? " lady" : " sir");
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
splitbill(obj, otmp)
|
splitbill(obj, otmp)
|
||||||
register struct obj *obj, *otmp;
|
register struct obj *obj, *otmp;
|
||||||
|
|||||||
@@ -480,8 +480,13 @@ boolean td; /* td == TRUE : trap door or hole */
|
|||||||
if (Is_stronghold(&u.uz)) {
|
if (Is_stronghold(&u.uz)) {
|
||||||
find_hell(&dtmp);
|
find_hell(&dtmp);
|
||||||
} else {
|
} else {
|
||||||
|
int dist = newlevel - dunlev(&u.uz);
|
||||||
dtmp.dnum = u.uz.dnum;
|
dtmp.dnum = u.uz.dnum;
|
||||||
dtmp.dlevel = newlevel;
|
dtmp.dlevel = newlevel;
|
||||||
|
if (dist > 1)
|
||||||
|
You("fall down a %s%sshaft!",
|
||||||
|
dist > 3 ? "very " : "",
|
||||||
|
dist > 2 ? "deep " : "");
|
||||||
}
|
}
|
||||||
if (!td)
|
if (!td)
|
||||||
Sprintf(msgbuf, "The hole in the %s above you closes up.",
|
Sprintf(msgbuf, "The hole in the %s above you closes up.",
|
||||||
|
|||||||
Reference in New Issue
Block a user