Merge branch 'copperwater_consolidated_pull_request_265'
This includes most commits from GitHub pull request #265 with some code adjustment and documentation in doc/fixes37.0.
This commit is contained in:
@@ -77,6 +77,25 @@ NetHack Community Patches (or Variation) Included
|
||||
-------------------------------------------------
|
||||
hallucinatory trap names from github pull request #174
|
||||
autounlock feature originally from unnethack in github pull request #228
|
||||
applying a candelabrum with no candles gives a tip (github #265)
|
||||
candelabrum now reads "(n of 7 candles attached)" (github #265)
|
||||
replace "You feel cold" message for freezing unseen door (github #265)
|
||||
applying a candelabrum with no candles gives a tip (github #265)
|
||||
candelabrum now reads "(n of 7 candles attached)" (github #265)
|
||||
show appropriate message on throne when crowned (github #265)
|
||||
choir chanting, bathing in darkness for death by Moloch (github #265)
|
||||
remove "iron hook" unidentified description (github #265)
|
||||
suppress "Unknown command" messages in the dumplog. (github #265)
|
||||
give player message informing them they can use #enhance (github #265)
|
||||
neutral sacrifices disappear in a cloud of smoke (github #265)
|
||||
call potion bottles by nonsensical names if hallucinating (github #265)
|
||||
add a default message for chatting to gnomes (github #265)
|
||||
better reporting directions for impossible() (github #265)
|
||||
underwater fire scroll causes vaporization (github #265)
|
||||
default shk sell prompt to N (github #265)
|
||||
teach non-mindless monsters about the Castle trapdoors (github #265)
|
||||
always print a message when the hero teleports (github #265)
|
||||
always print a message when the hero level teleports (github #265)
|
||||
|
||||
|
||||
Code Cleanup and Reorganization
|
||||
|
||||
16
src/apply.c
16
src/apply.c
@@ -1138,6 +1138,20 @@ register struct obj *obj;
|
||||
}
|
||||
if (obj->spe <= 0) {
|
||||
pline("This %s has no %s.", xname(obj), s);
|
||||
|
||||
/* only output tip if candles are in inventory */
|
||||
boolean has_candles = FALSE;
|
||||
struct obj *otmp = g.invent;
|
||||
while (!has_candles && otmp) {
|
||||
has_candles = Is_candle(otmp);
|
||||
otmp = otmp->nobj;
|
||||
}
|
||||
|
||||
if (has_candles) {
|
||||
pline("To attach candles, apply them instead of the %s.",
|
||||
xname(obj));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
if (Underwater) {
|
||||
@@ -2513,7 +2527,7 @@ struct obj *otmp;
|
||||
return;
|
||||
}
|
||||
ttyp = (otmp->otyp == LAND_MINE) ? LANDMINE : BEAR_TRAP;
|
||||
if (otmp == g.trapinfo.tobj && u.ux == g.trapinfo.tx
|
||||
if (otmp == g.trapinfo.tobj && u.ux == g.trapinfo.tx
|
||||
&& u.uy == g.trapinfo.ty) {
|
||||
You("resume setting %s%s.", shk_your(buf, otmp),
|
||||
trapname(ttyp, FALSE));
|
||||
|
||||
@@ -1226,6 +1226,8 @@ int mmflags;
|
||||
|
||||
if (In_sokoban(&u.uz) && !mindless(ptr)) /* know about traps here */
|
||||
mtmp->mtrapseen = (1L << (PIT - 1)) | (1L << (HOLE - 1));
|
||||
if (Is_stronghold(&u.uz) && !mindless(ptr)) /* know about the trap doors */
|
||||
mtmp->mtrapseen = (1L << (TRAPDOOR - 1));
|
||||
/* quest leader and nemesis both know about all trap types */
|
||||
if (ptr->msound == MS_LEADER || ptr->msound == MS_NEMESIS)
|
||||
mtmp->mtrapseen = ~0;
|
||||
|
||||
@@ -703,7 +703,7 @@ TOOL("drum of earthquake","drum", 0, 0, 1, 1, 2, 25, 25, LEATHER, HI_LEATHER),
|
||||
/* tools useful as weapons */
|
||||
WEPTOOL("pick-axe", None,
|
||||
1, 0, 0, 20, 100, 50, 6, 3, WHACK, P_PICK_AXE, IRON, HI_METAL),
|
||||
WEPTOOL("grappling hook", "iron hook",
|
||||
WEPTOOL("grappling hook", None,
|
||||
0, 0, 0, 5, 30, 50, 2, 6, WHACK, P_FLAIL, IRON, HI_METAL),
|
||||
WEPTOOL("unicorn horn", None,
|
||||
1, 1, 1, 0, 20, 100, 12, 12, PIERCE, P_UNICORN_HORN,
|
||||
|
||||
@@ -1096,11 +1096,7 @@ unsigned doname_flags;
|
||||
break;
|
||||
}
|
||||
if (obj->otyp == CANDELABRUM_OF_INVOCATION) {
|
||||
if (!obj->spe)
|
||||
Strcpy(tmpbuf, "no");
|
||||
else
|
||||
Sprintf(tmpbuf, "%d", obj->spe);
|
||||
Sprintf(eos(bp), " (%s candle%s%s)", tmpbuf, plur(obj->spe),
|
||||
Sprintf(eos(bp), " (%d of 7 candle%s%s)", obj->spe, plur(obj->spe),
|
||||
!obj->lamplit ? " attached" : ", lit");
|
||||
break;
|
||||
} else if (obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP
|
||||
|
||||
@@ -29,6 +29,8 @@ const char *line;
|
||||
unsigned indx = g.saved_pline_index; /* next slot to use */
|
||||
char *oldest = g.saved_plines[indx]; /* current content of that slot */
|
||||
|
||||
if (!strncmp(line, "Unknown command", 15))
|
||||
return;
|
||||
if (oldest && strlen(oldest) >= strlen(line)) {
|
||||
/* this buffer will gradually shrink until the 'else' is needed;
|
||||
there's no pressing need to track allocation size instead */
|
||||
@@ -479,6 +481,10 @@ VA_DECL(const char *, s)
|
||||
if (g.program_state.something_worth_saving)
|
||||
Strcat(pbuf, " (Saving and reloading may fix this problem.)");
|
||||
pline("%s", VA_PASS1(pbuf));
|
||||
pline("Please report these messages to %s.", DEVTEAM_EMAIL);
|
||||
if (sysopt.support) {
|
||||
pline("Alternatively, contact local support: %s", sysopt.support);
|
||||
}
|
||||
|
||||
g.program_state.in_impossible = 0;
|
||||
VA_END();
|
||||
|
||||
11
src/potion.c
11
src/potion.c
@@ -1210,11 +1210,20 @@ const char *txt;
|
||||
|
||||
const char *bottlenames[] = { "bottle", "phial", "flagon", "carafe",
|
||||
"flask", "jar", "vial" };
|
||||
const char *hbottlenames[] = {
|
||||
"jug", "pitcher", "barrel", "tin", "bag", "box", "glass", "beaker",
|
||||
"tumbler", "vase", "flowerpot", "pan", "thingy", "mug", "teacup", "teapot",
|
||||
"keg", "bucket", "thermos", "amphora", "wineskin", "parcel", "bowl",
|
||||
"ampoule"
|
||||
};
|
||||
|
||||
const char *
|
||||
bottlename()
|
||||
{
|
||||
return bottlenames[rn2(SIZE(bottlenames))];
|
||||
if (Hallucination)
|
||||
return hbottlenames[rn2(SIZE(hbottlenames))];
|
||||
else
|
||||
return bottlenames[rn2(SIZE(bottlenames))];
|
||||
}
|
||||
|
||||
/* handle item dipped into water potion or steed saddle splashed by same */
|
||||
|
||||
@@ -1309,7 +1309,11 @@ register struct obj *otmp;
|
||||
Your("sacrifice disappears!");
|
||||
else
|
||||
Your("sacrifice is consumed in a %s!",
|
||||
u.ualign.type == A_LAWFUL ? "flash of light" : "burst of flame");
|
||||
u.ualign.type == A_LAWFUL
|
||||
? "flash of light"
|
||||
: u.ualign.type == A_NEUTRAL
|
||||
? "cloud of smoke"
|
||||
: "burst of flame");
|
||||
if (carried(otmp))
|
||||
useup(otmp);
|
||||
else
|
||||
@@ -1523,6 +1527,7 @@ dosacrifice()
|
||||
/* Moloch's high altar */
|
||||
if (u.ualign.record > -99)
|
||||
u.ualign.record = -99;
|
||||
pline("An invisible choir chants in Latin, and you are bathed in darkness...");
|
||||
/*[apparently shrug/snarl can be sensed without being seen]*/
|
||||
pline("%s shrugs and retains dominion over %s,", Moloch,
|
||||
u_gname());
|
||||
|
||||
@@ -1605,7 +1605,10 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */
|
||||
if (!already_known)
|
||||
(void) learnscrolltyp(SCR_FIRE);
|
||||
if (confused) {
|
||||
if (Fire_resistance) {
|
||||
if (Underwater) {
|
||||
pline("A little %s around you vaporizes.", hliquid("water"));
|
||||
}
|
||||
else if (Fire_resistance) {
|
||||
shieldeff(u.ux, u.uy);
|
||||
if (!Blind)
|
||||
pline("Oh, look, what a pretty fire in your %s.",
|
||||
|
||||
@@ -3258,7 +3258,7 @@ xchar x, y;
|
||||
} else
|
||||
qbuf[0] = '\0'; /* just to pacify lint */
|
||||
|
||||
switch (g.sell_response ? g.sell_response : ynaq(qbuf)) {
|
||||
switch (g.sell_response ? g.sell_response : nyaq(qbuf)) {
|
||||
case 'q':
|
||||
g.sell_response = 'n';
|
||||
/*FALLTHRU*/
|
||||
|
||||
@@ -274,7 +274,7 @@ dosit()
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (is_prince(g.youmonst.data))
|
||||
if (is_prince(g.youmonst.data) || u.uevent.uhand_of_elbereth)
|
||||
You_feel("very comfortable here.");
|
||||
else
|
||||
You_feel("somehow out of place...");
|
||||
|
||||
31
src/sounds.c
31
src/sounds.c
@@ -805,18 +805,25 @@ register struct monst *mtmp;
|
||||
pline_msg = "talks about spellcraft.";
|
||||
else if (ptr->mlet == S_CENTAUR)
|
||||
pline_msg = "discusses hunting.";
|
||||
else if (is_gnome(ptr) && Hallucination && (gnomeplan = rn2(4)) % 2)
|
||||
/* skipped for rn2(4) result of 0 or 2;
|
||||
gag from an early episode of South Park called "Gnomes";
|
||||
initially, Tweek (introduced in that episode) is the only
|
||||
one aware of the tiny gnomes after spotting them sneaking
|
||||
about; they are embarked upon a three-step business plan;
|
||||
a diagram of the plan shows:
|
||||
Phase 1 Phase 2 Phase 3
|
||||
Collect underpants ? Profit
|
||||
and they never verbalize step 2 so we don't either */
|
||||
verbl_msg = (gnomeplan == 1) ? "Phase one, collect underpants."
|
||||
: "Phase three, profit!";
|
||||
else if (is_gnome(ptr)) {
|
||||
if (Hallucination && (gnomeplan = rn2(4)) % 2) {
|
||||
/* skipped for rn2(4) result of 0 or 2;
|
||||
gag from an early episode of South Park called "Gnomes";
|
||||
initially, Tweek (introduced in that episode) is the only
|
||||
one aware of the tiny gnomes after spotting them sneaking
|
||||
about; they are embarked upon a three-step business plan;
|
||||
a diagram of the plan shows:
|
||||
Phase 1 Phase 2 Phase 3
|
||||
Collect underpants ? Profit
|
||||
and they never verbalize step 2 so we don't either */
|
||||
verbl_msg = (gnomeplan == 1) ? "Phase one, collect underpants."
|
||||
: "Phase three, profit!";
|
||||
}
|
||||
else {
|
||||
verbl_msg =
|
||||
"Many enter the dungeon, and few return to the sunlit lands.";
|
||||
}
|
||||
}
|
||||
else
|
||||
switch (monsndx(ptr)) {
|
||||
case PM_HOBBIT:
|
||||
|
||||
@@ -355,6 +355,11 @@ boolean allow_drag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (flags.verbose)
|
||||
You("materialize in %s location!",
|
||||
(nux == u.ux0 && nuy == u.uy0) ? "the same" : "a different");
|
||||
|
||||
/* must set u.ux, u.uy after drag_ball(), which may need to know
|
||||
the old position if allow_drag is true... */
|
||||
u_on_newpos(nux, nuy); /* set u.<x,y>, usteed-><mx,my>; cliparound() */
|
||||
@@ -1015,7 +1020,10 @@ level_tele()
|
||||
if (!(wizard && force_dest))
|
||||
get_level(&newlevel, newlev);
|
||||
}
|
||||
schedule_goto(&newlevel, FALSE, FALSE, 0, (char *) 0, (char *) 0);
|
||||
|
||||
schedule_goto(&newlevel, FALSE, FALSE, 0, (char *) 0,
|
||||
flags.verbose ? "You materialize on a different level!" : (char *)0);
|
||||
|
||||
/* in case player just read a scroll and is about to be asked to
|
||||
call it something, we can't defer until the end of the turn */
|
||||
if (u.utotype && !g.context.mon_moving)
|
||||
|
||||
@@ -69,11 +69,17 @@ static void
|
||||
give_may_advance_msg(skill)
|
||||
int skill;
|
||||
{
|
||||
static boolean got_enhance_tip = FALSE;
|
||||
You_feel("more confident in your %sskills.",
|
||||
(skill == P_NONE) ? ""
|
||||
: (skill <= P_LAST_WEAPON) ? "weapon "
|
||||
: (skill <= P_LAST_SPELL) ? "spell casting "
|
||||
: "fighting ");
|
||||
|
||||
if (!got_enhance_tip) {
|
||||
pline("(Use the #enhance command to advance them.)");
|
||||
}
|
||||
got_enhance_tip = TRUE;
|
||||
}
|
||||
|
||||
/* weapon's skill category name for use as generalized description of weapon;
|
||||
|
||||
@@ -4626,7 +4626,7 @@ short exploding_wand_typ;
|
||||
case ZT_COLD:
|
||||
new_doormask = D_NODOOR;
|
||||
see_txt = "The door freezes and shatters!";
|
||||
sense_txt = "feel cold.";
|
||||
hear_txt = "a deep cracking sound.";
|
||||
break;
|
||||
case ZT_DEATH:
|
||||
/* death spells/wands don't disintegrate */
|
||||
|
||||
@@ -4530,7 +4530,7 @@ Z = (195, 195, 195)
|
||||
................
|
||||
................
|
||||
}
|
||||
# tile 237 (iron hook / grappling hook)
|
||||
# tile 237 (grappling hook)
|
||||
{
|
||||
.............N..
|
||||
..............P.
|
||||
|
||||
Reference in New Issue
Block a user