Merge branch 'NetHack-3.7' into paxed-quest-lua

This commit is contained in:
nhmall
2019-11-24 18:57:46 -05:00
2 changed files with 32 additions and 19 deletions
+3 -1
View File
@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.189 $ $NHDT-Date: 1574475416 2019/11/23 02:16:56 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.190 $ $NHDT-Date: 1574638389 2019/11/24 23:33:09 $
This fixes36.3 file is here to capture information about updates in the 3.6.x This fixes36.3 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.2 in May 2019. Please note, however, lineage following the release of 3.6.2 in May 2019. Please note, however,
@@ -300,6 +300,8 @@ when Riders use their bargethrough capability, don't let them swap places with
door opening ability was letting them exchange places with something door opening ability was letting them exchange places with something
co-located with a closed door without opening it; if killed there, co-located with a closed door without opening it; if killed there,
there'd be no corpse so no auto-revive) there'd be no corpse so no auto-revive)
putting on levitation boots while on sink would crash when attempting to set
the enchantment known flag on Null 'uarmf' pointer
unix: Fix double DLB definition in linux hints file unix: Fix double DLB definition in linux hints file
windows: fix --showpaths output for the data file which relies on being windows: fix --showpaths output for the data file which relies on being
constructed programmatically to incorporate the version suffix constructed programmatically to incorporate the version suffix
+29 -18
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 do_wear.c $NHDT-Date: 1573346188 2019/11/10 00:36:28 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.113 $ */ /* NetHack 3.6 do_wear.c $NHDT-Date: 1574638390 2019/11/24 23:33:10 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.114 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -192,18 +192,24 @@ Boots_on(VOID_ARGS)
break; break;
case LEVITATION_BOOTS: case LEVITATION_BOOTS:
if (!oldprop && !HLevitation && !(BLevitation & FROMOUTSIDE)) { if (!oldprop && !HLevitation && !(BLevitation & FROMOUTSIDE)) {
uarmf->known = 1; /* might come off if putting on over a sink,
* so uarmf could be Null below; status line
* gets updated during brief interval they're
* worn so hero and player learn enchantment */
g.context.botl = 1; /* status hilites might mark AC changed */
makeknown(uarmf->otyp); makeknown(uarmf->otyp);
float_up(); float_up();
if (Levitation) if (Levitation)
spoteffects(FALSE); /* for sink effect */ spoteffects(FALSE); /* for sink effect */
} else { } else {
float_vs_flight(); /* maybe toggle (BFlying & I_SPECIAL) */ float_vs_flight(); /* maybe toggle BFlying's I_SPECIAL */
} }
break; break;
default: default:
impossible(unknown_type, c_boots, uarmf->otyp); impossible(unknown_type, c_boots, uarmf->otyp);
} }
uarmf->known = 1; /* boots' +/- evident because of status line AC */ if (uarmf) /* could be Null here (levitation boots put on over a sink) */
uarmf->known = 1; /* boots' +/- evident because of status line AC */
return 0; return 0;
} }
@@ -317,7 +323,8 @@ Cloak_on(VOID_ARGS)
default: default:
impossible(unknown_type, c_cloak, uarmc->otyp); impossible(unknown_type, c_cloak, uarmc->otyp);
} }
uarmc->known = 1; /* cloak's +/- evident because of status line AC */ if (uarmc) /* no known instance of !uarmc here but play it safe */
uarmc->known = 1; /* cloak's +/- evident because of status line AC */
return 0; return 0;
} }
@@ -389,24 +396,24 @@ Helmet_on(VOID_ARGS)
adj_abon(uarmh, uarmh->spe); adj_abon(uarmh, uarmh->spe);
break; break;
case CORNUTHAUM: case CORNUTHAUM:
/* people think marked wizards know what they're talking /* people think marked wizards know what they're talking about,
* about, but it takes trained arrogance to pull it off, but it takes trained arrogance to pull it off, and the actual
* and the actual enchantment of the hat is irrelevant. enchantment of the hat is irrelevant */
*/
ABON(A_CHA) += (Role_if(PM_WIZARD) ? 1 : -1); ABON(A_CHA) += (Role_if(PM_WIZARD) ? 1 : -1);
g.context.botl = 1; g.context.botl = 1;
makeknown(uarmh->otyp); makeknown(uarmh->otyp);
break; break;
case HELM_OF_OPPOSITE_ALIGNMENT: case HELM_OF_OPPOSITE_ALIGNMENT:
uarmh->known = 1; /* do this here because uarmh could get cleared */ uarmh->known = 1; /* do this here because uarmh could get cleared */
/* changing alignment can toggle off active artifact /* changing alignment can toggle off active artifact properties,
properties, including levitation; uarmh could get including levitation; uarmh could get dropped or destroyed here
dropped or destroyed here */ by hero falling onto a polymorph trap or into water (emergency
disrobe) or maybe lava (probably not, helm isn't 'organic') */
uchangealign((u.ualign.type != A_NEUTRAL) uchangealign((u.ualign.type != A_NEUTRAL)
? -u.ualign.type ? -u.ualign.type
: (uarmh->o_id % 2) ? A_CHAOTIC : A_LAWFUL, : (uarmh->o_id % 2) ? A_CHAOTIC : A_LAWFUL,
1); 1);
/* makeknown(uarmh->otyp); -- moved below, after xname() */ /* makeknown(HELM_OF_OPPOSITE_ALIGNMENT); -- below, after Tobjnam() */
/*FALLTHRU*/ /*FALLTHRU*/
case DUNCE_CAP: case DUNCE_CAP:
if (uarmh && !uarmh->cursed) { if (uarmh && !uarmh->cursed) {
@@ -427,14 +434,14 @@ Helmet_on(VOID_ARGS)
? "like sitting in a corner" ? "like sitting in a corner"
: "giddy"); : "giddy");
} else { } else {
/* [message moved to uchangealign()] */ /* [message formerly given here moved to uchangealign()] */
makeknown(HELM_OF_OPPOSITE_ALIGNMENT); makeknown(HELM_OF_OPPOSITE_ALIGNMENT);
} }
break; break;
default: default:
impossible(unknown_type, c_helmet, uarmh->otyp); impossible(unknown_type, c_helmet, uarmh->otyp);
} }
/* uarmh could be zero due to uchangealign() */ /* uarmh could be Null due to uchangealign() */
if (uarmh) if (uarmh)
uarmh->known = 1; /* helmet's +/- evident because of status line AC */ uarmh->known = 1; /* helmet's +/- evident because of status line AC */
return 0; return 0;
@@ -509,7 +516,8 @@ Gloves_on(VOID_ARGS)
default: default:
impossible(unknown_type, c_gloves, uarmg->otyp); impossible(unknown_type, c_gloves, uarmg->otyp);
} }
uarmg->known = 1; /* gloves' +/- evident because of status line AC */ if (uarmg) /* no known instance of !uarmg here but play it safe */
uarmg->known = 1; /* gloves' +/- evident because of status line AC */
return 0; return 0;
} }
@@ -608,7 +616,8 @@ Shield_on(VOID_ARGS)
default: default:
impossible(unknown_type, c_shield, uarms->otyp); impossible(unknown_type, c_shield, uarms->otyp);
} }
uarms->known = 1; /* shield's +/- evident because of status line AC */ if (uarms) /* no known instance of !uarmgs here but play it safe */
uarms->known = 1; /* shield's +/- evident because of status line AC */
return 0; return 0;
} }
@@ -648,7 +657,8 @@ Shirt_on(VOID_ARGS)
default: default:
impossible(unknown_type, c_shirt, uarmu->otyp); impossible(unknown_type, c_shirt, uarmu->otyp);
} }
uarmu->known = 1; /* shirt's +/- evident because of status line AC */ if (uarmu) /* no known instances of !uarmu here but play it safe */
uarmu->known = 1; /* shirt's +/- evident because of status line AC */
return 0; return 0;
} }
@@ -680,7 +690,8 @@ Armor_on(VOID_ARGS)
* suits are set up as intrinsics (actually 'extrinsics') by setworn() * suits are set up as intrinsics (actually 'extrinsics') by setworn()
* which is called by armor_or_accessory_on() before Armor_on(). * which is called by armor_or_accessory_on() before Armor_on().
*/ */
uarm->known = 1; /* suit's +/- evident because of status line AC */ if (uarm) /* no known instances of !uarm here but play it safe */
uarm->known = 1; /* suit's +/- evident because of status line AC */
return 0; return 0;
} }