more spelling and inconsistency corrections; comments and elsewhere

This commit is contained in:
nhmall
2026-01-11 21:12:25 -05:00
parent 904e3ffe67
commit c62d76b776
17 changed files with 68 additions and 68 deletions
+8 -8
View File
@@ -100,7 +100,7 @@ staticfn void propagate_chain_lightning(struct chain_lightning_queue *,
* Fighters find body armour & shield a little less limiting. * Fighters find body armour & shield a little less limiting.
* Headgear, Gauntlets and Footwear are not role-specific (but * Headgear, Gauntlets and Footwear are not role-specific (but
* still have an effect, except helm of brilliance, which is designed * still have an effect, except helm of brilliance, which is designed
* to permit magic-use). * to permit magic use).
*/ */
#define uarmhbon 4 /* Metal helmets interfere with the mind */ #define uarmhbon 4 /* Metal helmets interfere with the mind */
@@ -191,7 +191,7 @@ confused_book(struct obj *spellbook)
boolean gone = FALSE; boolean gone = FALSE;
if (!rn2(3) && spellbook->otyp != SPE_BOOK_OF_THE_DEAD) { if (!rn2(3) && spellbook->otyp != SPE_BOOK_OF_THE_DEAD) {
spellbook->in_use = TRUE; /* in case called from learn */ spellbook->in_use = TRUE; /* in case called from learn() */
pline( pline(
"Being confused you have difficulties in controlling your actions."); "Being confused you have difficulties in controlling your actions.");
display_nhwindow(WIN_MESSAGE, FALSE); display_nhwindow(WIN_MESSAGE, FALSE);
@@ -225,7 +225,7 @@ deadbook_pacify_undead(struct monst *mtmp)
} }
} }
/* special effects for The Book of the Dead; reading it while blind is /* special effects for the Book of the Dead; reading it while blind is
allowed so that needs to be taken into account too */ allowed so that needs to be taken into account too */
staticfn void staticfn void
deadbook(struct obj *book2) deadbook(struct obj *book2)
@@ -2084,8 +2084,8 @@ dospellmenu(
* The correct spacing of the columns when not using * The correct spacing of the columns when not using
* tab separation depends on the following: * tab separation depends on the following:
* (1) that the font is monospaced, and * (1) that the font is monospaced, and
* (2) that selection letters are pre-pended to the * (2) that selection letters are prepended to the
* given string and are of the form "a - ". * given string and are of the form "a - ".
* For SPELLMENU_DUMP, (2) is untrue, so four spaces * For SPELLMENU_DUMP, (2) is untrue, so four spaces
* need to be subtracted. * need to be subtracted.
*/ */
@@ -2163,7 +2163,7 @@ staticfn int
percent_success(int spell) percent_success(int spell)
{ {
/* Intrinsic and learned ability are combined to calculate /* Intrinsic and learned ability are combined to calculate
* the probability of player's success at cast a given spell. * the probability of player's success at casting a given spell.
*/ */
int chance, splcaster, special, statused; int chance, splcaster, special, statused;
int difficulty; int difficulty;
@@ -2214,13 +2214,13 @@ percent_success(int spell)
/* Calculate learned ability */ /* Calculate learned ability */
/* Players basic likelihood of being able to cast any spell /* The player's basic likelihood of being able to cast any spell
* is based of their `magic' statistic. (Int or Wis) * is based of their `magic' statistic. (Int or Wis)
*/ */
chance = 11 * statused / 2; chance = 11 * statused / 2;
/* /*
* High level spells are harder. Easier for higher level casters. * High-level spells are harder. Easier for higher-level casters.
* The difficulty is based on the hero's level and their skill level * The difficulty is based on the hero's level and their skill level
* in that spell type. * in that spell type.
*/ */
+1 -1
View File
@@ -643,7 +643,7 @@ mpickobj(struct monst *mtmp, struct obj *otmp)
} }
/* don't want hidden light source inside the monster; assumes that /* don't want hidden light source inside the monster; assumes that
engulfers won't have external inventories; whirly monsters cause engulfers won't have external inventories; whirly monsters cause
the light to be extinguished rather than letting it shine thru */ the light to be extinguished rather than letting it shine through */
if (obj_sheds_light(otmp) && attacktype(mtmp->data, AT_ENGL)) { if (obj_sheds_light(otmp) && attacktype(mtmp->data, AT_ENGL)) {
/* this is probably a burning object that you dropped or threw */ /* this is probably a burning object that you dropped or threw */
if (engulfing_u(mtmp) && !Blind) if (engulfing_u(mtmp) && !Blind)
+2 -2
View File
@@ -213,8 +213,8 @@ mount_steed(
pline("Maybe you should find a designated driver."); pline("Maybe you should find a designated driver.");
return (FALSE); return (FALSE);
} }
/* While riding Wounded_legs refers to the steed's, /* While riding, Wounded_legs refers to the steed's
* not the hero's legs. * legs, not the hero's legs.
* That opens up a potential abuse where the player * That opens up a potential abuse where the player
* can mount a steed, then dismount immediately to * can mount a steed, then dismount immediately to
* heal leg damage, because leg damage is always * heal leg damage, because leg damage is always
+2 -2
View File
@@ -462,7 +462,7 @@ teleds(coordxy nux, coordxy nuy, int teleds_flags)
* otherwise they are teleporting, so unplacebc(). * otherwise they are teleporting, so unplacebc().
* If they don't have to move the ball, then always "drag" whether or * If they don't have to move the ball, then always "drag" whether or
* not allow_drag is true, because we are calling that function, not * not allow_drag is true, because we are calling that function, not
* to drag, but to move the chain. *However* there are some dumb * to drag, but to move the chain. *However*, there are some dumb
* special cases: * special cases:
* 0 0 * 0 0
* _X move east -----> X_ * _X move east -----> X_
@@ -1353,7 +1353,7 @@ level_tele(void)
d_level lsav; d_level lsav;
/* set specific death location; this also suppresses bones */ /* set specific death location; this also suppresses bones */
lsav = u.uz; /* save current level, see below */ lsav = u.uz; /* save current level; see below */
u.uz.dnum = 0; /* main dungeon */ u.uz.dnum = 0; /* main dungeon */
u.uz.dlevel = (newlev <= -10) ? -10 : 0; /* heaven or surface */ u.uz.dlevel = (newlev <= -10) ? -10 : 0; /* heaven or surface */
done(DIED); done(DIED);
+8 -8
View File
@@ -1078,7 +1078,7 @@ hatch_egg(anything *arg, long timeout)
* mind are: * mind are:
* + Create the hatched monster then place it on the migrating * + Create the hatched monster then place it on the migrating
* mons list. This is tough because all makemon() is made * mons list. This is tough because all makemon() is made
* to place the monster as well. Makemon() also doesn't lend * to place the monster as well. Makemon() also doesn't lend
* itself well to splitting off a "not yet placed" subroutine. * itself well to splitting off a "not yet placed" subroutine.
* + Mark the egg as hatched, then place the monster when we * + Mark the egg as hatched, then place the monster when we
* place the migrating objects. * place the migrating objects.
@@ -1232,7 +1232,7 @@ slip_or_trip(void)
if (otmp && on_foot) { /* trip over something in particular */ if (otmp && on_foot) { /* trip over something in particular */
/* /*
If there is only one item, it will have just been named If there is only one item, it will have just been named
during the move, so refer to by via pronoun; otherwise, during the move, so refer to it by pronoun; otherwise,
if the top item has been or can be seen, refer to it by if the top item has been or can be seen, refer to it by
name; if not, look for rocks to trip over; trip over name; if not, look for rocks to trip over; trip over
anonymous "something" if there aren't any rocks. anonymous "something" if there aren't any rocks.
@@ -1532,7 +1532,7 @@ burn_object(anything *arg, long timeout)
default: default:
/* /*
* Someone added fuel to the lamp while it was * Someone added fuel to the lamp while it was
* lit. Just fall through and let begin burn * lit. Just fall through and let begin_burn()
* handle the new age. * handle the new age.
*/ */
break; break;
@@ -1659,7 +1659,7 @@ burn_object(anything *arg, long timeout)
default: default:
/* /*
* Someone added fuel (candles) to the menorah while * Someone added fuel (candles) to the menorah while
* it was lit. Just fall through and let begin burn * it was lit. Just fall through and let begin_burn()
* handle the new age. * handle the new age.
*/ */
break; break;
@@ -1875,7 +1875,7 @@ do_storms(void)
} }
if (levl[u.ux][u.uy].typ == CLOUD) { if (levl[u.ux][u.uy].typ == CLOUD) {
/* Inside a cloud during a thunder storm is deafening. */ /* Inside a cloud during a thunderstorm is deafening. */
/* Even if already deaf, we sense the thunder's vibrations. */ /* Even if already deaf, we sense the thunder's vibrations. */
Soundeffect(se_kaboom_boom_boom, 80); Soundeffect(se_kaboom_boom_boom, 80);
pline("Kaboom!!! Boom!! Boom!!"); pline("Kaboom!!! Boom!! Boom!!");
@@ -1925,7 +1925,7 @@ do_storms(void)
* Save all timers of range 'range'. Range is either global * Save all timers of range 'range'. Range is either global
* or local. Global timers follow game play, local timers * or local. Global timers follow game play, local timers
* are saved with a level. Object and monster timers are * are saved with a level. Object and monster timers are
* saved using their respective id's instead of pointers. * saved using their respective ids instead of pointers.
* *
* void restore_timers(NHFILE *, int range, long adjust) * void restore_timers(NHFILE *, int range, long adjust)
* Restore timers of range 'range'. If from a ghost pile, * Restore timers of range 'range'. If from a ghost pile,
@@ -2217,7 +2217,7 @@ run_timers(void)
/* /*
* Always use the first element. Elements may be added or deleted at * Always use the first element. Elements may be added or deleted at
* any time. The list is ordered, we are done when the first element * any time. The list is ordered; we are done when the first element
* is in the future. * is in the future.
*/ */
while (gt.timer_base && gt.timer_base->timeout <= svm.moves) { while (gt.timer_base && gt.timer_base->timeout <= svm.moves) {
@@ -2653,7 +2653,7 @@ maybe_write_timer(NHFILE *nhfp, int range, boolean write_it)
* + timeouts that follow obj & monst that are migrating * + timeouts that follow obj & monst that are migrating
* *
* Level range: * Level range:
* + timeouts that are level specific (e.g. storms) * + timeouts that are level-specific (e.g. storms)
* + timeouts that stay with the level (obj & monst) * + timeouts that stay with the level (obj & monst)
*/ */
void void
+1 -1
View File
@@ -16,7 +16,7 @@
/* /*
* Updating in place can leave junk at the end of the file in some * Updating in place can leave junk at the end of the file in some
* circumstances (if it shrinks and the O.S. doesn't have a straightforward * circumstances (if it shrinks and the OS doesn't have a straightforward
* way to truncate it). The trailing junk is harmless and the code * way to truncate it). The trailing junk is harmless and the code
* which reads the scores will ignore it. * which reads the scores will ignore it.
*/ */
+6 -5
View File
@@ -548,7 +548,7 @@ maketrap(coordxy x, coordxy y, int typ)
/* /*
* some cases which can happen when digging * some cases which can happen when digging
* down while phazing thru solid areas * down while phasing thru solid areas
*/ */
} else if (lev->typ == STONE || lev->typ == SCORR) { } else if (lev->typ == STONE || lev->typ == SCORR) {
(void) set_levltyp(x, y, CORR); (void) set_levltyp(x, y, CORR);
@@ -2125,7 +2125,7 @@ trapeffect_web(
/* time will be adjusted below */ /* time will be adjusted below */
set_utrap(1, TT_WEB); set_utrap(1, TT_WEB);
/* Time stuck in the web depends on your/steed strength. */ /* Time stuck in the web depends on your/steed's strength. */
{ {
int tim, str = ACURR(A_STR); int tim, str = ACURR(A_STR);
@@ -2491,8 +2491,8 @@ trapeffect_landmine(
already_seen ? " land mine" : "it"); already_seen ? " land mine" : "it");
} else { } else {
/* prevent landmine from killing steed, throwing you to /* prevent landmine from killing steed, throwing you to
* the ground, and you being affected again by the same * the ground, and then that same landmine affecting you
* mine because it hasn't been deleted yet * again because it hasn't been deleted yet
*/ */
static boolean recursive_mine = FALSE; static boolean recursive_mine = FALSE;
@@ -3228,7 +3228,8 @@ launch_obj(
newsym(x1, y1); newsym(x1, y1);
/* in case you're using a pick-axe to chop the boulder that's being /* in case you're using a pick-axe to chop the boulder that's being
launched (perhaps a monster triggered it), destroy context so that launched (perhaps a monster triggered it), destroy context so that
next dig attempt never thinks you're resuming previous effort */ the next dig attempt never thinks that you're resuming
the previous effort */
if ((otyp == BOULDER || otyp == STATUE) if ((otyp == BOULDER || otyp == STATUE)
&& singleobj->ox == svc.context.digging.pos.x && singleobj->ox == svc.context.digging.pos.x
&& singleobj->oy == svc.context.digging.pos.y) && singleobj->oy == svc.context.digging.pos.y)
+3 -3
View File
@@ -1012,7 +1012,7 @@ u_init_misc(void)
/* /*
* For now, everyone starts out with a night vision range of 1 and * For now, everyone starts out with a night vision range of 1 and
* their xray range disabled. * their xray_range disabled.
*/ */
u.nv_range = 1; u.nv_range = 1;
u.xray_range = -1; u.xray_range = -1;
@@ -1314,8 +1314,8 @@ ini_inv(const struct trobj *trop)
} else { /* UNDEF_TYP */ } else { /* UNDEF_TYP */
obj = ini_inv_mkobj_filter(trop->trclass, got_sp1); obj = ini_inv_mkobj_filter(trop->trclass, got_sp1);
otyp = obj->otyp; otyp = obj->otyp;
/* Heavily relies on the fact that 1) we create wands /* Heavily relies on the facts that 1) we create wands
* before rings, 2) that we create rings before * before rings, that 2) we create rings before
* spellbooks, and that 3) not more than 1 object of a * spellbooks, and that 3) not more than 1 object of a
* particular symbol is to be prohibited. (For more * particular symbol is to be prohibited. (For more
* objects, we need more nocreate variables...) * objects, we need more nocreate variables...)
+3 -3
View File
@@ -198,7 +198,7 @@ attack_checks(
return FALSE; return FALSE;
if (svc.context.forcefight) { if (svc.context.forcefight) {
/* Do this in the caller, after we checked that the monster /* Do this in the caller, after we have checked that the monster
* didn't die from the blow. Reason: putting the 'I' there * didn't die from the blow. Reason: putting the 'I' there
* causes the hero to forget the square's contents since * causes the hero to forget the square's contents since
* both 'I' and remembered contents are stored in .glyph. * both 'I' and remembered contents are stored in .glyph.
@@ -1027,7 +1027,7 @@ hmon_hitmon_weapon_melee(
&& (is_ammo(obj) || is_missile(obj))) { && (is_ammo(obj) || is_missile(obj))) {
if (ammo_and_launcher(obj, uwep)) { if (ammo_and_launcher(obj, uwep)) {
/* elves and samurai do extra damage using their own /* elves and samurai do extra damage using their own
bows with own arrows; they're highly trained */ bows with their own arrows; they're highly trained */
if (Role_if(PM_SAMURAI) && obj->otyp == YA if (Role_if(PM_SAMURAI) && obj->otyp == YA
&& uwep->otyp == YUMI) && uwep->otyp == YUMI)
hmd->dmg++; hmd->dmg++;
@@ -1823,7 +1823,7 @@ hmon_hitmon(
mon->mhp -= hmd.dmg; mon->mhp -= hmd.dmg;
} }
/* adjustments might have made tmp become less than what /* adjustments might have made tmp become less than what
a level draining artifact has already done to max HP */ a level-draining artifact has already done to max HP */
if (mon->mhp > mon->mhpmax) if (mon->mhp > mon->mhpmax)
mon->mhp = mon->mhpmax; mon->mhp = mon->mhpmax;
if (mon->mx == 0) { if (mon->mx == 0) {
+7 -8
View File
@@ -399,7 +399,7 @@ staticfn int new_angle(struct rm *, unsigned char *, int, int);
* this is good enough. * this is good enough.
* *
* + When this function is called we don't have all of the seen * + When this function is called we don't have all of the seen
* information (we're doing a top down scan in vision_recalc). * information (we're doing a top-down scan in vision_recalc).
* We would need to scan once to set all IN_SIGHT and COULD_SEE * We would need to scan once to set all IN_SIGHT and COULD_SEE
* bits, then again to correctly set the seenv bits. * bits, then again to correctly set the seenv bits.
* + I'm trying to make this as cheap as possible. The display * + I'm trying to make this as cheap as possible. The display
@@ -561,7 +561,7 @@ vision_recalc(int control)
/* /*
* Our own version of the update loop below. We know we can't see * Our own version of the update loop below. We know we can't see
* anything, so we only need update positions we used to be able * anything, so we only need to update positions we used to be able
* to see. * to see.
*/ */
temp_array = gv.viz_array; /* set gv.viz_array so newsym() will work */ temp_array = gv.viz_array; /* set gv.viz_array so newsym() will work */
@@ -588,7 +588,7 @@ vision_recalc(int control)
if (Underwater && !Is_waterlevel(&u.uz)) { if (Underwater && !Is_waterlevel(&u.uz)) {
/* /*
* The hero is under water. Only see surrounding locations if * The hero is underwater. Only see surrounding locations if
* they are also underwater. This overrides night vision but * they are also underwater. This overrides night vision but
* does not override x-ray vision. * does not override x-ray vision.
*/ */
@@ -714,7 +714,7 @@ vision_recalc(int control)
* + Set the IN_SIGHT bit for places that we could see and are lit. * + Set the IN_SIGHT bit for places that we could see and are lit.
* + Reset changed places. * + Reset changed places.
* *
* There is one thing that make deciding what the hero can see * There is one thing that makes deciding what the hero can see
* difficult: * difficult:
* *
* 1. Directional lighting. Items that block light create problems. * 1. Directional lighting. Items that block light create problems.
@@ -761,10 +761,9 @@ vision_recalc(int control)
|| IS_WALL(lev->typ)) && !viz_clear[row][col]) { || IS_WALL(lev->typ)) && !viz_clear[row][col]) {
/* /*
* Make sure doors, walls, boulders or mimics don't show * Make sure doors, walls, boulders or mimics don't show
* up * up at the end of dark hallways. We do this by checking
* at the end of dark hallways. We do this by checking
* the adjacent position. If it is lit, then we can see * the adjacent position. If it is lit, then we can see
* the door or wall, otherwise we can't. * the door or wall; otherwise we can't.
*/ */
dx = u.ux - col; dx = u.ux - col;
dx = sign(dx); dx = sign(dx);
@@ -1786,7 +1785,7 @@ right_side(
* *
* Otherwise, we know we can see the right edge of the current row. * Otherwise, we know we can see the right edge of the current row.
* *
* This must be a strict less than so that we can always see a * This must be a strict "less than" so that we can always see a
* horizontal wall, even if it is adjacent to us. * horizontal wall, even if it is adjacent to us.
*/ */
if (right_mark < right_edge) { if (right_mark < right_edge) {
+3 -3
View File
@@ -155,7 +155,7 @@ hitval(struct obj *otmp, struct monst *mon)
if (Is_weapon) if (Is_weapon)
tmp += otmp->spe; tmp += otmp->spe;
/* Put weapon specific "to hit" bonuses in below: */ /* Put weapon-specific "to hit" bonuses in below: */
tmp += objects[otmp->otyp].oc_hitbon; tmp += objects[otmp->otyp].oc_hitbon;
/* Put weapon vs. monster type "to hit" bonuses in below: */ /* Put weapon vs. monster type "to hit" bonuses in below: */
@@ -302,7 +302,7 @@ dmgval(struct obj *otmp, struct monst *mon)
} }
if (objects[otyp].oc_material <= LEATHER && thick_skinned(ptr)) if (objects[otyp].oc_material <= LEATHER && thick_skinned(ptr))
/* thick skinned/scaled creatures don't feel it */ /* thick-skinned or scaled creatures don't feel it */
tmp = 0; tmp = 0;
if (ptr == &mons[PM_SHADE] && !shade_glare(otmp)) if (ptr == &mons[PM_SHADE] && !shade_glare(otmp))
tmp = 0; tmp = 0;
@@ -1387,7 +1387,7 @@ enhance_weapon_skill(void)
n = selected[0].item.a_int - 1; /* get item selected */ n = selected[0].item.a_int - 1; /* get item selected */
free((genericptr_t) selected); free((genericptr_t) selected);
skill_advance(n); skill_advance(n);
/* check for more skills able to advance, if so then .. */ /* check for more skills able to advance; if so, then... */
for (n = i = 0; i < P_NUM_SKILLS; i++) { for (n = i = 0; i < P_NUM_SKILLS; i++) {
if (can_advance(i, speedy)) { if (can_advance(i, speedy)) {
if (!speedy) if (!speedy)
+2 -2
View File
@@ -86,7 +86,7 @@ static const char
* 1. Initializing the slot during character generation or a * 1. Initializing the slot during character generation or a
* restore. * restore.
* 2. Setting the slot due to a player's actions. * 2. Setting the slot due to a player's actions.
* 3. If one of the objects in the slot are split off, these * 3. If one of the objects in the slot is split off, these
* functions can be used to put the remainder back in the slot. * functions can be used to put the remainder back in the slot.
* 4. Putting an item that was thrown and returned back into the slot. * 4. Putting an item that was thrown and returned back into the slot.
* 5. Emptying the slot, by passing a null object. NEVER pass * 5. Emptying the slot, by passing a null object. NEVER pass
@@ -1021,7 +1021,7 @@ chwepon(struct obj *otmp, int amount)
/* /*
* Enchantment, which normally improves a weapon, has an * Enchantment, which normally improves a weapon, has an
* addition adverse reaction on Magicbane whose effects are * additional adverse reaction on Magicbane whose effects are
* spe dependent. Give an obscure clue here. * spe dependent. Give an obscure clue here.
*/ */
if (u_wield_art(ART_MAGICBANE) && uwep->spe >= 0) { if (u_wield_art(ART_MAGICBANE) && uwep->spe >= 0) {
+3 -3
View File
@@ -631,7 +631,7 @@ nasty(struct monst *summoner)
* randomized so it won't always do so. * randomized so it won't always do so.
*/ */
for (j = 0; j < 20; j++) { for (j = 0; j < 20; j++) {
/* Don't create more spellcasters of the monsters' level or /* Don't create more spellcasters of the monster's level or
* higher--avoids chain summoners filling up the level. * higher--avoids chain summoners filling up the level.
*/ */
trylimit = 10 + 1; /* 10 tries */ trylimit = 10 + 1; /* 10 tries */
@@ -704,7 +704,7 @@ nasty(struct monst *summoner)
return count; return count;
} }
/* Let's resurrect the wizard, for some unexpected fun. */ /* Let's resurrect the Wizard, for some unexpected fun. */
void void
resurrect(void) resurrect(void)
{ {
@@ -744,7 +744,7 @@ resurrect(void)
if (!mtmp->mx) if (!mtmp->mx)
mtmp = 0; mtmp = 0;
/* note: there might be a second Wizard; if so, /* note: there might be a second Wizard; if so,
he'll have to wait til the next resurrection */ he'll have to wait until the next resurrection */
break; break;
} }
} }
+8 -8
View File
@@ -31,7 +31,7 @@ staticfn struct wseg *create_worm_tail(int); /* may return NULL */
* If wormno == 0 this does not mean that the monster is not a worm, * If wormno == 0 this does not mean that the monster is not a worm,
* it just means that the monster does not have a long worm tail. * it just means that the monster does not have a long worm tail.
* *
* The actual segments of a worm are not full blown monst structs. * The actual segments of a worm are not full0blown monst structs.
* They are small wseg structs, and their position in the levels.monsters[][] * They are small wseg structs, and their position in the levels.monsters[][]
* array is held by the monst struct of the head of the worm. This makes * array is held by the monst struct of the head of the worm. This makes
* things like probing and hit point bookkeeping much easier. * things like probing and hit point bookkeeping much easier.
@@ -46,7 +46,7 @@ staticfn struct wseg *create_worm_tail(int); /* may return NULL */
* wheads: The last (end) of a linked list of segments. This points to * wheads: The last (end) of a linked list of segments. This points to
* the segment that is at the same position as the real monster * the segment that is at the same position as the real monster
* (the head). Note that the segment that wheads[wormno] points * (the head). Note that the segment that wheads[wormno] points
* to, is not displayed. It is simply there to keep track of * to is not displayed. It is simply there to keep track of
* where the head came from, so that worm movement and display * where the head came from, so that worm movement and display
* are simplified later. * are simplified later.
* Keeping the head segment of the worm at the end of the list * Keeping the head segment of the worm at the end of the list
@@ -113,8 +113,8 @@ get_wormno(void)
* Initialize the worm entry. This will set up the worm grow time, and * Initialize the worm entry. This will set up the worm grow time, and
* create and initialize the dummy segment for wheads[] and wtails[]. * create and initialize the dummy segment for wheads[] and wtails[].
* *
* If the worm has no tail (ie get_wormno() fails) then this function need * If the worm has no tail (ie get_wormno() fails) then this function
* not be called. * need not be called.
*/ */
void void
initworm(struct monst *worm, int wseg_count) initworm(struct monst *worm, int wseg_count)
@@ -282,7 +282,7 @@ worm_move(struct monst *worm)
* *
* Check for mon->wormno before calling this function! * Check for mon->wormno before calling this function!
* *
* The worm don't move so it should shrink. * The worm doesn't move, so it should shrink.
*/ */
void void
worm_nomove(struct monst *worm) worm_nomove(struct monst *worm)
@@ -379,7 +379,7 @@ cutworm(struct monst *worm, coordxy x, coordxy y,
int cut_chance, new_wnum; int cut_chance, new_wnum;
if (!wnum) if (!wnum)
return; /* bullet proofing */ return; /* bullet-proofing */
if (x == worm->mx && y == worm->my) if (x == worm->mx && y == worm->my)
return; /* hit on head */ return; /* hit on head */
@@ -420,7 +420,7 @@ cutworm(struct monst *worm, coordxy x, coordxy y,
/* /*
* At this point, the old worm is correct. Any new worm will have * At this point, the old worm is correct. Any new worm will have
* it's head at "curr" and its tail at "new_tail". The old worm * its head at "curr" and its tail at "new_tail". The old worm
* must be at least level 3 in order to produce a new worm. * must be at least level 3 in order to produce a new worm.
*/ */
new_worm = 0; new_worm = 0;
@@ -804,7 +804,7 @@ random_dir(int x, int y, int *nx, int *ny)
{ {
*nx = x + (x > 1 /* extreme left ? */ *nx = x + (x > 1 /* extreme left ? */
? (x < COLNO - 1 /* extreme right ? */ ? (x < COLNO - 1 /* extreme right ? */
? (rn2(3) - 1) /* neither so +1, 0, or -1 */ ? (rn2(3) - 1) /* neither, so +1, 0, or -1 */
: -rn2(2)) /* right edge, use -1 or 0 */ : -rn2(2)) /* right edge, use -1 or 0 */
: rn2(2)); /* left edge, use 0 or 1 */ : rn2(2)); /* left edge, use 0 or 1 */
if (*nx != x) /* if x has changed, do same thing with y */ if (*nx != x) /* if x has changed, do same thing with y */
+2 -2
View File
@@ -487,7 +487,7 @@ mon_adjust_speed(
switch (adjust) { switch (adjust) {
case 2: case 2:
mon->permspeed = MFAST; mon->permspeed = MFAST;
give_msg = FALSE; /* special case monster creation */ give_msg = FALSE; /* special-case monster creation */
break; break;
case 1: case 1:
if (mon->permspeed == MSLOW) if (mon->permspeed == MSLOW)
@@ -980,7 +980,7 @@ m_dowear_type(
} }
} }
update_mon_extrinsics(mon, best, TRUE, creation); update_mon_extrinsics(mon, best, TRUE, creation);
/* if couldn't see it but now can, or vice versa, */ /* if couldn't see it but now can, or vice versa */
if (!creation && (sawmon ^ canseemon(mon))) { if (!creation && (sawmon ^ canseemon(mon))) {
if (mon->minvis && !See_invisible) { if (mon->minvis && !See_invisible) {
pline("Suddenly you cannot see %s.", nambuf); pline("Suddenly you cannot see %s.", nambuf);
+2 -2
View File
@@ -8,7 +8,7 @@ staticfn int write_ok(struct obj *) NO_NNARGS;
staticfn char *new_book_description(int, char *) NONNULL NONNULLPTRS; staticfn char *new_book_description(int, char *) NONNULL NONNULLPTRS;
/* /*
* returns basecost of a scroll or a spellbook * returns base cost of a scroll or a spellbook
*/ */
staticfn int staticfn int
cost(struct obj *otmp) cost(struct obj *otmp)
@@ -351,7 +351,7 @@ dowrite(struct obj *pen)
return ECMD_TIME; return ECMD_TIME;
} }
/* useup old scroll / spellbook */ /* use up old scroll / spellbook */
useup(paper); useup(paper);
/* success */ /* success */
+7 -7
View File
@@ -1643,7 +1643,7 @@ do_osshock(struct obj *obj)
go.obj_zapped = TRUE; go.obj_zapped = TRUE;
if (gp.poly_zapped < 0) { if (gp.poly_zapped < 0) {
/* some may metamorphosize */ /* some may metamorphose */
for (i = obj->quan; i; i--) for (i = obj->quan; i; i--)
if (!rn2(Luck + 45)) { if (!rn2(Luck + 45)) {
gp.poly_zapped = objects[obj->otyp].oc_material; gp.poly_zapped = objects[obj->otyp].oc_material;
@@ -1714,7 +1714,7 @@ poly_obj(struct obj *obj, int id)
if (obj->otyp == UNICORN_HORN && obj->degraded_horn) if (obj->otyp == UNICORN_HORN && obj->degraded_horn)
magic_obj = 0; magic_obj = 0;
/* Try up to 3 times to make the magic-or-not status of /* Try up to 3 times to make the magic-or-not status of
the new item be the same as it was for the old one. */ the new item the same as the old item. */
otmp = (struct obj *) 0; otmp = (struct obj *) 0;
do { do {
if (otmp) if (otmp)
@@ -1736,7 +1736,7 @@ poly_obj(struct obj *obj, int id)
/* preserve quantity */ /* preserve quantity */
otmp->quan = obj->quan; otmp->quan = obj->quan;
/* preserve the shopkeepers (lack of) interest */ /* preserve the shopkeeper's (lack of) interest */
otmp->no_charge = obj->no_charge; otmp->no_charge = obj->no_charge;
/* preserve inventory letter if in inventory */ /* preserve inventory letter if in inventory */
if (obj_location == OBJ_INVENT) if (obj_location == OBJ_INVENT)
@@ -2005,7 +2005,7 @@ stone_to_flesh_obj(struct obj *obj) /* nonnull */
return 0; return 0;
(void) get_obj_location(obj, &oox, &ooy, 0); (void) get_obj_location(obj, &oox, &ooy, 0);
/* add more if stone objects are added.. */ /* add more if stone objects are added... */
switch (objects[obj->otyp].oc_class) { switch (objects[obj->otyp].oc_class) {
case ROCK_CLASS: /* boulders and statues */ case ROCK_CLASS: /* boulders and statues */
case TOOL_CLASS: /* figurines */ case TOOL_CLASS: /* figurines */
@@ -3490,7 +3490,7 @@ spell_damage_bonus(
} }
/* /*
* Generate the to hit bonus for a spell. Based on the hero's skill in * Generate the to-hit bonus for a spell. Based on the hero's skill in
* spell class and dexterity. * spell class and dexterity.
*/ */
staticfn int staticfn int
@@ -3986,7 +3986,7 @@ bhit(
through instead of stop so we call flash_hits_mon() through instead of stop so we call flash_hits_mon()
directly rather than returning mtmp back to caller. directly rather than returning mtmp back to caller.
That allows the flash to keep on going. Note that we That allows the flash to keep on going. Note that we
use mtmp->minvis not canspotmon() because it makes no use mtmp->minvis, not canspotmon(), because it makes no
difference whether hero can see the monster or not. */ difference whether hero can see the monster or not. */
if (mtmp->minvis) { if (mtmp->minvis) {
obj->ox = u.ux, obj->oy = u.uy; obj->ox = u.ux, obj->oy = u.uy;
@@ -4731,7 +4731,7 @@ dobuzz(
int spell_type; int spell_type;
int hdmgtype = Hallucination ? rn2(6) : damgtype; int hdmgtype = Hallucination ? rn2(6) : damgtype;
/* if it's 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; spell_type = is_hero_spell(type) ? SPE_MAGIC_MISSILE + damgtype : 0;
if (u.uswallow) { if (u.uswallow) {