fix typos

This commit is contained in:
RainRat
2024-02-28 20:15:56 -08:00
parent b53a43027f
commit a3658f85ac
167 changed files with 320 additions and 320 deletions
+1 -1
View File
@@ -1886,7 +1886,7 @@ is_valid_jump_pos(coordxy x, coordxy y, int magic, boolean showmsg)
coord uc, tc;
struct rm *lev = &levl[u.ux][u.uy];
/* we want to categorize trajectory for use in determining
passage through doorways: horizonal, vertical, or diagonal;
passage through doorways: horizontal, vertical, or diagonal;
since knight's jump and other irregular directions are
possible, we flatten those out to simplify door checks */
int diag, traj;
+2 -2
View File
@@ -240,11 +240,11 @@ losestr(int num, const char *knam, schar k_format)
losehp(dmg, knam, k_format);
if (Upolyd) {
/* if still polymorhed, reduce you-as-monst maxHP; never below 1 */
/* if still polymorphed, reduce you-as-monst maxHP; never below 1 */
u.mhmax -= min(dmg, u.mhmax - 1);
} else if (!waspolyd) {
/* not polymorphed now and didn't rehumanize when taking damage;
reduce max HP, but not below below uhpmin */
reduce max HP, but not below uhpmin */
if (u.uhpmax > uhpmin)
setuhpmax(max(u.uhpmax - dmg, uhpmin));
}
+1 -1
View File
@@ -634,7 +634,7 @@ drag_ball(coordxy x, coordxy y, int *bc_control,
already_in_rock = FALSE;
switch (dist2(x, y, uball->ox, uball->oy)) {
/* two spaces diagonal from ball, move chain inbetween */
/* two spaces diagonal from ball, move chain in-between */
case 8:
*chainx = (uball->ox + x) / 2;
*chainy = (uball->oy + y) / 2;
+2 -2
View File
@@ -333,7 +333,7 @@ fixuporacle(struct monst *oracle)
break;
if (o_ridx != ridx && ridx < SIZE(gr.rooms)) {
/* room found and she's not not in it, so try to move her there */
/* room found and she's not in it, so try to move her there */
cc.x = (gr.rooms[ridx].lx + gr.rooms[ridx].hx) / 2;
cc.y = (gr.rooms[ridx].ly + gr.rooms[ridx].hy) / 2;
if (enexto(&cc, cc.x, cc.y, oracle->data)) {
@@ -758,7 +758,7 @@ fix_ghostly_obj(struct obj *obj)
if (!obj->ghostly)
return;
switch(obj->otyp) {
/* asymetrical weapons */
/* asymmetrical weapons */
case BOW:
case ELVEN_BOW:
case ORCISH_BOW:
+4 -4
View File
@@ -669,9 +669,9 @@ doextlist(void)
continue;
if (!onelist && pass != wizc)
continue;
/* command descripton might get modified on the fly */
/* command description might get modified on the fly */
cmd_desc = efp->ef_desc;
/* suppress part of the descripton for #genocided if it
/* suppress part of the description for #genocided if it
doesn't apply during the current game */
if (!wizard && !discover
&& (efp->flags & GENERALCMD) != 0 /* minor optimization */
@@ -1457,7 +1457,7 @@ static int
wiz_flip_level(void)
{
static const char choices[] = "0123",
prmpt[] = "Flip 0=randomly, 1=vertically, 2=horizonally, 3=both:";
prmpt[] = "Flip 0=randomly, 1=vertically, 2=horizontally, 3=both:";
/*
* Does not handle
@@ -4447,7 +4447,7 @@ wiz_mon_diff(void)
}
}
if (!trouble)
putstr(win, 0, "No monster difficulty discrepencies were detected.");
putstr(win, 0, "No monster difficulty discrepancies were detected.");
display_nhwindow(win, FALSE);
destroy_nhwindow(win);
return ECMD_OK;
+1 -1
View File
@@ -97,7 +97,7 @@ const char *fqn_prefix_names[PREFIX_COUNT] = {
const schar xdir[N_DIRS_Z] = { -1, -1, 0, 1, 1, 1, 0, -1, 0, 0 };
const schar ydir[N_DIRS_Z] = { 0, -1, -1, -1, 0, 1, 1, 1, 0, 0 };
const schar zdir[N_DIRS_Z] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, -1 };
/* redordered directions, cardinals first */
/* reordered directions, cardinals first */
const schar dirs_ord[N_DIRS] =
{ DIR_W, DIR_N, DIR_E, DIR_S, DIR_NW, DIR_NE, DIR_SE, DIR_SW };
+2 -2
View File
@@ -1301,7 +1301,7 @@ use_crystal_ball(struct obj **optr)
if (ch == DEF_MIMIC_DEF)
ch = DEF_MIMIC;
/* checking furnture before objects allows '_' to find altars
/* checking furniture before objects allows '_' to find altars
(along with other furniture) instead of finding iron chains */
if (def_char_is_furniture(ch) >= 0) {
ret = furniture_detect();
@@ -2121,7 +2121,7 @@ dump_map(void)
boolean blankrow, toprow;
/*
* Squeeze out excess vertial space when dumping the map.
* Squeeze out excess vertical space when dumping the map.
* If there are any blank map rows at the top, suppress them
* (our caller has already printed a separator). If there is
* more than one blank map row at the bottom, keep just one.
+1 -1
View File
@@ -2004,7 +2004,7 @@ unearth_objs(int x, int y)
/*
* The organic material has rotted away while buried. As an expansion,
* we could add add partial damage. A damage count is kept in the object
* we could add partial damage. A damage count is kept in the object
* and every time we are called we increment the count and reschedule another
* timeout. Eventually the object rots away.
*
+5 -5
View File
@@ -514,10 +514,10 @@ display_monster(
mgendercode = mon->female ? FEMALE : MALE;
/*
* We must do the mimic check first. If the mimic is mimicing something,
* We must do the mimic check first. If the mimic is mimicking something,
* and the location is in sight, we have to change the hero's memory
* so that when the position is out of sight, the hero remembers what
* the mimic was mimicing.
* the mimic was mimicking.
*/
if (mon_mimic && (sightflags == PHYSICALLY_SEEN)) {
switch (M_AP_TYPE(mon)) {
@@ -558,7 +558,7 @@ display_monster(
obj.ox = x;
obj.oy = y;
obj.otyp = mon->mappearance;
/* might be mimicing a corpse or statue */
/* might be mimicking a corpse or statue */
obj.corpsenm = has_mcorpsenm(mon) ? MCORPSENM(mon) : PM_TENGU;
map_object(&obj, !sensed);
break;
@@ -573,7 +573,7 @@ display_monster(
} /* switch M_AP_TYPE() */
}
/* If mimic is unsuccessfully mimicing something, display the monster. */
/* If mimic is unsuccessfully mimicking something, display the monster. */
if (!mon_mimic || sensed) {
int num;
@@ -1485,7 +1485,7 @@ mimic_light_blocking(struct monst *mtmp)
}
/*
* Block/unblock light depending on what a mimic is mimicing and if it's
* Block/unblock light depending on what a mimic is mimicking and if it's
* invisible or not. Should be called only when the state of See_invisible
* changes.
*/
+1 -1
View File
@@ -1985,7 +1985,7 @@ x_monnam(
* This monster has become important, for the moment anyway.
* As the hero's consumer, it is worthy of ARTICLE_THE.
* Also, suppress invisible as that particular characteristic
* is unimportant now and you can see it's interior anyway.
* is unimportant now and you can see its interior anyway.
*/
article = ARTICLE_THE;
suppress |= SUPPRESS_INVISIBLE;
+3 -3
View File
@@ -531,7 +531,7 @@ Helmet_off(void)
return 0;
}
/* hard helms provide better protection against against falling rocks */
/* hard helms provide better protection against falling rocks */
boolean
hard_helmet(struct obj *obj)
{
@@ -992,7 +992,7 @@ Amulet_on(void)
break;
}
case AMULET_OF_FLYING:
/* setworn() has already set extrinisic flying */
/* setworn() has already set extrinsic flying */
float_vs_flight(); /* block flying if levitating */
if (Flying) {
boolean already_flying;
@@ -1099,7 +1099,7 @@ learnring(struct obj *ring, boolean observed)
{
int ringtype = ring->otyp;
/* if effect was observeable then we usually discover the type */
/* if effect was observable then we usually discover the type */
if (observed) {
/* if we already know the ring type which accomplishes this
effect (assumes there is at most one type for each effect),
+1 -1
View File
@@ -1383,7 +1383,7 @@ static const struct qmchoices {
int mndx; /* type of pet, 0 means any */
char mlet; /* symbol of pet, 0 means any */
unsigned mappearance; /* mimic this */
uchar m_ap_type; /* what is the thing it is mimicing? */
uchar m_ap_type; /* what is the thing it is mimicking? */
} qm[] = {
/* Things that some pets might be thinking about at the time */
{ PM_LITTLE_DOG, 0, PM_KITTEN, M_AP_MONSTER },
+1 -1
View File
@@ -94,7 +94,7 @@ def_char_to_objclass(char ch)
/*
* Convert a character into a monster class. This returns the _first_
* match made. If there are are no matches, return MAXMCLASSES.
* match made. If there are no matches, return MAXMCLASSES.
* Used in detect.c, options.c, read.c, sp_lev.c, and lev_main.c
*/
int
+1 -1
View File
@@ -3154,7 +3154,7 @@ count_feat_lastseentyp(
switch (gl.lastseentyp[x][y]) {
#if 0 /* levels that have these tend of have a lot of them */
/*
* FIXME? due to theme rooms, lots of levels have an incresed
* FIXME? due to theme rooms, lots of levels have an increased
* chance of having these so automatic annotations for them may
* have become more worthwhile now.
*/
+1 -1
View File
@@ -156,7 +156,7 @@ static const struct {
{ "", 0, 0, 0 } };
#define TTSZ SIZE(tintxts)
/* called after mimicing is over */
/* called after mimicking is over */
static int
eatmdone(void)
{
+2 -2
View File
@@ -74,7 +74,7 @@ ATTRNORETURN extern void nethack_exit(int) NORETURN;
#include <execinfo.h>
#endif
/* What do we try and in what order? Tradeoffs:
/* What do we try to in what order? Tradeoffs:
* libc: +no external programs required
* -requires newish libc/glibc
* -requires -rdynamic
@@ -1660,7 +1660,7 @@ fuzzer_savelife(int how)
++remedies;
}
if (!rn2(3 + 3 * remedies)) {
/* confer temporary resistances for first 8 properities:
/* confer temporary resistances for first 8 properties:
fire, cold, sleep, disint, shock, poison, acid, stone */
for (propidx = 1; propidx <= 8; ++propidx) {
if (!u.uprops[propidx].intrinsic
+2 -2
View File
@@ -1571,9 +1571,9 @@ disturb_grave(coordxy x, coordxy y)
struct rm *lev = &levl[x][y];
if (!IS_GRAVE(lev->typ)) {
impossible("Disturing grave that isn't a grave? (%d)", lev->typ);
impossible("Disturbing grave that isn't a grave? (%d)", lev->typ);
} else if (lev->disturbed) {
impossible("Disturing already disturbed grave?");
impossible("Disturbing already disturbed grave?");
} else {
You("disturb the undead!");
lev->disturbed = 1;
+2 -2
View File
@@ -588,7 +588,7 @@ strNsubst(
const char *rp;
unsigned len = (unsigned) strlen(orig);
int ocount = 0, /* number of times 'orig' has been matched */
rcount = 0; /* number of subsitutions made */
rcount = 0; /* number of substitutions made */
for (bp = inoutbuf, op = workbuf; *bp && op < &workbuf[BUFSZ - 1]; ) {
if ((!len || !strncmp(bp, orig, len)) && (++ocount == n || n == 0)) {
@@ -1273,7 +1273,7 @@ strbuf_empty(strbuf_t *strbuf)
strbuf_init(strbuf);
}
/* strbuf_nl_to_crlf() converts all occurences of \n to \r\n */
/* strbuf_nl_to_crlf() converts all occurrences of \n to \r\n */
void
strbuf_nl_to_crlf(strbuf_t *strbuf)
{
+6 -6
View File
@@ -6,7 +6,7 @@
* Enlightenment and Conduct+Achievements and Vanquished+Extinct+Geno'd
* and stethoscope/probing feedback.
*
* Most code used to reside in cmd.c, presumeably because ^X was originally
* Most code used to reside in cmd.c, presumably because ^X was originally
* a wizard mode command and the majority of those are in that file.
* Some came from end.c where it is used during end of game disclosure.
* And some came from priest.c that had once been in pline.c.
@@ -1027,7 +1027,7 @@ status_enlightenment(int mode, int final)
Sprintf(buf, "%s blind",
(HBlinded & FROMOUTSIDE) != 0L ? "permanently"
: (HBlinded & FROMFORM) ? "innately"
/* better phrasing desparately wanted... */
/* better phrasing desperately wanted... */
: Blindfolded_only ? "deliberately"
/* timed, possibly combined with blindfold */
: "temporarily");
@@ -1741,7 +1741,7 @@ attributes_enlightenment(
(u.uhitinc < 0) ? "increasing"
: (u.uhitinc < 4 * gu.urole.spelarmr / 5)
? "partly offsetting"
: (u.uhitinc < gu.urole.spelarmr) ? "nearly offseting"
: (u.uhitinc < gu.urole.spelarmr) ? "nearly offsetting"
: "overcoming");
you_have(buf, "");
}
@@ -1978,7 +1978,7 @@ doattributes(void)
}
void
youhiding(boolean via_enlghtmt, /* englightment line vs topl message */
youhiding(boolean via_enlghtmt, /* enlightenment line vs topl message */
int msgflag) /* for variant message phrasing */
{
char *bp, buf[BUFSZ];
@@ -2601,7 +2601,7 @@ vanqsort_cmp(
case VANQ_ALPHA_MIX:
name1 = mons[indx1].pmnames[NEUTRAL];
name2 = mons[indx2].pmnames[NEUTRAL];
res = strcmpi(name1, name2); /* caseblind alhpa, low to high */
res = strcmpi(name1, name2); /* caseblind alpha, low to high */
break;
case VANQ_MCLS_HTOL:
case VANQ_MCLS_LTOH:
@@ -2892,7 +2892,7 @@ num_extinct(void)
return n;
}
/* collect both genocides and extintctions, skipping uniques */
/* collect both genocides and extinctions, skipping uniques */
static int
num_gone(int mvflags, int *mindx)
{
+5 -5
View File
@@ -965,7 +965,7 @@ merged(struct obj **potmp, struct obj **pobj)
* addinv) or when an object in the hero's inventory has been polymorphed
* in-place.
*
* It may be valid to merge this code with with addinv_core2().
* It may be valid to merge this code with addinv_core2().
*/
void
addinv_core1(struct obj *obj)
@@ -1210,7 +1210,7 @@ hold_another_object(
dropy(obj); /* now put it back again :-) */
return obj;
} else if (wasUpolyd && !Upolyd) {
/* loose your grip if you revert your form */
/* lose your grip if you revert your form */
if (drop_fmt)
pline(drop_fmt, drop_arg);
obj_extract_self(obj);
@@ -1412,7 +1412,7 @@ delobj_core(
boolean update_map;
/* obj_resists(obj,0,0) protects the Amulet, the invocation tools,
and Rider corspes */
and Rider corpses */
if (!force && obj_resists(obj, 0, 0)) {
/* player might be doing something stupid, but we
* can't guarantee that. assume special artifacts
@@ -1793,7 +1793,7 @@ getobj(
*bp++ = HANDS_SYM;
*bp++ = ' '; /* put a space after the '-' in the prompt */
break;
case GETOBJ_DOWNPLAY: /* acceptable but not shown as likely chioce */
case GETOBJ_DOWNPLAY: /* acceptable but not shown as likely choice */
case GETOBJ_EXCLUDE_INACCESS: /* nothing currently gives this for '-' but
* theoretically could if wearing gloves */
case GETOBJ_EXCLUDE_SELECTABLE: /* ditto, I think... */
@@ -5106,7 +5106,7 @@ dopramulet(void)
/* using display_inventory() instead of prinv() allows player
to use 'm "' to force and menu and be able to choose amulet
in order to perform a context-sensitve item action */
in order to perform a context-sensitive item action */
lets[0] = obj_to_let(uamul), lets[1] = '\0';
(void) dispinv_with_action(lets, TRUE, "Amulet");
+1 -1
View File
@@ -188,7 +188,7 @@ m_initweap(struct monst *mtmp)
if (!rn2(3)) {
/* lance and dwarvish mattock used to be in midst of
the polearms but use different skills from polearms
and aren't appropriates choices for human soliders */
and aren't appropriates choices for human soldiers */
do {
w1 = rn1(BEC_DE_CORBIN - PARTISAN + 1, PARTISAN);
} while (objects[w1].oc_skill != P_POLEARMS);
+2 -2
View File
@@ -811,7 +811,7 @@ engulf_target(struct monst *magr, struct monst *mdef)
return FALSE;
/* if attacker is phasing in solid rock and defender can't move there,
or vice versa, don't allow engulf to succeeed; otherwise expelling
or vice versa, don't allow engulf to succeed; otherwise expelling
might not be able to place attacker and defender both back on map;
when defender is the hero, a sanity_check complaint about placing
the hero on top of a monster can occur */
@@ -886,7 +886,7 @@ gulpmm(
dx = mdef->mx;
dy = mdef->my;
/*
* Leave the defender in the monster chain at it's current position,
* Leave the defender in the monster chain at its current position,
* but don't leave it on the screen. Move the aggressor to the
* defender's position.
*/
+1 -1
View File
@@ -477,7 +477,7 @@ mattacku(struct monst *mtmp)
/* Orcs like to steal and eat horses and the like */
if (!rn2(is_orc(mtmp->data) ? 2 : 4) && m_next2u(mtmp)) {
/* attack your steed instead; 'bhitpos' and 'notonhead' are
already set from tagetting hero */
already set from targeting hero */
i = mattackm(mtmp, u.usteed);
if ((i & M_ATTK_AGR_DIED) != 0)
return 1;
+2 -2
View File
@@ -628,7 +628,7 @@ clear_splitobjs(void)
* the caller to provide a valid context for the swap. When done, obj will
* still exist, but not on any chain.
*
* Note: Don't use use obj_extract_self() -- we are doing an in-place swap,
* Note: Don't use obj_extract_self() -- we are doing an in-place swap,
* not actually moving something.
*/
void
@@ -1508,7 +1508,7 @@ shrink_glob(
/* format "Your/Shk's/The [partly eaten] glob of <goo>" into
globnambuf[] before shrinking the glob; Yname2() calls yname()
which calls xname() which ordinarly leaves "partly eaten" to
which calls xname() which ordinarily leaves "partly eaten" to
doname() rather than inserting that itself; ask xname() to add
that when appropriate */
iflags.partly_eaten_hack = TRUE;
+4 -4
View File
@@ -1671,7 +1671,7 @@ mpickstuff(struct monst *mtmp)
}
obj_extract_self(otmp3); /* remove from floor */
(void) mpickobj(mtmp, otmp3); /* may merge and free otmp3 */
/* let them try and equip it on the next turn */
/* let them try to equip it on the next turn */
check_gear_next_turn(mtmp);
newsym(mtmp->mx, mtmp->my);
return TRUE; /* pick only one object */
@@ -4316,7 +4316,7 @@ maybe_unhide_at(coordxy x, coordxy y)
}
/* monster/hero tries to hide under something at the current location;
if used by monster creation, should only happen during during level
if used by monster creation, should only happen during level
creation, otherwise there will be message sequencing issues */
boolean
hideunder(struct monst *mtmp)
@@ -4875,7 +4875,7 @@ newcham(
if (is_rider(olddata))
return 0;
/* make Nazgul and erinyes immune too, to reduce chance of
anomalous extinction feedback during final disclsoure */
anomalous extinction feedback during final disclosure */
if (mbirth_limit(monsndx(olddata)) < MAXMONNO)
return 0;
/* cancelled shapechangers become uncancelled prior
@@ -5309,7 +5309,7 @@ angry_guards(boolean silent)
if (nct) { /* seen/sensed adjacent guard(s) */
Sprintf(buf, "guard%s", plur(nct));
pline_The("%s %s angry!", buf, vtense(buf, "get"));
} else if (sct) { /* seen/sensed non-adjcent guard(s) */
} else if (sct) { /* seen/sensed non-adjacent guard(s) */
Sprintf(buf, "guard%s", plur(sct));
pline("%s %s %s approaching!",
(sct == 1) ? "An angry" : "Angry",
+1 -1
View File
@@ -311,7 +311,7 @@ disturb(struct monst *mtmp)
* not stealthy or (mon is an ettin and 9/10) AND
* (mon is not a nymph, jabberwock, or leprechaun) or 1/50 AND
* Aggravate or mon is (dog or human) or
* (1/7 and mon is not mimicing furniture or object)
* (1/7 and mon is not mimicking furniture or object)
*/
if (couldsee(mtmp->mx, mtmp->my) && mdistu(mtmp) <= 100
&& (!Stealth || (mtmp->data == &mons[PM_ETTIN] && rn2(10)))
+1 -1
View File
@@ -657,7 +657,7 @@ do_improvisation(struct obj *instr)
(do_spec && same_old_song)
? "produces a familiar, lilting melody"
: (do_spec) ? "produces a lilting melody"
: (same_old_song) ? "twangs a familar tune"
: (same_old_song) ? "twangs a familiar tune"
: "twangs");
else
You_feel("soothing vibrations.");
+1 -1
View File
@@ -868,7 +868,7 @@ l_selection_gradient(lua_State *L)
cvt_to_abscoord(&x, &y);
cvt_to_abscoord(&x2, &y2);
/* maxdist is required because there's no obvious default value for it,
* whereas mindist has an obvious defalt of 0 */
* whereas mindist has an obvious default of 0 */
maxdist = get_table_int(L, "maxdist");
mindist = get_table_int_opt(L, "mindist", 0);
+6 -6
View File
@@ -423,7 +423,7 @@ fruit_from_name(
char *altfname;
unsigned k;
/*
* note: named fruits are case-senstive...
* note: named fruits are case-sensitive...
*/
if (highest_fid)
@@ -663,7 +663,7 @@ xname_flags(
case VENOM_CLASS:
case TOOL_CLASS:
/* note: lenses or towel prefix would overwrite poisoned weapon
prefix if both were simultaneously posssible, but they aren't */
prefix if both were simultaneously possible, but they aren't */
if (typ == LENSES)
Strcpy(buf, "pair of ");
else if (is_wet_towel(obj))
@@ -1539,7 +1539,7 @@ doname_base(
: "weapon in",
hand_s);
/* we just added a parenthesized pharse, but the right paren
/* we just added a parenthesized phrase, but the right paren
might be absent if the appended string got truncated */
if (!Blind && bpspaceleft && bp_eos[-1] == ')') {
if (gw.warn_obj_cnt && obj == uwep
@@ -3995,7 +3995,7 @@ readobjnam_preparse(struct _readobjnam_data *d)
and less than 15 (owt < 300) */
d->gsize = 2;
} else if (!strncmpi(d->bp, "large ", l = 6)) {
/* "large" might be part of monster name (dog, cat, koboold,
/* "large" might be part of monster name (dog, cat, kobold,
mimic) or object name (box, round shield) rather than
prefix for glob size */
if (strncmpi(d->bp + l, "glob", 4) && !strstri(d->bp + l, " glob"))
@@ -4198,7 +4198,7 @@ readobjnam_postparse1(struct _readobjnam_data *d)
* referred to as a "pair of". E.g. We should double if the player
* types "pair of spears", but not if the player types "pair of
* lenses". Luckily (?) all objects that are referred to as pairs
* -- boots, gloves, and lenses -- are also not mergable, so cnt is
* -- boots, gloves, and lenses -- are also not mergeable, so cnt is
* ignored anyway.
*/
if (!strncmpi(d->bp, "pair of ", 8)) {
@@ -5440,7 +5440,7 @@ shield_simple_name(struct obj *shield)
return "shield";
}
/* for completness */
/* for completeness */
const char *
shirt_simple_name(struct obj *shirt UNUSED)
{
+6 -6
View File
@@ -161,7 +161,7 @@ static const struct paranoia_opts {
latter requires at least two letters; "e"at vs "ex"plore,
"cont"inue eating vs "C"onfirm; "wand"-break vs "Were"-change,
both require at least two letters during config processing but use
one letter with case-senstivity for 'm O's interactive menu;
one letter with case-sensitivity for 'm O's interactive menu;
if any entry or alias beginning with 'n' gets added, aside from "none",
the parsing to accept "nofoo" to mean "!foo" will need fixing */
{ PARANOID_CONFIRM, "Confirm", 1, "Paranoia", 2,
@@ -263,7 +263,7 @@ static NEARDATA const char *perminv_modes[][3] = {
* + a number or '#' - reserved for counts
* + an upper or lower case US ASCII letter - used for accelerators
* + ESC - reserved for escaping the menu
* + NULL, CR or LF - reserved for commiting the selection(s). NULL
* + NULL, CR or LF - reserved for committing the selection(s). NULL
* is kind of odd, but the tty's xwaitforspace() will return it if
* someone hits a <ret>.
* + a default object class symbol - used for object class accelerators
@@ -3222,7 +3222,7 @@ optfn_pickup_types(
op = tbuf; /* restore */
else if (abuf[0] == 'm')
use_menu = TRUE;
/* note: abuf[0]=='a' is already handled via clearing the
/* note: abuf[0]=='a' is already handled via clearing
the old value (above) as a default action */
}
if (use_menu) {
@@ -6382,7 +6382,7 @@ handler_windowborders(void)
mode_name = windowborders_text[i];
any.a_int = i + 1;
/* index 'i' matches the numeric setting for windowborders,
so allow corresponding digit as group accellerator */
so allow corresponding digit as group accelerator */
add_menu(tmpwin, &nul_glyphinfo, &any, 'a' + i, '0' + i,
ATR_NONE, clr, mode_name, MENU_ITEMFLAGS_NONE);
}
@@ -6896,7 +6896,7 @@ initoptions_init(void)
&& !strcmpi(windowprocs.name, gc.cmdline_windowsys))
/* ignore any windowtype:foo in RC file or NETHACKOPTIONS */
iflags.windowtype_locked = TRUE;
/* should't need cmdline_windowsys beyond here */
/* shouldn't need cmdline_windowsys beyond here */
free((genericptr_t) gc.cmdline_windowsys),
gc.cmdline_windowsys = NULL;
}
@@ -9538,7 +9538,7 @@ int
sym_val(const char *strval) /* up to 4*BUFSZ-1 long; only first few
chars matter */
{
char buf[QBUFSZ], tmp[QBUFSZ]; /* to hold trucated copy of 'strval' */
char buf[QBUFSZ], tmp[QBUFSZ]; /* to hold truncated copy of 'strval' */
buf[0] = '\0';
if (!strval[0] || !strval[1]) { /* empty, or single character */
+1 -1
View File
@@ -1853,7 +1853,7 @@ pickup_object(
if (res <= 0)
return res;
/* Whats left of the special case for gold :-) */
/* What's left of the special case for gold :-) */
if (obj->oclass == COIN_CLASS)
disp.botl = TRUE;
if (obj->quan != count && obj->otyp != LOADSTONE)
+1 -1
View File
@@ -258,7 +258,7 @@ in_trouble(void)
&& (!u.uswallow
|| !attacktype_fordmg(u.ustuck->data, AT_ENGL, AD_BLND)))
return TROUBLE_BLIND;
/* deafness isn't it's own trouble; healing magic cures deafness
/* deafness isn't its own trouble; healing magic cures deafness
when it cures blindness, so do the same with trouble repair */
if ((HDeaf & TIMEOUT) > 1L)
return TROUBLE_BLIND;
+1 -1
View File
@@ -550,7 +550,7 @@ restgamestate(NHFILE *nhfp)
of unpaid items before shopkeeper's bill is available is a no-no;
named fruit names aren't accessible yet either
[3.6.2: moved perm_invent from flags to iflags to keep it out of
save files; retaining the override here is simpler than trying to
save files; retaining the override here is simpler than trying
to figure out where it really belongs now] */
defer_perm_invent = iflags.perm_invent;
iflags.perm_invent = FALSE;
+2 -2
View File
@@ -2082,7 +2082,7 @@ role_init(void)
* place where it actually matters for the hero is in set_uasmon()
* and that can use mons[race] rather than mons[role] for this
* particular property. Despite the comment, it is checked--where
* needed--via instrinsic 'Infravision' which set_uasmon() manages.
* needed--via intrinsic 'Infravision' which set_uasmon() manages.
*/
/* Fix up infravision */
if (mons[gu.urace.mnum].mflags3 & M3_INFRAVISION) {
@@ -2876,7 +2876,7 @@ setup_rolemenu(
}
}
/* !filtering implies reset_role_filtering() where we want to
mark this role as preseleted if current filter excludes it */
mark this role as preselected if current filter excludes it */
add_menu(win, &nul_glyphinfo, &any, thisch, 0,
ATR_NONE, clr, an(rolenamebuf),
(!filtering && !role_ok)
+3 -3
View File
@@ -170,7 +170,7 @@ getrumor(
(void) dlb_fclose(rumors);
if (count >= 50)
impossible("Can't find non-cookie rumor?");
else if (!gi.in_mklev) /* avoid exercizing wisdom for graffiti */
else if (!gi.in_mklev) /* avoid exercising wisdom for graffiti */
exercise(A_WIS, (adjtruth > 0));
} else {
couldnt_open_file(RUMORFILE);
@@ -444,7 +444,7 @@ get_rnd_line(
return buf;
/* 'rumors' is about 3/4 of the way to the limit on a 16-bit config
for the whole, roughly 3/8 of the way for either half; all active
configuations these days are at least 32-bits anyway */
configurations these days are at least 32-bits anyway */
nhassert(filechunksize <= INT_MAX); /* essential for rn2() */
/*
@@ -836,7 +836,7 @@ init_CapMons(void)
unsigned mndx, mgend;
/* the first CapMonstCnt entries come from mons[].pmnames[] and
the next CapBogonCnt entries from from the 'bogusmons' file;
the next CapBogonCnt entries from the 'bogusmons' file;
there is an extra entry for Null at the end, but that is only
useful to force non-zero array size in case both mons[] and
bogusmons get modified to have no applicable monster names */
+1 -1
View File
@@ -46,7 +46,7 @@ static FILE *bw_FILE[MAXFD] = {0,0,0,0,0};
* Once buffered IO (stdio) has been enabled on the file
* associated with a descriptor via fdopen():
*
* 1. If you use bufoff and bufon to try and toggle the
* 1. If you use bufoff and bufon to try to toggle the
* use of write vs fwrite; the code just tracks which
* routine is to be called through the tracking
* variables and acts accordingly.
+3 -3
View File
@@ -828,7 +828,7 @@ pick_pick(struct obj *obj)
}
/*
Decide whether two unpaid items are mergable; caller is responsible for
Decide whether two unpaid items are mergeable; caller is responsible for
making sure they're unpaid and the same type of object; we check the price
quoted by the shopkeeper and also that they both belong to the same shk.
*/
@@ -1094,7 +1094,7 @@ obfree(struct obj *obj, struct obj *merge)
if (!merge) {
bp->useup = 1;
obj->unpaid = 0; /* only for doinvbill */
/* for used up glob, put back origial weight in case it gets
/* for used up glob, put back original weight in case it gets
formatted ('I x' or itemized billing) with 'wizweight' On */
if (obj->globby && !obj->owt && has_omid(obj))
obj->owt = OMID(obj);
@@ -1712,7 +1712,7 @@ dopay(void)
/* allow 'm p' to request a menu for menustyle:traditional;
for other styles, it will do the opposite; that doesn't make
a whole lot of sense for a 'request-menu' prefix, but otherwise
it would simply be reduncant and there wouldn't be any way to
it would simply be redundant and there wouldn't be any way to
skip the menu when hero owes for multiple items */
if (iflags.menu_requested)
via_menu = !via_menu;
+1 -1
View File
@@ -1461,7 +1461,7 @@ tiphat(void)
for (range = 1; range <= BOLT_LIM + 1; ++range) {
x += u.dx, y += u.dy;
if (!isok(x, y) || (range > 1 && !couldsee(x, y))) {
/* switch back to coordinates for previous interation's 'mtmp' */
/* switch back to coordinates for previous iteration's 'mtmp' */
x -= u.dx, y -= u.dy;
break;
}
+2 -2
View File
@@ -3491,7 +3491,7 @@ lspo_object(lua_State *L)
0, /* buried */
0, /* lit */
0, 0, 0, 0, /* eroded, locked, trapped, recharged */
0, 0, 0, 0, /* invis, greased, broken, achievment */
0, 0, 0, 0, /* invis, greased, broken, achievement */
};
#if 0
int nparams = 0;
@@ -7062,7 +7062,7 @@ static const struct luaL_Reg nhl_functions[] = {
- automatically add shuffle(array)
- automatically add align = { "law", "neutral", "chaos" } and shuffle it.
(remove from lua files)
- grab the header comments from des-files and add add them to the lua files
- grab the header comments from des-files and add them to the lua files
*/
+1 -1
View File
@@ -246,7 +246,7 @@ remove_worn_item(
* but that would need a lot more cooperation by callers. It's a
* tradeoff between protecting the player against unintentional hangup
* and defending the game against deliberate hangup when player sees a
* message about something undesireable followed by --More--.
* message about something undesirable followed by --More--.
*/
oldinuse = obj->in_use;
obj->in_use = 1;
+2 -2
View File
@@ -557,7 +557,7 @@ teleds(coordxy nux, coordxy nuy, int teleds_flags)
int
collect_coords(
coord *ccc, /* pointer to array of at least size ROWNO*(COLNO-1) */
coordxy cx, coordxy cy, /* center point, not necessarly <u.ux,u.uy> */
coordxy cx, coordxy cy, /* center point, not necessarily <u.ux,u.uy> */
int maxradius, /* how far from center to go collecting spots;
* 0 means collect entire map */
unsigned cc_flags, /* incl_center: put <cx,cy> in output list
@@ -621,7 +621,7 @@ collect_coords(
* (unshown) 4's will be mixed together, and so forth.
*
* If caller processes the output list in order, the closest viable
* spot will be chosen. If a compeletely random spot is preferred,
* spot will be chosen. If a completely random spot is preferred,
* the list can be requested to be unscrambled and then the caller
* can shuffle it, overriding the collection rings. A filter function
* could be used to skip everything after the first acceptable spot.
+3 -3
View File
@@ -815,7 +815,7 @@ nh_timeout(void)
Your("temporary ability to survive burning has ended.");
break;
case WWALKING:
/* [see fire reeistance] */
/* [see fire resistance] */
if (!Wwalking)
Your("temporary ability to walk on liquid has ended.");
break;
@@ -1315,7 +1315,7 @@ lantern_message(struct obj *obj)
}
/*
* Timeout callback for for objects that are burning. E.g. lamps, candles.
* Timeout callback for objects that are burning. E.g. lamps, candles.
* See begin_burn() for meanings of obj->age and obj->spe.
*/
void
@@ -2016,7 +2016,7 @@ wiz_timeout_queue(void)
intrinsic = u.uprops[p].intrinsic;
if (intrinsic & TIMEOUT) {
if (specindx > 0 && i >= specindx) {
putstr(win, 0, " -- settable via #wizinstrinc only --");
putstr(win, 0, " -- settable via #wizintrinsic only --");
specindx = 0;
}
/* timeout value can be up to 16777215 (0x00ffffff) but
+1 -1
View File
@@ -4994,7 +4994,7 @@ drain_en(int n, boolean max_already_drained)
/*
* FIXME?
* u.uenmax should probably have a higher mininum than 0;
* u.uenmax should probably have a higher minimum than 0;
* perhaps u.ulevel or (u.ulevel + 1) / 2
*/
if (u.uenmax < 1) {
+5 -5
View File
@@ -837,7 +837,7 @@ hmon_hitmon_barehands(struct _hitmon_data *hmd, struct monst *mon)
if (hmd->mdat == &mons[PM_SHADE]) {
hmd->dmg = 0;
} else {
/* note: 1..2 or 1..4 can be substantiallly increased by
/* note: 1..2 or 1..4 can be substantially increased by
strength bonus or skill bonus, usually both... */
hmd->dmg = rnd(!martial_bonus() ? 2 : 4);
hmd->use_weapon_skill = TRUE;
@@ -1393,8 +1393,8 @@ hmon_hitmon_dmg_recalc(struct _hitmon_data *hmd, struct obj *obj)
for dual attacks, 3/4 of the strength bonus is used; when
both attacks hit, overall bonus is 3/2 rather than doubled;
melee hit with two-handed weapon uses 3/2 strength bonus to
appoximately match double hit with two-weapon ('approximate'
becase udaminc skews in favor of two-weapon); the 3/2 factor
approximately match double hit with two-weapon ('approximate'
because udaminc skews in favor of two-weapon); the 3/2 factor
for two-handed strength does not apply to polearms unless
hero is simply bashing with one of those and does not apply
to jousting because lances are one-handed */
@@ -2813,7 +2813,7 @@ mhitm_ad_tlpt(
if (Half_physical_damage)
mhm->damage *= 2; /* doesn't actually increase damage;
* we only get here if half the
* original damage would would have
* original damage would have
* been fatal, so double reduced
* damage will be less than original */
if (mhm->damage < 1) { /* implies (tmphp <= 1) */
@@ -5308,7 +5308,7 @@ hmonas(struct monst *mon)
be Null, and we want to track that for passive() */
originalweapon = (altwep && uswapwep) ? &uswapwep : &uwep;
if (uswapwep /* set up 'altwep' flag for next iteration */
/* only consider seconary when wielding one-handed primary */
/* only consider secondary when wielding one-handed primary */
&& uwep && (uwep->oclass == WEAPON_CLASS || is_weptool(uwep))
&& !bimanual(uwep)
/* only switch if not wearing shield and not at artifact;
+1 -1
View File
@@ -314,7 +314,7 @@ glyph_find_core(const char *id, struct find_struct *findwhat)
actual comparison part by generating them once, ahead of the
bulk of the potential parsings. We can later free up
all the memory those names consumed once the bulk parsing is
overwith.
over with.
*/
+1 -1
View File
@@ -466,7 +466,7 @@ invault(void)
return;
}
if (Strangled || is_silent(gy.youmonst.data) || gm.multi < 0) {
/* [we ought to record whether this this message has already
/* [we ought to record whether this message has already
been given in order to vary it upon repeat visits, but
discarding the monster and its egd data renders that hard] */
if (Deaf) {
+1 -1
View File
@@ -407,7 +407,7 @@ check_version(
return TRUE;
}
/* this used to be based on file date and somewhat OS-dependant,
/* this used to be based on file date and somewhat OS-dependent,
but now examines the initial part of the file's contents */
boolean
uptodate(NHFILE *nhfp, const char *name, unsigned long utdflags)
+3 -3
View File
@@ -173,7 +173,7 @@ does_block(int x, int y, struct rm *lev)
if (obj->otyp == BOULDER)
return 1;
/* Mimics mimicing a door or boulder or ... block light. */
/* Mimics mimicking a door or boulder or ... block light. */
if ((mon = m_at(x, y)) && (!mon->minvis || See_invisible)
&& is_lightblocker_mappear(mon))
return 1;
@@ -797,7 +797,7 @@ vision_recalc(int control)
/*
* At this point we know that the row position is *not* in normal
* sight. That is, the position is could be seen, but is dark
* sight. That is, the position could be seen, but is dark
* or LOS is just plain blocked.
*
* Update the position if:
@@ -805,7 +805,7 @@ vision_recalc(int control)
* the glyph -- E.g. darken room spot, etc.
* o If we now could see the location (yet the location is not
* lit), but previously we couldn't see the location, or vice
* versa. Update the spot because there there may be an
* versa. Update the spot because there may be an
* infrared monster there.
*/
} else {
+1 -1
View File
@@ -1776,7 +1776,7 @@ adjust_menu_promptstyle(winid window, color_attr *style)
}
/*
* Common code point leading into the interface-specifc
* Common code point leading into the interface-specific
* add_menu() to allow single-spot adjustments to the parameters,
* such as those done by menu_colors.
*/
+1 -1
View File
@@ -610,7 +610,7 @@ nasty(struct monst *summoner)
* and 20 are neutral. [These numbers are up date for
* 3.7.0; the ones in the next paragraph are not....]
*
* Neutral caster, used for late-game harrassment,
* Neutral caster, used for late-game harassment,
* has 18/42 chance to stop the inner loop on each
* critter, 24/42 chance for another iteration.
* Lawful caster has 28/42 chance to stop unless the
+3 -3
View File
@@ -508,7 +508,7 @@ bhitm(struct monst *mtmp, struct obj *otmp)
if (mtmp->isshk && !*u.ushops)
hot_pursuit(mtmp);
} else if (M_AP_TYPE(mtmp))
seemimic(mtmp); /* might unblock if mimicing a boulder/door */
seemimic(mtmp); /* might unblock if mimicking a boulder/door */
}
/* note: gb.bhitpos won't be set if swallowed, but that's okay since
* reveal_invis will be false. We can't use mtmp->mx, my since it
@@ -4604,7 +4604,7 @@ dobuzz(
int spell_type;
int hdmgtype = Hallucination ? rn2(6) : damgtype;
/* if its a Hero Spell then get its SPE_TYPE */
/* if it's a Hero Spell then get its SPE_TYPE */
spell_type = is_hero_spell(type) ? SPE_MAGIC_MISSILE + damgtype : 0;
if (u.uswallow) {
@@ -6098,7 +6098,7 @@ makewish(void)
"made %s first artifact wish - %s", uhis(), wish);
else
livelog_printf((LL_WISH | maybe_LL_arti), "wished for %s", wish);
/* TODO? maybe generate a second event decribing what was received since
/* TODO? maybe generate a second event describing what was received since
those just echo player's request rather than show actual result */
const char *verb = ((Is_airlevel(&u.uz) || u.uinwater) ? "slip" : "drop"),