Merge branch 'NetHack-3.6.2'

This commit is contained in:
nhmall
2019-01-14 21:09:45 -05:00
5 changed files with 186 additions and 179 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 hack.h $NHDT-Date: 1525012595 2018/04/29 14:36:35 $ $NHDT-Branch: master $:$NHDT-Revision: 1.82 $ */
/* NetHack 3.6 hack.h $NHDT-Date: 1547514631 2019/01/15 01:10:31 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.101 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Pasi Kallinen, 2017. */
/* NetHack may be freely redistributed. See license for details. */
@@ -34,11 +34,11 @@
/* symbolic names for capacity levels */
enum encumbrance_types {
UNENCUMBERED = 0,
SLT_ENCUMBER, /* Burdened */
MOD_ENCUMBER, /* Stressed */
HVY_ENCUMBER, /* Strained */
EXT_ENCUMBER, /* Overtaxed */
OVERLOADED /* Overloaded */
SLT_ENCUMBER = 1, /* Burdened */
MOD_ENCUMBER = 2, /* Stressed */
HVY_ENCUMBER = 3, /* Strained */
EXT_ENCUMBER = 4, /* Overtaxed */
OVERLOADED = 5 /* Overloaded */
};
/* weight increment of heavy iron ball */
@@ -55,13 +55,13 @@ enum encumbrance_types {
/* hunger states - see hu_stat in eat.c */
enum hunger_state_types {
SATIATED = 0,
NOT_HUNGRY,
HUNGRY,
WEAK,
FAINTING,
FAINTED,
STARVED
SATIATED = 0,
NOT_HUNGRY = 1,
HUNGRY = 2,
WEAK = 3,
FAINTING = 4,
FAINTED = 5,
STARVED = 6
};
/* Macros for how a rumor was delivered in outrumor() */
@@ -72,13 +72,13 @@ enum hunger_state_types {
/* Macros for why you are no longer riding */
enum dismount_types {
DISMOUNT_GENERIC = 0,
DISMOUNT_FELL,
DISMOUNT_THROWN,
DISMOUNT_POLY,
DISMOUNT_ENGULFED,
DISMOUNT_BONES,
DISMOUNT_BYCHOICE
DISMOUNT_GENERIC = 0,
DISMOUNT_FELL = 1,
DISMOUNT_THROWN = 2,
DISMOUNT_POLY = 3,
DISMOUNT_ENGULFED = 4,
DISMOUNT_BONES = 5,
DISMOUNT_BYCHOICE = 6
};
/* Special returns from mapglyph() */
@@ -99,25 +99,25 @@ enum dismount_types {
/* alteration types--keep in synch with costly_alteration(mkobj.c) */
enum cost_alteration_types {
COST_CANCEL = 0, /* standard cancellation */
COST_DRAIN, /* drain life upon an object */
COST_UNCHRG, /* cursed charging */
COST_UNBLSS, /* unbless (devalues holy water) */
COST_UNCURS, /* uncurse (devalues unholy water) */
COST_DECHNT, /* disenchant weapons or armor */
COST_DEGRD, /* removal of rustproofing, dulling via engraving */
COST_DILUTE, /* potion dilution */
COST_ERASE, /* scroll or spellbook blanking */
COST_BURN, /* dipped into flaming oil */
COST_NUTRLZ, /* neutralized via unicorn horn */
COST_DSTROY, /* wand breaking (bill first, useup later) */
COST_SPLAT, /* cream pie to own face (ditto) */
COST_BITE, /* start eating food */
COST_OPEN, /* open tin */
COST_BRKLCK, /* break box/chest's lock */
COST_RUST, /* rust damage */
COST_ROT, /* rotting attack */
COST_CORRODE /* acid damage */
COST_CANCEL = 0, /* standard cancellation */
COST_DRAIN = 1, /* drain life upon an object */
COST_UNCHRG = 2, /* cursed charging */
COST_UNBLSS = 3, /* unbless (devalues holy water) */
COST_UNCURS = 4, /* uncurse (devalues unholy water) */
COST_DECHNT = 5, /* disenchant weapons or armor */
COST_DEGRD = 6, /* removal of rustproofing, dulling via engraving */
COST_DILUTE = 7, /* potion dilution */
COST_ERASE = 8, /* scroll or spellbook blanking */
COST_BURN = 9, /* dipped into flaming oil */
COST_NUTRLZ = 10, /* neutralized via unicorn horn */
COST_DSTROY = 11, /* wand breaking (bill first, useup later) */
COST_SPLAT = 12, /* cream pie to own face (ditto) */
COST_BITE = 13, /* start eating food */
COST_OPEN = 14, /* open tin */
COST_BRKLCK = 15, /* break box/chest's lock */
COST_RUST = 16, /* rust damage */
COST_ROT = 17, /* rotting attack */
COST_CORRODE = 18 /* acid damage */
};
/* bitmask flags for corpse_xname();
@@ -132,9 +132,9 @@ enum cost_alteration_types {
/* getpos() return values */
enum getpos_retval {
LOOK_TRADITIONAL = 0, /* '.' -- ask about "more info?" */
LOOK_QUICK, /* ',' -- skip "more info?" */
LOOK_ONCE, /* ';' -- skip and stop looping */
LOOK_VERBOSE /* ':' -- show more info w/o asking */
LOOK_QUICK = 1, /* ',' -- skip "more info?" */
LOOK_ONCE = 2, /* ';' -- skip and stop looping */
LOOK_VERBOSE = 3 /* ':' -- show more info w/o asking */
};
/*
@@ -143,22 +143,22 @@ enum getpos_retval {
* code assume that PANIC separates the deaths from the non-deaths.
*/
enum game_end_types {
DIED = 0,
CHOKING,
POISONING,
STARVING,
DROWNING,
BURNING,
DISSOLVED,
CRUSHING,
STONING,
TURNED_SLIME,
GENOCIDED,
PANICKED,
TRICKED,
QUIT,
ESCAPED,
ASCENDED
DIED = 0,
CHOKING = 1,
POISONING = 2,
STARVING = 3,
DROWNING = 4,
BURNING = 5,
DISSOLVED = 6,
CRUSHING = 7,
STONING = 8,
TURNED_SLIME = 9,
GENOCIDED = 10,
PANICKED = 11,
TRICKED = 12,
QUIT = 13,
ESCAPED = 14,
ASCENDED = 15
};
typedef struct strbuf {
@@ -218,21 +218,21 @@ typedef struct {
/* types of calls to bhit() */
enum bhit_call_types {
ZAPPED_WAND = 0,
THROWN_WEAPON,
THROWN_TETHERED_WEAPON,
KICKED_WEAPON,
FLASHED_LIGHT,
INVIS_BEAM
ZAPPED_WAND = 0,
THROWN_WEAPON = 1,
THROWN_TETHERED_WEAPON = 2,
KICKED_WEAPON = 3,
FLASHED_LIGHT = 4,
INVIS_BEAM = 5
};
/* attack mode for hmon() */
enum hmon_atkmode_types {
HMON_MELEE = 0, /* hand-to-hand */
HMON_THROWN, /* normal ranged (or spitting while poly'd) */
HMON_KICKED, /* alternate ranged */
HMON_APPLIED, /* polearm, treated as ranged */
HMON_DRAGGED /* attached iron ball, pulled into mon */
HMON_MELEE = 0, /* hand-to-hand */
HMON_THROWN = 1, /* normal ranged (or spitting while poly'd) */
HMON_KICKED = 2, /* alternate ranged */
HMON_APPLIED = 3, /* polearm, treated as ranged */
HMON_DRAGGED = 4 /* attached iron ball, pulled into mon */
};
/* sortloot() return type; needed before extern.h */
@@ -401,14 +401,14 @@ typedef struct sortloot_item Loot;
/* Macros for explosion types */
enum explosion_types {
EXPL_DARK = 0,
EXPL_NOXIOUS,
EXPL_MUDDY,
EXPL_WET,
EXPL_MAGICAL,
EXPL_FIERY,
EXPL_FROSTY,
EXPL_MAX
EXPL_DARK = 0,
EXPL_NOXIOUS = 1,
EXPL_MUDDY = 2,
EXPL_WET = 3,
EXPL_MAGICAL = 4,
EXPL_FIERY = 5,
EXPL_FROSTY = 6,
EXPL_MAX = 7
};
/* enlightenment control flags */
@@ -439,25 +439,25 @@ enum explosion_types {
/* Macros for messages referring to hands, eyes, feet, etc... */
enum bodypart_types {
ARM = 0,
EYE,
FACE,
FINGER,
FINGERTIP,
FOOT,
HAND,
HANDED,
HEAD,
LEG,
LIGHT_HEADED,
NECK,
SPINE,
TOE,
HAIR,
BLOOD,
LUNG,
NOSE,
STOMACH
ARM = 0,
EYE = 1,
FACE = 2,
FINGER = 3,
FINGERTIP = 4,
FOOT = 5,
HAND = 6,
HANDED = 7,
HEAD = 8,
LEG = 9,
LIGHT_HEADED = 10,
NECK = 11,
SPINE = 12,
TOE = 13,
HAIR = 14,
BLOOD = 15,
LUNG = 16,
NOSE = 17,
STOMACH = 18
};
/* indices for some special tin types */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 prop.h $NHDT-Date: 1437877163 2015/07/26 02:19:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.16 $ */
/* NetHack 3.6 prop.h $NHDT-Date: 1547514641 2019/01/15 01:10:41 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.20 $ */
/* Copyright (c) 1989 Mike Threepoint */
/* NetHack may be freely redistributed. See license for details. */
@@ -12,79 +12,79 @@
*/
/* Resistances to troubles */
enum prop_types {
FIRE_RES = 1,
COLD_RES,
SLEEP_RES,
DISINT_RES,
SHOCK_RES,
POISON_RES,
ACID_RES,
STONE_RES,
FIRE_RES = 1,
COLD_RES = 2,
SLEEP_RES = 3,
DISINT_RES = 4,
SHOCK_RES = 5,
POISON_RES = 6,
ACID_RES = 7,
STONE_RES = 8,
/* note: for the first eight properties, MR_xxx == (1 << (xxx_RES - 1)) */
DRAIN_RES,
SICK_RES,
INVULNERABLE,
ANTIMAGIC,
DRAIN_RES = 9,
SICK_RES = 10,
INVULNERABLE = 11,
ANTIMAGIC = 12,
/* Troubles */
STUNNED,
CONFUSION,
BLINDED,
DEAF,
SICK,
STONED,
STRANGLED,
VOMITING,
GLIB,
SLIMED,
HALLUC,
HALLUC_RES,
FUMBLING,
WOUNDED_LEGS,
SLEEPY,
HUNGER,
STUNNED = 13,
CONFUSION = 14,
BLINDED = 15,
DEAF = 16,
SICK = 17,
STONED = 18,
STRANGLED = 19,
VOMITING = 20,
GLIB = 21,
SLIMED = 22,
HALLUC = 23,
HALLUC_RES = 24,
FUMBLING = 25,
WOUNDED_LEGS = 26,
SLEEPY = 27,
HUNGER = 28,
/* Vision and senses */
SEE_INVIS,
TELEPAT,
WARNING,
WARN_OF_MON,
WARN_UNDEAD,
SEARCHING,
CLAIRVOYANT,
INFRAVISION,
DETECT_MONSTERS,
SEE_INVIS = 29,
TELEPAT = 30,
WARNING = 31,
WARN_OF_MON = 32,
WARN_UNDEAD = 33,
SEARCHING = 34,
CLAIRVOYANT = 35,
INFRAVISION = 36,
DETECT_MONSTERS = 37,
/* Appearance and behavior */
ADORNED,
INVIS,
DISPLACED,
STEALTH,
AGGRAVATE_MONSTER,
CONFLICT,
ADORNED = 38,
INVIS = 39,
DISPLACED = 40,
STEALTH = 41,
AGGRAVATE_MONSTER = 42,
CONFLICT = 43,
/* Transportation */
JUMPING,
TELEPORT,
TELEPORT_CONTROL,
LEVITATION,
FLYING,
WWALKING,
SWIMMING,
MAGICAL_BREATHING,
PASSES_WALLS,
JUMPING = 44,
TELEPORT = 45,
TELEPORT_CONTROL = 46,
LEVITATION = 47,
FLYING = 48,
WWALKING = 49,
SWIMMING = 50,
MAGICAL_BREATHING = 51,
PASSES_WALLS = 52,
/* Physical attributes */
SLOW_DIGESTION,
HALF_SPDAM,
HALF_PHDAM,
REGENERATION,
ENERGY_REGENERATION,
PROTECTION,
PROT_FROM_SHAPE_CHANGERS,
POLYMORPH,
POLYMORPH_CONTROL,
UNCHANGING,
FAST,
REFLECTING,
FREE_ACTION,
FIXED_ABIL,
LIFESAVED
SLOW_DIGESTION = 53,
HALF_SPDAM = 54,
HALF_PHDAM = 55,
REGENERATION = 56,
ENERGY_REGENERATION = 57,
PROTECTION = 58,
PROT_FROM_SHAPE_CHANGERS = 59,
POLYMORPH = 60,
POLYMORPH_CONTROL = 61,
UNCHANGING = 62,
FAST = 63,
REFLECTING = 64,
FREE_ACTION = 65,
FIXED_ABIL = 66,
LIFESAVED = 67
};
#define LAST_PROP (LIFESAVED)

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 you.h $NHDT-Date: 1450231172 2015/12/16 01:59:32 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.30 $ */
/* NetHack 3.6 you.h $NHDT-Date: 1547514642 2019/01/15 01:10:42 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.35 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2016. */
/* NetHack may be freely redistributed. See license for details. */
@@ -260,12 +260,12 @@ struct Align {
extern const struct Align aligns[]; /* table of available alignments */
enum utraptypes {
TT_BEARTRAP = 0,
TT_PIT,
TT_WEB,
TT_LAVA,
TT_INFLOOR,
TT_BURIEDBALL
TT_BEARTRAP = 0,
TT_PIT = 1,
TT_WEB = 2,
TT_LAVA = 3,
TT_INFLOOR = 4,
TT_BURIEDBALL = 5
};
/*** Information about the player ***/

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 cmd.c $NHDT-Date: 1547486885 2019/01/14 17:28:05 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.327 $ */
/* NetHack 3.6 cmd.c $NHDT-Date: 1547512504 2019/01/15 00:35:04 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.328 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2013. */
/* NetHack may be freely redistributed. See license for details. */
@@ -787,6 +787,7 @@ wiz_makemap(VOID_ARGS)
{
if (wizard) {
struct monst *mtmp;
boolean was_in_W_tower = In_W_tower(u.ux, u.uy, &u.uz);
rm_mapseen(ledger_no(&u.uz));
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
@@ -842,12 +843,12 @@ wiz_makemap(VOID_ARGS)
/* was using safe_teleds() but that doesn't honor arrival region
on levels which have such; we don't force stairs, just area */
u_on_rndspot((u.uhave.amulet ? 1 : 0) /* 'going up' flag */
| (In_W_tower(u.ux, u.uy, &u.uz) ? 2 : 0));
| (was_in_W_tower ? 2 : 0));
losedogs();
/* u_on_rndspot() might pick a spot that has a monster, or losedogs()
might pick the hero's spot (only if there isn't already a monster
there), so we might have to move hero or the co-located monster */
if ((mtmp = m_at(u.ux, u.uy)) != 0 && mtmp != u.usteed)
if ((mtmp = m_at(u.ux, u.uy)) != 0)
u_collide_m(mtmp);
initrack();
if (Punished) {

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 do.c $NHDT-Date: 1547486886 2019/01/14 17:28:06 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.184 $ */
/* NetHack 3.6 do.c $NHDT-Date: 1547512513 2019/01/15 00:35:13 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.185 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1150,15 +1150,21 @@ register xchar x, y;
}
*/
/* extracted from goto_level(); also used by wiz_makemap() */
/* when arriving on a level, if hero and a monster are trying to share same
spot, move one; extracted from goto_level(); also used by wiz_makemap() */
void
u_collide_m(mtmp)
struct monst *mtmp;
{
coord cc;
if (!mtmp || mtmp->mx != u.ux || mtmp->my != u.uy)
if (!mtmp || mtmp == u.usteed || mtmp != m_at(u.ux, u.uy)) {
impossible("level arrival collision: %s?",
!mtmp ? "no monster"
: (mtmp == u.usteed) ? "steed is on map"
: "monster not co-located");
return;
}
/* There's a monster at your target destination; it might be one
which accompanied you--see mon_arrive(dogmove.c)--or perhaps
@@ -1172,7 +1178,7 @@ struct monst *mtmp;
mnexto(mtmp);
if ((mtmp = m_at(u.ux, u.uy)) != 0) {
/* there was an unconditional impossible("mnearto failed")
/* there was an unconditional impossible("mnexto failed")
here, but it's not impossible and we're prepared to cope
with the situation, so only say something when debugging */
if (wizard)
@@ -1473,7 +1479,7 @@ boolean at_stairs, falling, portal;
/* hero might be arriving at a spot containing a monster;
if so, move one or the other to another location */
if ((mtmp = m_at(u.ux, u.uy)) != 0 && mtmp != u.usteed)
if ((mtmp = m_at(u.ux, u.uy)) != 0)
u_collide_m(mtmp);
initrack();