Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
420f412
Port NetHack4 colored flashes when dropping a container on an altar
copperwater Apr 21, 2018
a78d58b
Make all orcish creatures resist poison
copperwater Feb 5, 2019
22484e7
Consider the dwarvish roundshield and Uruk-hai shield to be "bulky"
copperwater Jan 12, 2020
da76690
Force bolts destroy iron bars
copperwater Sep 14, 2018
387df88
Blessed and uncursed wands wrest much more often
copperwater Dec 13, 2018
f191615
Kicking sinks gives boring Klunk! 2/3 of the time instead of 4/5
copperwater Feb 24, 2018
647a7f3
Confused scrolls of earth summon earthy monsters
copperwater Feb 1, 2019
475566e
Allow the player to wish for a magic lamp
copperwater Feb 3, 2018
9d6f72d
Identify a wand when it prints an unambiguous message while engraving
copperwater Sep 25, 2018
b4f57f0
Small refactor: split off most of back_to_glyph into back_to_defsym
copperwater Jan 14, 2020
7ece5e8
Monsters can hide under furniture and can move between hiding places
copperwater Aug 18, 2018
7c92181
Implement monster introductions from SpliceHack
copperwater May 8, 2018
9b9b22f
Replace Mercury with Apollo and Venus with Diana in the Ranger pantheon
copperwater Nov 6, 2017
1fc4e7d
Grant a newt-like energy buzz from spellcasting monsters' corpses
copperwater Jan 14, 2020
c497bc9
Green slime now has an engulfing sliming attack
copperwater Nov 1, 2017
b316251
Add the Free Fortune Cookie Patch, by Nephi
copperwater Feb 28, 2019
48ea2a1
Orc captains are lords and have speed 9
copperwater Nov 28, 2017
5bf63ae
Change mechanics of rings dropped in sinks
copperwater Feb 24, 2018
a54abc2
Buff the effects of the scroll of light
copperwater Oct 29, 2017
34c1acb
Change the color of floating eyes to cyan
copperwater Jan 15, 2020
ed082b4
Polymorph traps disappear when they successfully polymorph something
copperwater Apr 1, 2018
b828068
Remove ability to wish for a random item via Escape or empty buffer
copperwater May 31, 2018
ab1a736
Wearing a ring of regeneration makes it known and prints a message
copperwater Jun 4, 2018
f92b79f
Wizard mode can override an artifact ignoring you
copperwater Jun 13, 2018
826f6ba
Monsters occupying the player's arrival spot are always moved
copperwater Aug 20, 2018
7a9262c
Better message than "doesn't like your taste"
copperwater Nov 9, 2018
c090486
Make rabid and sewer rats hide under objects
copperwater Nov 24, 2018
5e51172
Hungerless casting ignores "too hungry to cast" penalty
copperwater Jan 27, 2019
de094a6
Refactor: mpickstuff takes callback instead of object class list
copperwater Feb 21, 2019
275bfb8
Remove limit of 5 unrecognized wish attempts
copperwater Sep 4, 2019
dcba039
Hallucination always blocks floating eye gaze
copperwater Sep 4, 2019
7c1cb59
Hallucinatory rays
copperwater Sep 10, 2019
d4ec476
"Mortals cannot enter the Mazes of Menace more than once"
copperwater Sep 17, 2019
942d8e5
Scale monster group size based on dungeon level, not character level
copperwater Sep 19, 2019
9db3517
Prevent priest-type monsters from receiving a cursed mace
copperwater Sep 30, 2019
ef4bbdc
Place Fort Ludios portal in the first eligible vault generated
copperwater Oct 1, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions 4 include/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@ enum explosion_types {
/* else U_AP_TYPE == M_AP_MONSTER */ \
: monnum_to_glyph(g.youmonst.mappearance)))

/* Get a string describing the terrain at (x, y). */
#define explain_terrain(x, y) \
(defsyms[back_to_defsym((x), (y))].explanation)

/*
* A glyph is an abstraction that represents a _unique_ monster, object,
* dungeon part, or effect. The uniqueness is important. For example,
Expand Down
7 changes: 6 additions & 1 deletion 7 include/extern.h
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ E void FDECL(row_refresh, (int, int, int));
E void NDECL(cls);
E void FDECL(flush_screen, (int));
E int FDECL(back_to_glyph, (XCHAR_P, XCHAR_P));
E int FDECL(back_to_defsym, (XCHAR_P, XCHAR_P));
E int FDECL(zapdir_to_glyph, (int, int, int));
E int FDECL(glyph_at, (XCHAR_P, XCHAR_P));
E void NDECL(reglyph_darkroom);
Expand Down Expand Up @@ -479,6 +480,7 @@ E struct monst *FDECL(christen_orc, (struct monst *, const char *,
const char *));
E const char *FDECL(noveltitle, (int *));
E const char *FDECL(lookup_novel, (const char *, int *));
E void FDECL(mintroduce, (struct monst *));

/* ### do_wear.c ### */

