Merge branch 'master' into win32-x64-working
This commit is contained in:
2
DEVEL/.gitattributes
vendored
2
DEVEL/.gitattributes
vendored
@@ -1,4 +1,4 @@
|
||||
Developer.txt NHSUBST
|
||||
*.txt NHSUBST
|
||||
nhgitset.pl NHSUBST
|
||||
hooksdir/* NHSUBST
|
||||
* text=auto
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|___/\___|\_/\___|_\___/ .__/\___|_|
|
||||
|_|
|
||||
|
||||
$NHDT-Date$
|
||||
$NHDT-Date: 1429884664 2015/04/24 14:11:04 $
|
||||
|
||||
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
|
||||
reference for basic tasks while you get up to speed.
|
||||
|
||||
$NHDT-Date: 1429884051 2015/04/24 14:00:51 $
|
||||
------------------------
|
||||
|
||||
[*] git checkout [-f] (branch)
|
||||
|
||||
@@ -430,6 +430,7 @@ barbed devil
|
||||
are quite difficult to kill.
|
||||
# takes "bat or bird" when specifying 'B'
|
||||
~combat
|
||||
~wombat
|
||||
*bat
|
||||
bat or bird
|
||||
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
|
||||
inaccessible niches occasionally have iron bars in front
|
||||
sinks may teleport or polymorph
|
||||
shopkeepers give honorifics to vampires and elves
|
||||
|
||||
|
||||
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
|
||||
the new room-style. Beelzebub's level always does this and the
|
||||
"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
|
||||
|
||||
@@ -172,6 +172,8 @@
|
||||
#define is_mind_flayer(ptr) ((ptr) == &mons[PM_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) || \
|
||||
(ptr)->mlet == S_VORTEX || \
|
||||
(ptr) == &mons[PM_MANES])
|
||||
|
||||
@@ -2711,6 +2711,7 @@ boolean incr;
|
||||
if (incr && occupation &&
|
||||
(occupation != eatfood && occupation != opentin))
|
||||
stop_occupation();
|
||||
context.travel = context.travel1 = context.mv = context.run = 0;
|
||||
break;
|
||||
case WEAK:
|
||||
if (Hallucination)
|
||||
@@ -2730,6 +2731,7 @@ boolean incr;
|
||||
if (incr && occupation &&
|
||||
(occupation != eatfood && occupation != opentin))
|
||||
stop_occupation();
|
||||
context.travel = context.travel1 = context.mv = context.run = 0;
|
||||
break;
|
||||
}
|
||||
u.uhs = newhs;
|
||||
|
||||
29
src/invent.c
29
src/invent.c
@@ -710,12 +710,37 @@ register int type;
|
||||
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 *
|
||||
currency(amount)
|
||||
long amount;
|
||||
{
|
||||
if (amount == 1L) return "zorkmid";
|
||||
else return "zorkmids";
|
||||
if (amount == 1L) return (Hallucination ? currencies[rn2(SIZE(currencies))] : "zorkmid");
|
||||
else return (Hallucination ? makeplural(currencies[rn2(SIZE(currencies))]) : "zorkmids");
|
||||
}
|
||||
|
||||
boolean
|
||||
|
||||
@@ -618,6 +618,15 @@ register struct monst *mtmp;
|
||||
(void)mongets(mtmp, WAN_FIRE);
|
||||
}
|
||||
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:
|
||||
break;
|
||||
}
|
||||
|
||||
22
src/pager.c
22
src/pager.c
@@ -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 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* 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;
|
||||
int chk_skip;
|
||||
boolean found_in_file = FALSE, skipping_entry = FALSE;
|
||||
winid datawin = WIN_ERR;
|
||||
|
||||
fp = dlb_fopen(DATAFILE, "r");
|
||||
if (!fp) {
|
||||
@@ -332,6 +333,8 @@ checkfile(inp, pm, user_typed_name, without_asking)
|
||||
dbase_str += 9;
|
||||
if (!strncmp(dbase_str, "invisible ", 10))
|
||||
dbase_str += 10;
|
||||
if (!strncmp(dbase_str, "saddled ", 8))
|
||||
dbase_str += 8;
|
||||
if (!strncmp(dbase_str, "statue of ", 10))
|
||||
dbase_str[6] = '\0';
|
||||
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
|
||||
* object type, so looking for a singular form is pointless.
|
||||
*/
|
||||
|
||||
if (!alt)
|
||||
alt = makesingular(dbase_str);
|
||||
else
|
||||
if (user_typed_name)
|
||||
(void) lcase(alt);
|
||||
|
||||
/* skip first record; read second */
|
||||
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;
|
||||
} while (!digit(*buf));
|
||||
if (sscanf(buf, "%ld,%d\n", &entry_offset, &entry_count) < 2) {
|
||||
bad_data_file: impossible("'data' file in wrong format");
|
||||
(void) dlb_fclose(fp);
|
||||
return;
|
||||
bad_data_file:
|
||||
impossible("'data' file in wrong format or corrupted");
|
||||
/* 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') {
|
||||
winid datawin;
|
||||
|
||||
if (dlb_fseek(fp, (long)txt_offset + entry_offset, SEEK_SET) < 0) {
|
||||
pline("? Seek error on 'data' file!");
|
||||
(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 clicklook = (mode == 2); /* right mouse-click method */
|
||||
char out_str[BUFSZ];
|
||||
char out_str[BUFSZ] = {0};
|
||||
const char *firstmatch = 0;
|
||||
struct permonst *pm = 0;
|
||||
int i = '\0', ans = 0;
|
||||
|
||||
@@ -350,7 +350,7 @@ int psflags;
|
||||
monsterpoly = (psflags == 2),
|
||||
draconian = (uarm && Is_dragon_armor(uarm)),
|
||||
iswere = (u.ulycn >= LOW_PM),
|
||||
isvamp = (youmonst.data->mlet == S_VAMPIRE),
|
||||
isvamp = is_vampire(youmonst.data),
|
||||
controllable_poly = Polymorph_control && !(Stunned || Unaware);
|
||||
|
||||
if (Unchanging) {
|
||||
@@ -730,7 +730,7 @@ int mntmp;
|
||||
pline(use_thec,monsterc,"emit a mental blast");
|
||||
if (youmonst.data->msound == MS_SHRIEK) /* worthless, actually */
|
||||
pline(use_thec,monsterc,"shriek");
|
||||
if (youmonst.data->mlet == S_VAMPIRE)
|
||||
if (is_vampire(youmonst.data))
|
||||
pline(use_thec,monsterc,"change shape");
|
||||
|
||||
if (lays_eggs(youmonst.data) && flags.female)
|
||||
@@ -1386,9 +1386,8 @@ dohide()
|
||||
int
|
||||
dopoly()
|
||||
{
|
||||
boolean isvampire = youmonst.data->mlet == S_VAMPIRE;
|
||||
struct permonst *savedat = youmonst.data;
|
||||
if (isvampire) {
|
||||
if (is_vampire(youmonst.data)) {
|
||||
polyself(2);
|
||||
if (savedat != youmonst.data) {
|
||||
You("transform into %s.", an(youmonst.data->mname));
|
||||
|
||||
33
src/shk.c
33
src/shk.c
@@ -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 the_contents_of[] = "the contents of ";
|
||||
|
||||
STATIC_DCL void FDECL(append_honorific, (char *));
|
||||
STATIC_DCL void FDECL(setpaid, (struct monst *));
|
||||
STATIC_DCL long FDECL(addupbill, (struct monst *));
|
||||
STATIC_DCL void FDECL(pacify_shk, (struct monst *));
|
||||
@@ -2343,23 +2344,13 @@ boolean ininv, dummy, silent;
|
||||
The(xname(obj)), ltmp, currency(ltmp),
|
||||
(obj->quan > 1L) ? " each" : "");
|
||||
} 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;
|
||||
|
||||
Strcpy(buf, "\"For you, ");
|
||||
if (ANGRY(shkp)) {
|
||||
Strcat(buf, "scum;");
|
||||
} else {
|
||||
int idx = rn2(SIZE(honored) - 1) + u.uevent.udemigod;
|
||||
|
||||
Strcat(buf, honored[idx]);
|
||||
Strcat(buf, !is_human(youmonst.data) ? " creature" :
|
||||
(flags.female) ? " lady" : " sir");
|
||||
append_honorific(buf);
|
||||
Strcat(buf, "; only");
|
||||
}
|
||||
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
|
||||
splitbill(obj, otmp)
|
||||
register struct obj *obj, *otmp;
|
||||
|
||||
@@ -480,8 +480,13 @@ boolean td; /* td == TRUE : trap door or hole */
|
||||
if (Is_stronghold(&u.uz)) {
|
||||
find_hell(&dtmp);
|
||||
} else {
|
||||
int dist = newlevel - dunlev(&u.uz);
|
||||
dtmp.dnum = u.uz.dnum;
|
||||
dtmp.dlevel = newlevel;
|
||||
if (dist > 1)
|
||||
You("fall down a %s%sshaft!",
|
||||
dist > 3 ? "very " : "",
|
||||
dist > 2 ? "deep " : "");
|
||||
}
|
||||
if (!td)
|
||||
Sprintf(msgbuf, "The hole in the %s above you closes up.",
|
||||
|
||||
Reference in New Issue
Block a user