Merge branch 'NetHack-3.7' into paxed-lua-v2-merged
This commit is contained in:
@@ -352,6 +352,14 @@ struct savefile_info {
|
|||||||
#define MAXMONNO 120 /* extinct monst after this number created */
|
#define MAXMONNO 120 /* extinct monst after this number created */
|
||||||
#define MHPMAX 500 /* maximum monster hp */
|
#define MHPMAX 500 /* maximum monster hp */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Version 3.7.x has aspirations of portable file formats. We
|
||||||
|
* make a distinction between MAIL functionality and MAIL_STRUCTURES
|
||||||
|
* so that the underlying structures are consistent, whether MAIL is
|
||||||
|
* defined or not.
|
||||||
|
*/
|
||||||
|
#define MAIL_STRUCTURES
|
||||||
|
|
||||||
/* PANICTRACE: Always defined for NH_DEVEL_STATUS != NH_STATUS_RELEASED
|
/* PANICTRACE: Always defined for NH_DEVEL_STATUS != NH_STATUS_RELEASED
|
||||||
but only for supported platforms. */
|
but only for supported platforms. */
|
||||||
#ifdef UNIX
|
#ifdef UNIX
|
||||||
|
|||||||
+1
-1
@@ -135,7 +135,7 @@ boolean restore;
|
|||||||
|
|
||||||
if (otmp->otyp == SLIME_MOLD) {
|
if (otmp->otyp == SLIME_MOLD) {
|
||||||
goodfruit(otmp->spe);
|
goodfruit(otmp->spe);
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
} else if (otmp->otyp == SCR_MAIL) {
|
} else if (otmp->otyp == SCR_MAIL) {
|
||||||
/* 0: delivered in-game via external event;
|
/* 0: delivered in-game via external event;
|
||||||
1: from bones or wishing; 2: written with marker */
|
1: from bones or wishing; 2: written with marker */
|
||||||
|
|||||||
+1
-1
@@ -432,7 +432,7 @@ int udist;
|
|||||||
} else {
|
} else {
|
||||||
if ((obj = g.level.objects[omx][omy]) != 0
|
if ((obj = g.level.objects[omx][omy]) != 0
|
||||||
&& !index(nofetch, obj->oclass)
|
&& !index(nofetch, obj->oclass)
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
&& obj->otyp != SCR_MAIL
|
&& obj->otyp != SCR_MAIL
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -2104,7 +2104,7 @@ eatspecial()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (objects[otmp->otyp].oc_material == PAPER) {
|
if (objects[otmp->otyp].oc_material == PAPER) {
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
if (otmp->otyp == SCR_MAIL)
|
if (otmp->otyp == SCR_MAIL)
|
||||||
/* no nutrition */
|
/* no nutrition */
|
||||||
pline("This junk mail is less than satisfying.");
|
pline("This junk mail is less than satisfying.");
|
||||||
@@ -2550,7 +2550,7 @@ doeat()
|
|||||||
/* oc_nutrition is usually weight anyway */
|
/* oc_nutrition is usually weight anyway */
|
||||||
else
|
else
|
||||||
basenutrit = objects[otmp->otyp].oc_nutrition;
|
basenutrit = objects[otmp->otyp].oc_nutrition;
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
if (otmp->otyp == SCR_MAIL) {
|
if (otmp->otyp == SCR_MAIL) {
|
||||||
basenutrit = 0;
|
basenutrit = 0;
|
||||||
nodelicious = TRUE;
|
nodelicious = TRUE;
|
||||||
|
|||||||
+1
-1
@@ -128,7 +128,7 @@ register int nk;
|
|||||||
if (mtmp->m_lev > 8)
|
if (mtmp->m_lev > 8)
|
||||||
tmp += 50;
|
tmp += 50;
|
||||||
|
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
/* Mail daemons put up no fight. */
|
/* Mail daemons put up no fight. */
|
||||||
if (mtmp->data == &mons[PM_MAIL_DAEMON])
|
if (mtmp->data == &mons[PM_MAIL_DAEMON])
|
||||||
tmp = 1;
|
tmp = 1;
|
||||||
|
|||||||
@@ -10,8 +10,12 @@
|
|||||||
# include <fcntl.h>
|
# include <fcntl.h>
|
||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
#endif /* SIMPLE_MAIL */
|
#endif /* SIMPLE_MAIL */
|
||||||
|
#endif /* MAIL */
|
||||||
|
#ifdef MAIL_STRUCTURES
|
||||||
#include "mail.h"
|
#include "mail.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef MAIL
|
||||||
/*
|
/*
|
||||||
* Notify user when new mail has arrived. Idea by Merlyn Leroy.
|
* Notify user when new mail has arrived. Idea by Merlyn Leroy.
|
||||||
*
|
*
|
||||||
|
|||||||
+1
-1
@@ -1623,7 +1623,7 @@ int mndx, mvflagsmask, genomask;
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
if (is_placeholder(ptr))
|
if (is_placeholder(ptr))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
/* special levels might ask for random demon type; reject this one */
|
/* special levels might ask for random demon type; reject this one */
|
||||||
if (ptr == &mons[PM_MAIL_DAEMON])
|
if (ptr == &mons[PM_MAIL_DAEMON])
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|||||||
+1
-1
@@ -980,7 +980,7 @@ boolean artif;
|
|||||||
break;
|
break;
|
||||||
case POTION_CLASS: /* note: potions get some additional init below */
|
case POTION_CLASS: /* note: potions get some additional init below */
|
||||||
case SCROLL_CLASS:
|
case SCROLL_CLASS:
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
if (otmp->otyp != SCR_MAIL)
|
if (otmp->otyp != SCR_MAIL)
|
||||||
#endif
|
#endif
|
||||||
blessorcurse(otmp, 4);
|
blessorcurse(otmp, 4);
|
||||||
|
|||||||
@@ -2038,7 +2038,7 @@ register struct monst *mtmp;
|
|||||||
/* if it's a (possibly polymorphed) quest leader, mark him as dead */
|
/* if it's a (possibly polymorphed) quest leader, mark him as dead */
|
||||||
if (mtmp->m_id == g.quest_status.leader_m_id)
|
if (mtmp->m_id == g.quest_status.leader_m_id)
|
||||||
g.quest_status.leader_is_dead = TRUE;
|
g.quest_status.leader_is_dead = TRUE;
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
/* if the mail daemon dies, no more mail delivery. -3. */
|
/* if the mail daemon dies, no more mail delivery. -3. */
|
||||||
if (tmp == PM_MAIL_DAEMON)
|
if (tmp == PM_MAIL_DAEMON)
|
||||||
g.mvitals[tmp].mvflags |= G_GENOD;
|
g.mvitals[tmp].mvflags |= G_GENOD;
|
||||||
@@ -2412,7 +2412,7 @@ int xkill_flags; /* 1: suppress message, 2: suppress corpse, 4: pacifist */
|
|||||||
if (nocorpse || LEVEL_SPECIFIC_NOCORPSE(mdat))
|
if (nocorpse || LEVEL_SPECIFIC_NOCORPSE(mdat))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
if (mdat == &mons[PM_MAIL_DAEMON]) {
|
if (mdat == &mons[PM_MAIL_DAEMON]) {
|
||||||
stackobj(mksobj_at(SCR_MAIL, x, y, FALSE, FALSE));
|
stackobj(mksobj_at(SCR_MAIL, x, y, FALSE, FALSE));
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -925,7 +925,7 @@ register int after;
|
|||||||
mmoved = 0;
|
mmoved = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
if (ptr == &mons[PM_MAIL_DAEMON]) {
|
if (ptr == &mons[PM_MAIL_DAEMON]) {
|
||||||
if (!Deaf && canseemon(mtmp))
|
if (!Deaf && canseemon(mtmp))
|
||||||
verbalize("I'm late!");
|
verbalize("I'm late!");
|
||||||
|
|||||||
+1
-1
@@ -2589,7 +2589,7 @@ struct permonst _mons2[] = {
|
|||||||
M3_INFRAVISIBLE | M3_INFRAVISION | M3_DISPLACES, 34, HI_LORD),
|
M3_INFRAVISIBLE | M3_INFRAVISION | M3_DISPLACES, 34, HI_LORD),
|
||||||
/* other demons
|
/* other demons
|
||||||
*/
|
*/
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
MON("mail daemon", S_DEMON, LVL(56, 24, 10, 127, 0),
|
MON("mail daemon", S_DEMON, LVL(56, 24, 10, 127, 0),
|
||||||
(G_NOGEN | G_NOCORPSE),
|
(G_NOGEN | G_NOCORPSE),
|
||||||
A(NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK),
|
A(NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK),
|
||||||
|
|||||||
+1
-1
@@ -876,7 +876,7 @@ SCROLL(None, "STRC PRST SKRZ KRK", 1, 0, 100), /* Czech and Slovak
|
|||||||
tongue-twister */
|
tongue-twister */
|
||||||
/* These must come last because they have special fixed descriptions.
|
/* These must come last because they have special fixed descriptions.
|
||||||
*/
|
*/
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
SCROLL("mail", "stamped", 0, 0, 0),
|
SCROLL("mail", "stamped", 0, 0, 0),
|
||||||
#endif
|
#endif
|
||||||
SCROLL("blank paper", "unlabeled", 0, 28, 60),
|
SCROLL("blank paper", "unlabeled", 0, 28, 60),
|
||||||
|
|||||||
+4
-4
@@ -1013,7 +1013,7 @@ unsigned doname_flags;
|
|||||||
|| ((!known || !objects[obj->otyp].oc_charged
|
|| ((!known || !objects[obj->otyp].oc_charged
|
||||||
|| obj->oclass == ARMOR_CLASS
|
|| obj->oclass == ARMOR_CLASS
|
||||||
|| obj->oclass == RING_CLASS)
|
|| obj->oclass == RING_CLASS)
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
&& obj->otyp != SCR_MAIL
|
&& obj->otyp != SCR_MAIL
|
||||||
#endif
|
#endif
|
||||||
&& obj->otyp != FAKE_AMULET_OF_YENDOR
|
&& obj->otyp != FAKE_AMULET_OF_YENDOR
|
||||||
@@ -1326,7 +1326,7 @@ struct obj *otmp;
|
|||||||
return FALSE; /* always fully ID'd */
|
return FALSE; /* always fully ID'd */
|
||||||
/* check fundamental ID hallmarks first */
|
/* check fundamental ID hallmarks first */
|
||||||
if (!otmp->known || !otmp->dknown
|
if (!otmp->known || !otmp->dknown
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
|| (!otmp->bknown && otmp->otyp != SCR_MAIL)
|
|| (!otmp->bknown && otmp->otyp != SCR_MAIL)
|
||||||
#else
|
#else
|
||||||
|| !otmp->bknown
|
|| !otmp->bknown
|
||||||
@@ -3861,7 +3861,7 @@ struct obj *no_wish;
|
|||||||
case STATUE:
|
case STATUE:
|
||||||
/* otmp->cobj already done in mksobj() */
|
/* otmp->cobj already done in mksobj() */
|
||||||
break;
|
break;
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
case SCR_MAIL:
|
case SCR_MAIL:
|
||||||
/* 0: delivered in-game via external event (or randomly for fake mail);
|
/* 0: delivered in-game via external event (or randomly for fake mail);
|
||||||
1: from bones or wishing; 2: written with marker */
|
1: from bones or wishing; 2: written with marker */
|
||||||
@@ -3909,7 +3909,7 @@ struct obj *no_wish;
|
|||||||
break;
|
break;
|
||||||
case FIGURINE:
|
case FIGURINE:
|
||||||
if (!(mons[mntmp].geno & G_UNIQ) && !is_human(&mons[mntmp])
|
if (!(mons[mntmp].geno & G_UNIQ) && !is_human(&mons[mntmp])
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
&& mntmp != PM_MAIL_DAEMON
|
&& mntmp != PM_MAIL_DAEMON
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
|
|||||||
+1
-1
@@ -151,7 +151,7 @@ static const struct Bool_Opt {
|
|||||||
{ "legacy", &flags.legacy, TRUE, DISP_IN_GAME },
|
{ "legacy", &flags.legacy, TRUE, DISP_IN_GAME },
|
||||||
{ "lit_corridor", &flags.lit_corridor, FALSE, SET_IN_GAME },
|
{ "lit_corridor", &flags.lit_corridor, FALSE, SET_IN_GAME },
|
||||||
{ "lootabc", &flags.lootabc, FALSE, SET_IN_GAME },
|
{ "lootabc", &flags.lootabc, FALSE, SET_IN_GAME },
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
{ "mail", &flags.biff, TRUE, SET_IN_GAME },
|
{ "mail", &flags.biff, TRUE, SET_IN_GAME },
|
||||||
#else
|
#else
|
||||||
{ "mail", (boolean *) 0, TRUE, SET_IN_FILE },
|
{ "mail", (boolean *) 0, TRUE, SET_IN_FILE },
|
||||||
|
|||||||
+1
-1
@@ -2084,7 +2084,7 @@ struct monst *mtmp;
|
|||||||
return "Aloha"; /* Hawaiian */
|
return "Aloha"; /* Hawaiian */
|
||||||
case PM_VALKYRIE:
|
case PM_VALKYRIE:
|
||||||
return
|
return
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
(mtmp && mtmp->data == &mons[PM_MAIL_DAEMON]) ? "Hallo" :
|
(mtmp && mtmp->data == &mons[PM_MAIL_DAEMON]) ? "Hallo" :
|
||||||
#endif
|
#endif
|
||||||
"Velkommen"; /* Norse */
|
"Velkommen"; /* Norse */
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ sys_early_init()
|
|||||||
sysopt.check_plname = 0;
|
sysopt.check_plname = 0;
|
||||||
sysopt.seduce = 1; /* if it's compiled in, default to on */
|
sysopt.seduce = 1; /* if it's compiled in, default to on */
|
||||||
sysopt_seduce_set(sysopt.seduce);
|
sysopt_seduce_set(sysopt.seduce);
|
||||||
|
/* default to little-endian in 3.7 */
|
||||||
|
sysopt.saveformat[0] = sysopt.bonesformat[0] = lendian;
|
||||||
sysopt.accessibility = 0;
|
sysopt.accessibility = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -3455,7 +3455,7 @@ struct obj *obj;
|
|||||||
grease_protect(obj, (char *) 0, victim);
|
grease_protect(obj, (char *) 0, victim);
|
||||||
} else if (obj->oclass == SCROLL_CLASS && obj->otyp != SCR_BLANK_PAPER) {
|
} else if (obj->oclass == SCROLL_CLASS && obj->otyp != SCR_BLANK_PAPER) {
|
||||||
if (obj->otyp != SCR_BLANK_PAPER
|
if (obj->otyp != SCR_BLANK_PAPER
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
&& obj->otyp != SCR_MAIL
|
&& obj->otyp != SCR_MAIL
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
@@ -3531,7 +3531,7 @@ boolean force;
|
|||||||
return ER_NOTHING;
|
return ER_NOTHING;
|
||||||
} else if (obj->oclass == SCROLL_CLASS) {
|
} else if (obj->oclass == SCROLL_CLASS) {
|
||||||
if (obj->otyp == SCR_BLANK_PAPER
|
if (obj->otyp == SCR_BLANK_PAPER
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
|| obj->otyp == SCR_MAIL
|
|| obj->otyp == SCR_MAIL
|
||||||
#endif
|
#endif
|
||||||
) return 0;
|
) return 0;
|
||||||
|
|||||||
+2
-2
@@ -18,7 +18,7 @@ register struct obj *otmp;
|
|||||||
return (10 * objects[otmp->otyp].oc_level);
|
return (10 * objects[otmp->otyp].oc_level);
|
||||||
|
|
||||||
switch (otmp->otyp) {
|
switch (otmp->otyp) {
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
case SCR_MAIL:
|
case SCR_MAIL:
|
||||||
return 2;
|
return 2;
|
||||||
#endif
|
#endif
|
||||||
@@ -333,7 +333,7 @@ found:
|
|||||||
}
|
}
|
||||||
new_obj->blessed = (curseval > 0);
|
new_obj->blessed = (curseval > 0);
|
||||||
new_obj->cursed = (curseval < 0);
|
new_obj->cursed = (curseval < 0);
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
if (new_obj->otyp == SCR_MAIL)
|
if (new_obj->otyp == SCR_MAIL)
|
||||||
/* 0: delivered in-game via external event (or randomly for fake mail);
|
/* 0: delivered in-game via external event (or randomly for fake mail);
|
||||||
1: from bones or wishing; 2: written with marker */
|
1: from bones or wishing; 2: written with marker */
|
||||||
|
|||||||
@@ -1231,7 +1231,7 @@ int mat, minwt;
|
|||||||
continue;
|
continue;
|
||||||
if (obj_resists(otmp, 0, 0))
|
if (obj_resists(otmp, 0, 0))
|
||||||
continue; /* preserve unique objects */
|
continue; /* preserve unique objects */
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
if (otmp->otyp == SCR_MAIL)
|
if (otmp->otyp == SCR_MAIL)
|
||||||
continue;
|
continue;
|
||||||
#endif
|
#endif
|
||||||
@@ -1358,7 +1358,7 @@ struct obj *obj;
|
|||||||
{
|
{
|
||||||
long i;
|
long i;
|
||||||
|
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
if (obj->otyp == SCR_MAIL)
|
if (obj->otyp == SCR_MAIL)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
@@ -1456,7 +1456,7 @@ int id;
|
|||||||
/* preserve inventory letter if in inventory */
|
/* preserve inventory letter if in inventory */
|
||||||
if (obj_location == OBJ_INVENT)
|
if (obj_location == OBJ_INVENT)
|
||||||
otmp->invlet = obj->invlet;
|
otmp->invlet = obj->invlet;
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
/* You can't send yourself 100 mail messages and then
|
/* You can't send yourself 100 mail messages and then
|
||||||
* polymorph them into useful scrolls
|
* polymorph them into useful scrolls
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
-2
@@ -1111,7 +1111,7 @@ make_version()
|
|||||||
version.feature_set = (unsigned long) (0L
|
version.feature_set = (unsigned long) (0L
|
||||||
/* levels and/or topology (0..4) */
|
/* levels and/or topology (0..4) */
|
||||||
/* monsters (5..9) */
|
/* monsters (5..9) */
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
| (1L << 6)
|
| (1L << 6)
|
||||||
#endif
|
#endif
|
||||||
/* objects (10..14) */
|
/* objects (10..14) */
|
||||||
@@ -1561,7 +1561,7 @@ static const char *build_opts[] = {
|
|||||||
#ifdef PANICLOG
|
#ifdef PANICLOG
|
||||||
"errors and warnings log file",
|
"errors and warnings log file",
|
||||||
#endif
|
#endif
|
||||||
#ifdef MAIL
|
#ifdef MAIL_STRUCTURES
|
||||||
"mail daemon",
|
"mail daemon",
|
||||||
#endif
|
#endif
|
||||||
#ifdef GNUDOS
|
#ifdef GNUDOS
|
||||||
|
|||||||
+2
-2
@@ -54,7 +54,7 @@ struct conditionals {
|
|||||||
#ifndef CHARON /* not supported yet */
|
#ifndef CHARON /* not supported yet */
|
||||||
{ MON_GLYPH, PM_CROESUS, "Charon" },
|
{ MON_GLYPH, PM_CROESUS, "Charon" },
|
||||||
#endif
|
#endif
|
||||||
#ifndef MAIL
|
#ifndef MAIL_STRUCTURES
|
||||||
{ MON_GLYPH, PM_FAMINE, "mail daemon" },
|
{ MON_GLYPH, PM_FAMINE, "mail daemon" },
|
||||||
#endif
|
#endif
|
||||||
/* commented out in monst.c at present */
|
/* commented out in monst.c at present */
|
||||||
@@ -69,7 +69,7 @@ struct conditionals {
|
|||||||
/* allow slime mold to look like slice of pizza, since we
|
/* allow slime mold to look like slice of pizza, since we
|
||||||
* don't know what a slime mold should look like when renamed anyway
|
* don't know what a slime mold should look like when renamed anyway
|
||||||
*/
|
*/
|
||||||
#ifndef MAIL
|
#ifndef MAIL_STRUCTURES
|
||||||
{ OBJ_GLYPH, SCR_STINKING_CLOUD + EXTRA_SCROLL_DESCR_COUNT,
|
{ OBJ_GLYPH, SCR_STINKING_CLOUD + EXTRA_SCROLL_DESCR_COUNT,
|
||||||
"stamped / mail" },
|
"stamped / mail" },
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user