Expand Down Expand Up @@ -862,6 +864,7 @@ E void NDECL(drinkfountain);
E void FDECL(dipfountain, (struct obj *));
E void FDECL(breaksink, (int, int));
E void NDECL(drinksink);
E struct obj* FDECL(ring_from_sink, (XCHAR_P, XCHAR_P));

/* ### hack.c ### */

Expand Down Expand Up @@ -1462,7 +1465,7 @@ E int FDECL(meatmetal, (struct monst *));
E int FDECL(meatobj, (struct monst *));
E int FDECL(meatcorpse, (struct monst *));
E void FDECL(mpickgold, (struct monst *));
E boolean FDECL(mpickstuff, (struct monst *, const char *));
E boolean FDECL(mpickstuff, (struct monst *, boolean (*)(OBJ_P)));
E int FDECL(curr_mon_load, (struct monst *));
E int FDECL(max_mon_load, (struct monst *));
E int FDECL(can_carry, (struct monst *, struct obj *));
Expand Down Expand Up @@ -1581,6 +1584,7 @@ E void FDECL(mon_yells, (struct monst *, const char *));
E int FDECL(dochug, (struct monst *));
E boolean FDECL(m_digweapon_check, (struct monst *, XCHAR_P, XCHAR_P));
E int FDECL(m_move, (struct monst *, int));
E int FDECL(concealed_spot, (int, int));
E void FDECL(dissolve_bars, (int, int));
E boolean FDECL(closed_door, (int, int));
E boolean FDECL(accessible, (int, int));
Expand Down Expand Up @@ -3174,6 +3178,7 @@ E void FDECL(destroy_item, (int, int));
E int FDECL(destroy_mitem, (struct monst *, int, int));
E int FDECL(resist, (struct monst *, CHAR_P, int, int));
E void NDECL(makewish);
E const char* FDECL(flash_str, (int, BOOLEAN_P));

#endif /* !MAKEDEFS_C && !MDLIB_C */

Expand Down
1 change: 0 additions & 1 deletion 1 include/rm.h
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,6 @@ extern const struct symdef def_warnsyms[WARNCOUNT];
*/
#define S_LPUDDING 1
#define S_LDWASHER 2
#define S_LRING 4

/*
* The four directions for a DrawBridge.
Expand Down
9 changes: 6 additions & 3 deletions 9 src/apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -2127,9 +2127,12 @@ long timeout;
suppress_see = TRUE;

if (mtmp->mundetected) {
if (hides_under(mtmp->data) && mshelter) {
Sprintf(and_vanish, " and %s under %s",
locomotion(mtmp->data, "crawl"), doname(mshelter));
if (hides_under(mtmp->data) && concealed_spot(mtmp->mx, mtmp->my)) {
Sprintf(and_vanish, " and %s under %s%s",
locomotion(mtmp->data, "crawl"),
(mshelter ? "" : "the "),
(mshelter ? doname(mshelter) :
explain_terrain(mtmp->mx, mtmp->my)));
} else if (mtmp->data->mlet == S_MIMIC
|| mtmp->data->mlet == S_EEL) {
suppress_see = TRUE;
Expand Down
16 changes: 10 additions & 6 deletions 16 src/artifact.c
Original file line number Diff line number Diff line change
Expand Up @@ -1451,9 +1451,11 @@ struct obj *obj;
/* the artifact is tired :-) */
You_feel("that %s %s ignoring you.", the(xname(obj)),
otense(obj, "are"));
/* and just got more so; patience is essential... */
obj->age += (long) d(3, 10);
return 1;
if (!(wizard && yn("Override?") == 'y')) {
/* and just got more so; patience is essential... */
obj->age += (long) d(3, 10);
return 1;
}
}
obj->age = g.monstermoves + rnz(100);

Expand Down Expand Up @@ -1627,9 +1629,11 @@ struct obj *obj;
u.uprops[oart->inv_prop].extrinsic ^= W_ARTI;
You_feel("that %s %s ignoring you.", the(xname(obj)),
otense(obj, "are"));
/* can't just keep repeatedly trying */
obj->age += (long) d(3, 10);
return 1;
if (!(wizard && yn("Override?") == 'y')) {
/* can't just keep repeatedly trying */
obj->age += (long) d(3, 10);
return 1;
}
} else if (!on) {
/* when turning off property, determine downtime */
/* arbitrary for now until we can tune this -dlc */
Expand Down
2 changes: 1 addition & 1 deletion 2 src/dig.c
Original file line number Diff line number Diff line change
Expand Up @@ -2041,7 +2041,7 @@ long timeout;
struct monst *mtmp = m_at(x, y);

/* a hiding monster may be exposed */
if (mtmp && !OBJ_AT(x, y) && mtmp->mundetected
if (mtmp && !concealed_spot(x, y) && mtmp->mundetected
&& hides_under(mtmp->data)) {
mtmp->mundetected = 0;
} else if (x == u.ux && y == u.uy && u.uundetected && hides_under(g.youmonst.data))
Expand Down
13 changes: 11 additions & 2 deletions 13 src/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1744,6 +1744,15 @@ int cursor_on_u;
int
back_to_glyph(x, y)
xchar x, y;
{
return cmap_to_glyph(back_to_defsym(x, y));
}

/* extracted from back_to_glyph so that we can get the string description of a
* terrain spot on the map */
int
back_to_defsym(x, y)
xchar x, y;
{
int idx;
struct rm *ptr = &(levl[x][y]);
Expand Down Expand Up @@ -1858,12 +1867,12 @@ xchar x, y;
idx = (ptr->horizontal) ? S_hodbridge : S_vodbridge;
break;
default:
impossible("back_to_glyph: unknown level type [ = %d ]", ptr->typ);
impossible("back_to_defsym: unknown level type [ = %d ]", ptr->typ);
idx = S_room;
break;
}

return cmap_to_glyph(idx);
return idx;
}

/*
Expand Down
56 changes: 47 additions & 9 deletions 56 src/do.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,50 @@ register struct obj *obj;
if (obj->oclass != COIN_CLASS)
obj->bknown = 1; /* ok to bypass set_bknown() */
}

/* From NetHack4: colored flashes one level deep inside containers. */
if (Has_contents(obj) && !obj->olocked && obj->cknown) {
int blessed = 0;
int cursed = 0;
struct obj * otmp;
for (otmp = obj->cobj; otmp; otmp = otmp->nobj) {
if (otmp->blessed)
blessed++;
if (otmp->cursed)
cursed++;
if (!Hallucination) {
otmp->bknown = 1;
}
}
/* even when hallucinating, if you get no flashes at all, you know
* everything's uncursed, so save the player the trouble of manually
* naming them all */
if (Hallucination && blessed + cursed == 0) {
for (otmp = obj->cobj; otmp; otmp = otmp->nobj) {
otmp->bknown = 1;
}
}
if (blessed + cursed > 0) {
const char* color;
if (Hallucination) {
color = "pretty multichromatic";
}
else if (blessed == 0) {
color = hcolor(NH_BLACK);
}
else if (cursed == 0) {
color = hcolor(NH_AMBER);
}
else {
color = "colored";
}

pline("From inside %s, you see %s flash%s.",
the(xname(obj)),
(blessed + cursed == 1 ? an(color) : color),
(blessed + cursed == 1 ? "" : "es"));
}
}
}

static void
Expand Down Expand Up @@ -549,7 +593,7 @@ register struct obj *obj;
pline_The("sink backs up, leaving %s.", doname(obj));
obj->in_use = FALSE;
dropx(obj);
} else if (!rn2(5)) {
} else if (rn2(5)) {
freeinv(obj);
obj->in_use = FALSE;
obj->ox = u.ux;
Expand Down Expand Up @@ -1231,14 +1275,8 @@ struct monst *mtmp;

/* There's a monster at your target destination; it might be one
which accompanied you--see mon_arrive(dogmove.c)--or perhaps
it was already here. Randomly move you to an adjacent spot
or else the monster to any nearby location. Prior to 3.3.0
the latter was done unconditionally. */
if (!rn2(2) && enexto(&cc, u.ux, u.uy, g.youmonst.data)
&& distu(cc.x, cc.y) <= 2)
u_on_newpos(cc.x, cc.y); /*[maybe give message here?]*/
else
mnexto(mtmp);
it was already here. Displace the monster to any nearby location. */
mnexto(mtmp);

if ((mtmp = m_at(u.ux, u.uy)) != 0) {
/* there was an unconditional impossible("mnexto failed")
Expand Down
58 changes: 58 additions & 0 deletions 58 src/do_name.c
Original file line number Diff line number Diff line change
Expand Up @@ -2333,4 +2333,62 @@ int *idx;
return (const char *) 0;
}

/* Most of these are actual names of nymphs from mythology. */
const char* nymphnames[] = {
"Erythea", "Hesperia", "Arethusa", "Pasithea", "Thaleia", "Halimede",
"Actaea", "Electra", "Maia", "Nesaea", "Alcyone", "Asterope",
"Callianeira", "Nausithoe", "Dione", "Thetis", "Ephyra", "Eulimene",
"Nerea", "Laomedeia", "Echo", "Maera", "Eurydice", "Lysianassa", "Phoebe",
"Daphnis", "Daphnae", "Melinoe", "Othreis", "Polychrome"
};

const char* maldemonnames[] = {
"Agiel", "Kali", "Amon", "Foras", "Armaros", "Orias", "Malthus", "Asag",
"Raum", "Iblis", "Vanth", "Bael", "Leonard", "Barbas", "Charun", "Ishmael",
"Balthamel", "Rahvin"
};

const char* femdemonnames[] = {
"Mara", "Lamia", "Meraxes", "Daeva", "Amy", "Lilith", "Aliss", "Berith",
"Euryale", "Zorya", "Rhaenyra", "Bellatrix", "Rusalka", "Messaana",
"Jadis", "Anzu", "Eve", "Bilquis", "Cyndane", "Vanessa", "Daenera"
};
#define rnd_name(list) list[rn2(SIZE(list))]

/* Monster introduces themselves. If they're not currently named, give them a
* random name from the specified list. */
void
mintroduce(mtmp)
struct monst *mtmp;
{
if (!has_mname(mtmp)) {
const char* name;
if (mtmp->data->mlet == S_NYMPH) {
name = rnd_name(nymphnames);
}
else if (is_demon(mtmp->data)) {
if (mtmp->female)
name = rnd_name(femdemonnames);
else
name = rnd_name(maldemonnames);
}
else {
impossible("mintroduce: monster type %s has no defined names!",
mtmp->data->mname);
return;
}
const char* pronoun =
genders[is_neuter(mtmp->data) ? 2 : mtmp->female].him;
if (!Deaf) {
pline("%s introduces %sself to you as %s.", Monnam(mtmp), pronoun,
name);
christen_monst(mtmp, name);
} else {
pline("%s seems to be introducing %sself, but you can't hear %s.",
Monnam(mtmp), pronoun, pronoun);
}
}
return;
}

/*do_name.c*/
10 changes: 8 additions & 2 deletions 10 src/do_wear.c
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,6 @@ register struct obj *obj;

switch (obj->otyp) {
case RIN_TELEPORTATION:
case RIN_REGENERATION:
case RIN_SEARCHING:
case RIN_HUNGER:
case RIN_AGGRAVATE_MONSTER:
Expand All @@ -964,6 +963,10 @@ register struct obj *obj;
case RIN_SUSTAIN_ABILITY:
case MEAT_RING:
break;
case RIN_REGENERATION:
You_feel("invigorated!");
learnring(obj, TRUE);
break;
case RIN_STEALTH:
toggle_stealth(obj, oldprop, TRUE);
break;
Expand Down Expand Up @@ -1059,7 +1062,6 @@ boolean gone;

switch (obj->otyp) {
case RIN_TELEPORTATION:
case RIN_REGENERATION:
case RIN_SEARCHING:
case RIN_HUNGER:
case RIN_AGGRAVATE_MONSTER:
Expand All @@ -1076,6 +1078,10 @@ boolean gone;
case RIN_SUSTAIN_ABILITY:
case MEAT_RING:
break;
case RIN_REGENERATION:
You_feel("enervated.");
learnring(obj, TRUE);
break;
case RIN_STEALTH:
toggle_stealth(obj, (EStealth & ~mask), FALSE);
break;
Expand Down
8 changes: 3 additions & 5 deletions 8 src/dokick.c
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ dokick()

if (Levitation)
goto dumb;
if (rn2(5)) {
if (rn2(3)) {
if (!Deaf)
pline("Klunk! The pipes vibrate noisily.");
else
Expand Down Expand Up @@ -1194,14 +1194,12 @@ dokick()
: !Deaf
? "You hear a sloshing sound" /* Deaf-aware */
: "Something splashes you in the", buf);
if (!(g.maploc->looted & S_LRING)) { /* once per sink */
struct obj * otmp = ring_from_sink(x, y);
if (otmp) {
if (!Blind)
You_see("a ring shining in its midst.");
(void) mkobj_at(RING_CLASS, x, y, TRUE);
newsym(x, y);
exercise(A_DEX, TRUE);
exercise(A_WIS, TRUE); /* a discovery! */
g.maploc->looted |= S_LRING;
}
return 1;
}
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.