some reformatting (2 of 4)
This commit is contained in:
@@ -2195,7 +2195,7 @@ handler_rebind_keys_add(boolean keyfirst)
|
|||||||
ec = &extcmdlist[i-1];
|
ec = &extcmdlist[i-1];
|
||||||
cmdstr = ec->ef_txt;
|
cmdstr = ec->ef_txt;
|
||||||
}
|
}
|
||||||
bindit:
|
bindit:
|
||||||
if (!key) {
|
if (!key) {
|
||||||
pline("Bind which key? ");
|
pline("Bind which key? ");
|
||||||
key = pgetchar();
|
key = pgetchar();
|
||||||
@@ -2229,8 +2229,7 @@ handler_rebind_keys(void)
|
|||||||
menu_item *picks = (menu_item *) 0;
|
menu_item *picks = (menu_item *) 0;
|
||||||
int clr = NO_COLOR;
|
int clr = NO_COLOR;
|
||||||
|
|
||||||
redo_rebind:
|
redo_rebind:
|
||||||
|
|
||||||
win = create_nhwindow(NHW_MENU);
|
win = create_nhwindow(NHW_MENU);
|
||||||
start_menu(win, MENU_BEHAVE_STANDARD);
|
start_menu(win, MENU_BEHAVE_STANDARD);
|
||||||
any = cg.zeroany;
|
any = cg.zeroany;
|
||||||
|
|||||||
@@ -1201,7 +1201,8 @@ dodown(void)
|
|||||||
return ECMD_TIME;
|
return ECMD_TIME;
|
||||||
} else if (!trap || !is_hole(trap->ttyp)
|
} else if (!trap || !is_hole(trap->ttyp)
|
||||||
|| !Can_fall_thru(&u.uz) || !trap->tseen) {
|
|| !Can_fall_thru(&u.uz) || !trap->tseen) {
|
||||||
if (flags.autodig && !svc.context.nopick && uwep && is_pick(uwep)) {
|
if (flags.autodig && !svc.context.nopick
|
||||||
|
&& uwep && is_pick(uwep)) {
|
||||||
return use_pick_axe2(uwep);
|
return use_pick_axe2(uwep);
|
||||||
} else {
|
} else {
|
||||||
You_cant("go down here%s.",
|
You_cant("go down here%s.",
|
||||||
@@ -1532,7 +1533,7 @@ goto_level(
|
|||||||
that drops faster, on average, when being sent down farther so
|
that drops faster, on average, when being sent down farther so
|
||||||
while the impact is reduced for everybody compared to earlier
|
while the impact is reduced for everybody compared to earlier
|
||||||
versions, it is reduced least for chaotics, most for lawfuls */
|
versions, it is reduced least for chaotics, most for lawfuls */
|
||||||
svc.context.mysteryforce += rn2(diff + 2); /* L:0-4, N:0-3, C:0-2 */
|
svc.context.mysteryforce += rn2(diff + 2); /* L:0-4,N:0-3,C:0-2 */
|
||||||
|
|
||||||
if (on_level(newlevel, &u.uz)) {
|
if (on_level(newlevel, &u.uz)) {
|
||||||
(void) safe_teleds(TELEDS_NO_FLAGS);
|
(void) safe_teleds(TELEDS_NO_FLAGS);
|
||||||
@@ -1989,7 +1990,8 @@ temperature_change_msg(schar prev_temperature)
|
|||||||
void
|
void
|
||||||
maybe_lvltport_feedback(void)
|
maybe_lvltport_feedback(void)
|
||||||
{
|
{
|
||||||
if (gd.dfr_post_msg && !strncmpi(gd.dfr_post_msg, "You materialize", 15)) {
|
if (gd.dfr_post_msg
|
||||||
|
&& !strncmpi(gd.dfr_post_msg, "You materialize", 15)) {
|
||||||
/* "You materialize on a different level." */
|
/* "You materialize on a different level." */
|
||||||
pline("%s", gd.dfr_post_msg);
|
pline("%s", gd.dfr_post_msg);
|
||||||
free((genericptr_t) gd.dfr_post_msg), gd.dfr_post_msg = 0;
|
free((genericptr_t) gd.dfr_post_msg), gd.dfr_post_msg = 0;
|
||||||
@@ -2011,8 +2013,10 @@ final_level(void)
|
|||||||
|
|
||||||
/* change levels at the end of this turn, after monsters finish moving */
|
/* change levels at the end of this turn, after monsters finish moving */
|
||||||
void
|
void
|
||||||
schedule_goto(d_level *tolev, int utotype_flags,
|
schedule_goto(
|
||||||
const char *pre_msg, const char *post_msg)
|
d_level *tolev,
|
||||||
|
int utotype_flags,
|
||||||
|
const char *pre_msg, const char *post_msg)
|
||||||
{
|
{
|
||||||
/* UTOTYPE_DEFERRED is used, so UTOTYPE_NONE can trigger deferred_goto() */
|
/* UTOTYPE_DEFERRED is used, so UTOTYPE_NONE can trigger deferred_goto() */
|
||||||
u.utotype = utotype_flags | UTOTYPE_DEFERRED;
|
u.utotype = utotype_flags | UTOTYPE_DEFERRED;
|
||||||
@@ -2096,9 +2100,9 @@ revive_corpse(struct obj *corpse)
|
|||||||
struct monst *mtmp2;
|
struct monst *mtmp2;
|
||||||
|
|
||||||
container = corpse->ocontainer;
|
container = corpse->ocontainer;
|
||||||
mtmp2 = get_container_location(container, &container_where, (int *) 0);
|
mtmp2 = get_container_location(container, &container_where,
|
||||||
/* container_where is the outermost container's location even if
|
(int *) 0);
|
||||||
* nested */
|
/* container_where is outermost container's location even if nested */
|
||||||
if (container_where == OBJ_MINVENT && mtmp2)
|
if (container_where == OBJ_MINVENT && mtmp2)
|
||||||
mcarry = mtmp2;
|
mcarry = mtmp2;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -225,9 +225,12 @@ makedog(void)
|
|||||||
if (!svc.context.startingpet_mid) {
|
if (!svc.context.startingpet_mid) {
|
||||||
svc.context.startingpet_mid = mtmp->m_id;
|
svc.context.startingpet_mid = mtmp->m_id;
|
||||||
if (!u.uroleplay.pauper) {
|
if (!u.uroleplay.pauper) {
|
||||||
/* initial horses already wear a saddle (unless hero is a pauper) */
|
/* initial horses already wear saddle (unless hero is a pauper) */
|
||||||
if (pettype == PM_PONY && !!(otmp = mksobj(SADDLE, TRUE, FALSE))) {
|
if (pettype == PM_PONY
|
||||||
otmp->dknown = otmp->bknown = otmp->rknown = 1;
|
&& (otmp = mksobj(SADDLE, TRUE, FALSE)) != 0) {
|
||||||
|
/* pseudo initial inventory; saddle is not actually in hero's
|
||||||
|
* invent so assume that update_inventory() isn't needed */
|
||||||
|
fully_identify_obj(otmp);
|
||||||
put_saddle_on_mon(otmp, mtmp);
|
put_saddle_on_mon(otmp, mtmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-2
@@ -317,7 +317,8 @@ dog_eat(struct monst *mtmp,
|
|||||||
oprice = unpaid_cost(obj, COST_CONTENTS);
|
oprice = unpaid_cost(obj, COST_CONTENTS);
|
||||||
pline("That %s will cost you %ld %s.", objnambuf, oprice,
|
pline("That %s will cost you %ld %s.", objnambuf, oprice,
|
||||||
currency(oprice));
|
currency(oprice));
|
||||||
/* m_consume_obj->delobj->obfree will handle actual shop billing update */
|
/* m_consume_obj -> delobj -> obfree will actual handle shop
|
||||||
|
billing update */
|
||||||
}
|
}
|
||||||
m_consume_obj(mtmp, obj);
|
m_consume_obj(mtmp, obj);
|
||||||
}
|
}
|
||||||
@@ -1338,7 +1339,10 @@ could_reach_item(struct monst *mon, coordxy nx, coordxy ny)
|
|||||||
* calls deep.
|
* calls deep.
|
||||||
*/
|
*/
|
||||||
staticfn boolean
|
staticfn boolean
|
||||||
can_reach_location(struct monst *mon, coordxy mx, coordxy my, coordxy fx, coordxy fy)
|
can_reach_location(
|
||||||
|
struct monst *mon,
|
||||||
|
coordxy mx, coordxy my,
|
||||||
|
coordxy fx, coordxy fy)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
int dist;
|
int dist;
|
||||||
|
|||||||
+7
-4
@@ -200,7 +200,8 @@ kick_monster(struct monst *mon, coordxy x, coordxy y)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
kickdieroll = rnd(20);
|
kickdieroll = rnd(20);
|
||||||
specialdmg = special_dmgval(&gy.youmonst, mon, W_ARMF, (long *) 0);
|
specialdmg = special_dmgval(&gy.youmonst, mon, W_ARMF,
|
||||||
|
(long *) 0);
|
||||||
if (mon->data == &mons[PM_SHADE] && !specialdmg) {
|
if (mon->data == &mons[PM_SHADE] && !specialdmg) {
|
||||||
/* doesn't matter whether it would have hit or missed,
|
/* doesn't matter whether it would have hit or missed,
|
||||||
and shades have no passive counterattack */
|
and shades have no passive counterattack */
|
||||||
@@ -493,8 +494,9 @@ kick_object(coordxy x, coordxy y, char *kickobjnam)
|
|||||||
/* if a pile, the "top" object gets kicked */
|
/* if a pile, the "top" object gets kicked */
|
||||||
gk.kickedobj = svl.level.objects[x][y];
|
gk.kickedobj = svl.level.objects[x][y];
|
||||||
if (gk.kickedobj) {
|
if (gk.kickedobj) {
|
||||||
/* kick object; if doing is fatal, done() will clean up gk.kickedobj */
|
/* formatted object name matters iff res==0 */
|
||||||
Strcpy(kickobjnam, killer_xname(gk.kickedobj)); /* matters iff res==0 */
|
Strcpy(kickobjnam, killer_xname(gk.kickedobj));
|
||||||
|
/* kick object; if fatal, done() will clean up kickedobj */
|
||||||
res = really_kick_object(x, y);
|
res = really_kick_object(x, y);
|
||||||
gk.kickedobj = (struct obj *) 0;
|
gk.kickedobj = (struct obj *) 0;
|
||||||
}
|
}
|
||||||
@@ -924,7 +926,8 @@ kick_door(coordxy x, coordxy y, int avrg_attrib)
|
|||||||
exercise(A_DEX, TRUE);
|
exercise(A_DEX, TRUE);
|
||||||
doorbuster = Upolyd && is_giant(gy.youmonst.data);
|
doorbuster = Upolyd && is_giant(gy.youmonst.data);
|
||||||
/* door is known to be CLOSED or LOCKED */
|
/* door is known to be CLOSED or LOCKED */
|
||||||
if (doorbuster || (rnl(35) < avrg_attrib + (!martial() ? 0 : ACURR(A_DEX)))) {
|
if (doorbuster
|
||||||
|
|| (rnl(35) < avrg_attrib + (!martial() ? 0 : ACURR(A_DEX)))) {
|
||||||
boolean shopdoor = *in_rooms(x, y, SHOPBASE) ? TRUE : FALSE;
|
boolean shopdoor = *in_rooms(x, y, SHOPBASE) ? TRUE : FALSE;
|
||||||
|
|
||||||
/* break the door */
|
/* break the door */
|
||||||
|
|||||||
+12
-7
@@ -141,7 +141,8 @@ throw_obj(struct obj *obj, int shotlimit)
|
|||||||
/* throwing with one hand, but pluralize since the
|
/* throwing with one hand, but pluralize since the
|
||||||
expression "with your bare hands" sounds better */
|
expression "with your bare hands" sounds better */
|
||||||
makeplural(body_part(HAND)));
|
makeplural(body_part(HAND)));
|
||||||
Sprintf(svk.killer.name, "throwing %s bare-handed", killer_xname(obj));
|
Sprintf(svk.killer.name, "throwing %s bare-handed",
|
||||||
|
killer_xname(obj));
|
||||||
instapetrify(svk.killer.name);
|
instapetrify(svk.killer.name);
|
||||||
}
|
}
|
||||||
if (welded(obj)) {
|
if (welded(obj)) {
|
||||||
@@ -1058,7 +1059,8 @@ mhurtle_step(genericptr_t arg, coordxy x, coordxy y)
|
|||||||
}
|
}
|
||||||
/* and whether hero is turned to stone by being touched by 'mon' */
|
/* and whether hero is turned to stone by being touched by 'mon' */
|
||||||
if (touch_petrifies(mon->data) && !(uarmu || uarm || uarmc)) {
|
if (touch_petrifies(mon->data) && !(uarmu || uarm || uarmc)) {
|
||||||
Snprintf(svk.killer.name, sizeof svk.killer.name, "being hit by %s",
|
Snprintf(svk.killer.name, sizeof svk.killer.name,
|
||||||
|
"being hit by %s",
|
||||||
/* combine m_monnam() and noname_monnam():
|
/* combine m_monnam() and noname_monnam():
|
||||||
"{your,a} hurtling cockatrice" w/o assigned name */
|
"{your,a} hurtling cockatrice" w/o assigned name */
|
||||||
x_monnam(mon, mon->mtame ? ARTICLE_YOUR : ARTICLE_A,
|
x_monnam(mon, mon->mtame ? ARTICLE_YOUR : ARTICLE_A,
|
||||||
@@ -1346,8 +1348,8 @@ toss_up(struct obj *obj, boolean hitsroof)
|
|||||||
|
|
||||||
if (obj->oartifact && !harmless)
|
if (obj->oartifact && !harmless)
|
||||||
/* need a fake die roll here; rn1(18,2) avoids 1 and 20 */
|
/* need a fake die roll here; rn1(18,2) avoids 1 and 20 */
|
||||||
artimsg = artifact_hit((struct monst *) 0, &gy.youmonst, obj, &dmg,
|
artimsg = artifact_hit((struct monst *) 0, &gy.youmonst, obj,
|
||||||
rn1(18, 2));
|
&dmg, rn1(18, 2));
|
||||||
|
|
||||||
if (!dmg) { /* probably wasn't a weapon; base damage on weight */
|
if (!dmg) { /* probably wasn't a weapon; base damage on weight */
|
||||||
dmg = ((int) obj->owt + 99) / 100;
|
dmg = ((int) obj->owt + 99) / 100;
|
||||||
@@ -1399,7 +1401,8 @@ toss_up(struct obj *obj, boolean hitsroof)
|
|||||||
&& polymon(PM_STONE_GOLEM))) {
|
&& polymon(PM_STONE_GOLEM))) {
|
||||||
petrify:
|
petrify:
|
||||||
svk.killer.format = KILLED_BY;
|
svk.killer.format = KILLED_BY;
|
||||||
Strcpy(svk.killer.name, "elementary physics"); /* what goes up... */
|
/* what goes up... */
|
||||||
|
Strcpy(svk.killer.name, "elementary physics");
|
||||||
You("turn to stone.");
|
You("turn to stone.");
|
||||||
if (obj)
|
if (obj)
|
||||||
dropy(obj); /* bypass most of hitfloor() */
|
dropy(obj); /* bypass most of hitfloor() */
|
||||||
@@ -1760,7 +1763,8 @@ throwit(struct obj *obj,
|
|||||||
if (!Deaf && !Underwater) {
|
if (!Deaf && !Underwater) {
|
||||||
/* Some sound effects when item lands in water or lava */
|
/* Some sound effects when item lands in water or lava */
|
||||||
if (is_pool(gb.bhitpos.x, gb.bhitpos.y)
|
if (is_pool(gb.bhitpos.x, gb.bhitpos.y)
|
||||||
|| (is_lava(gb.bhitpos.x, gb.bhitpos.y) && !is_flammable(obj))) {
|
|| (is_lava(gb.bhitpos.x, gb.bhitpos.y)
|
||||||
|
&& !is_flammable(obj))) {
|
||||||
Soundeffect(se_splash, 50);
|
Soundeffect(se_splash, 50);
|
||||||
pline((weight(obj) > 9) ? "Splash!" : "Plop!");
|
pline((weight(obj) > 9) ? "Splash!" : "Plop!");
|
||||||
}
|
}
|
||||||
@@ -2658,7 +2662,8 @@ throw_gold(struct obj *obj)
|
|||||||
/* see if the gold has a place to move into */
|
/* see if the gold has a place to move into */
|
||||||
odx = u.ux + u.dx;
|
odx = u.ux + u.dx;
|
||||||
ody = u.uy + u.dy;
|
ody = u.uy + u.dy;
|
||||||
if (!isok(odx, ody) || !ZAP_POS(levl[odx][ody].typ) || closed_door(odx, ody)) {
|
if (!isok(odx, ody)
|
||||||
|
|| !ZAP_POS(levl[odx][ody].typ) || closed_door(odx, ody)) {
|
||||||
gb.bhitpos.x = u.ux;
|
gb.bhitpos.x = u.ux;
|
||||||
gb.bhitpos.y = u.uy;
|
gb.bhitpos.y = u.uy;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+29
-19
@@ -38,7 +38,8 @@ staticfn void Fread(genericptr_t, int, int, dlb *);
|
|||||||
staticfn xint16 dname_to_dnum(const char *);
|
staticfn xint16 dname_to_dnum(const char *);
|
||||||
staticfn int find_branch(const char *, struct proto_dungeon *);
|
staticfn int find_branch(const char *, struct proto_dungeon *);
|
||||||
staticfn xint16 parent_dnum(const char *, struct proto_dungeon *);
|
staticfn xint16 parent_dnum(const char *, struct proto_dungeon *);
|
||||||
staticfn int level_range(xint16, int, int, int, struct proto_dungeon *, int *);
|
staticfn int level_range(xint16, int, int, int, struct proto_dungeon *,
|
||||||
|
int *);
|
||||||
staticfn xint16 parent_dlevel(const char *, struct proto_dungeon *);
|
staticfn xint16 parent_dlevel(const char *, struct proto_dungeon *);
|
||||||
staticfn int correct_branch_type(struct tmpbranch *);
|
staticfn int correct_branch_type(struct tmpbranch *);
|
||||||
staticfn branch *add_branch(int, int, struct proto_dungeon *);
|
staticfn branch *add_branch(int, int, struct proto_dungeon *);
|
||||||
@@ -1006,7 +1007,8 @@ init_dungeon_dungeons(
|
|||||||
int dgn_base, dgn_range, dgn_align, dgn_entry, dgn_chance, dgn_flags;
|
int dgn_base, dgn_range, dgn_align, dgn_entry, dgn_chance, dgn_flags;
|
||||||
|
|
||||||
dgn_name = get_table_str(L, "name");
|
dgn_name = get_table_str(L, "name");
|
||||||
dgn_bonetag = get_table_str_opt(L, "bonetag", emptystr); /* TODO: single char or "none" */
|
/* TODO: accept single char or "none" for bonetag */
|
||||||
|
dgn_bonetag = get_table_str_opt(L, "bonetag", emptystr);
|
||||||
dgn_protoname = get_table_str_opt(L, "protofile", emptystr);
|
dgn_protoname = get_table_str_opt(L, "protofile", emptystr);
|
||||||
dgn_base = get_table_int(L, "base");
|
dgn_base = get_table_int(L, "base");
|
||||||
dgn_range = get_table_int_opt(L, "range", 0);
|
dgn_range = get_table_int_opt(L, "range", 0);
|
||||||
@@ -1059,10 +1061,12 @@ init_dungeon_dungeons(
|
|||||||
pd->tmpdungeon[dngidx].chance = dgn_chance;
|
pd->tmpdungeon[dngidx].chance = dgn_chance;
|
||||||
pd->tmpdungeon[dngidx].entry_lev = dgn_entry;
|
pd->tmpdungeon[dngidx].entry_lev = dgn_entry;
|
||||||
|
|
||||||
Strcpy(svd.dungeons[dngidx].fill_lvl, dgn_fill); /* FIXME: fill_lvl len */
|
/* FIXME: these should have length checks */
|
||||||
Strcpy(svd.dungeons[dngidx].dname, dgn_name); /* FIXME: dname length */
|
Strcpy(svd.dungeons[dngidx].fill_lvl, dgn_fill);
|
||||||
Strcpy(svd.dungeons[dngidx].proto, dgn_protoname); /* FIXME: proto length */
|
Strcpy(svd.dungeons[dngidx].dname, dgn_name);
|
||||||
Strcpy(svd.dungeons[dngidx].themerms, dgn_themerms); /* FIXME: length */
|
Strcpy(svd.dungeons[dngidx].proto, dgn_protoname);
|
||||||
|
Strcpy(svd.dungeons[dngidx].themerms, dgn_themerms);
|
||||||
|
/* FIXME: accept "none", convert that to '\0' */
|
||||||
svd.dungeons[dngidx].boneid = *dgn_bonetag ? *dgn_bonetag : 0;
|
svd.dungeons[dngidx].boneid = *dgn_bonetag ? *dgn_bonetag : 0;
|
||||||
free((genericptr) dgn_fill);
|
free((genericptr) dgn_fill);
|
||||||
/* free((genericptr) dgn_protoname); -- stored in pd.tmpdungeon[] */
|
/* free((genericptr) dgn_protoname); -- stored in pd.tmpdungeon[] */
|
||||||
@@ -1079,8 +1083,9 @@ init_dungeon_dungeons(
|
|||||||
svd.dungeons[dngidx].depth_start = 1;
|
svd.dungeons[dngidx].depth_start = 1;
|
||||||
svd.dungeons[dngidx].dunlev_ureached = 1;
|
svd.dungeons[dngidx].dunlev_ureached = 1;
|
||||||
} else {
|
} else {
|
||||||
svd.dungeons[dngidx].ledger_start = svd.dungeons[dngidx - 1].ledger_start
|
svd.dungeons[dngidx].ledger_start
|
||||||
+ svd.dungeons[dngidx - 1].num_dunlevs;
|
= svd.dungeons[dngidx - 1].ledger_start
|
||||||
|
+ svd.dungeons[dngidx - 1].num_dunlevs;
|
||||||
svd.dungeons[dngidx].dunlev_ureached = 0;
|
svd.dungeons[dngidx].dunlev_ureached = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1403,8 +1408,8 @@ ledger_to_dnum(xint16 ledgerno)
|
|||||||
/* find i such that (i->base + 1) <= ledgerno <= (i->base + i->count) */
|
/* find i such that (i->base + 1) <= ledgerno <= (i->base + i->count) */
|
||||||
for (i = 0; i < svn.n_dgns; i++)
|
for (i = 0; i < svn.n_dgns; i++)
|
||||||
if (svd.dungeons[i].ledger_start < ledgerno
|
if (svd.dungeons[i].ledger_start < ledgerno
|
||||||
&& (ledgerno
|
&& ledgerno <= (svd.dungeons[i].ledger_start
|
||||||
<= svd.dungeons[i].ledger_start + svd.dungeons[i].num_dunlevs))
|
+ svd.dungeons[i].num_dunlevs))
|
||||||
return i;
|
return i;
|
||||||
|
|
||||||
panic("level number out of range [ledger_to_dnum(%d)]", (int) ledgerno);
|
panic("level number out of range [ledger_to_dnum(%d)]", (int) ledgerno);
|
||||||
@@ -1475,7 +1480,7 @@ builds_up(d_level *lev)
|
|||||||
branch *br;
|
branch *br;
|
||||||
if (dptr->num_dunlevs > 1)
|
if (dptr->num_dunlevs > 1)
|
||||||
return (boolean) (dptr->entry_lev == dptr->num_dunlevs);
|
return (boolean) (dptr->entry_lev == dptr->num_dunlevs);
|
||||||
/* else, single-level branch; find the branch connection that connects this
|
/* else, single-level branch; find branch connection that connects this
|
||||||
* dungeon from a parent dungeon and determine whether it builds up from
|
* dungeon from a parent dungeon and determine whether it builds up from
|
||||||
* that */
|
* that */
|
||||||
for (br = svb.branches; br; br = br->next) {
|
for (br = svb.branches; br; br = br->next) {
|
||||||
@@ -1981,7 +1986,7 @@ boolean
|
|||||||
Invocation_lev(d_level *lev)
|
Invocation_lev(d_level *lev)
|
||||||
{
|
{
|
||||||
return (boolean) (In_hell(lev)
|
return (boolean) (In_hell(lev)
|
||||||
&& lev->dlevel == svd.dungeons[lev->dnum].num_dunlevs - 1);
|
&& lev->dlevel == svd.dungeons[lev->dnum].num_dunlevs - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* use instead of depth() wherever a degree of difficulty is made
|
/* use instead of depth() wherever a degree of difficulty is made
|
||||||
@@ -2104,7 +2109,7 @@ lev_by_name(const char *nam)
|
|||||||
/* either wizard mode or else seen and not forgotten;
|
/* either wizard mode or else seen and not forgotten;
|
||||||
note: used to be '(flags & (FORGOTTEN|VISITED)) == VISITED'
|
note: used to be '(flags & (FORGOTTEN|VISITED)) == VISITED'
|
||||||
back when amnesia could cause levels to be forgotten */
|
back when amnesia could cause levels to be forgotten */
|
||||||
&& (wizard || (svl.level_info[idx].flags & (VISITED)) == VISITED)) {
|
&& (wizard || (svl.level_info[idx].flags & VISITED) == VISITED)) {
|
||||||
lev = depth(&dlev);
|
lev = depth(&dlev);
|
||||||
}
|
}
|
||||||
} else { /* not a specific level; try branch names */
|
} else { /* not a specific level; try branch names */
|
||||||
@@ -2116,9 +2121,10 @@ lev_by_name(const char *nam)
|
|||||||
if (idx >= 0) {
|
if (idx >= 0) {
|
||||||
idxtoo = (idx >> 8) & 0x00FF;
|
idxtoo = (idx >> 8) & 0x00FF;
|
||||||
idx &= 0x00FF;
|
idx &= 0x00FF;
|
||||||
/* either wizard mode, or else _both_ sides of branch seen */
|
/* either wizard mode, or else _both_ sides of branch seen; */
|
||||||
if (wizard || (((svl.level_info[idx].flags & (VISITED)) == VISITED)
|
/* (flags & VISITED)==VISITED: see comment about amnesia above */
|
||||||
&& ((svl.level_info[idxtoo].flags & (VISITED))
|
if (wizard || (((svl.level_info[idx].flags & VISITED) == VISITED)
|
||||||
|
&& ((svl.level_info[idxtoo].flags & VISITED)
|
||||||
== VISITED))) {
|
== VISITED))) {
|
||||||
if (ledger_to_dnum(idxtoo) == u.uz.dnum)
|
if (ledger_to_dnum(idxtoo) == u.uz.dnum)
|
||||||
idx = idxtoo;
|
idx = idxtoo;
|
||||||
@@ -2586,7 +2592,8 @@ load_exclusions(NHFILE *nhfp)
|
|||||||
while (nez-- > 0) {
|
while (nez-- > 0) {
|
||||||
ez = (struct exclusion_zone *) alloc(sizeof *ez);
|
ez = (struct exclusion_zone *) alloc(sizeof *ez);
|
||||||
if (nhfp->structlevel) {
|
if (nhfp->structlevel) {
|
||||||
mread(nhfp->fd, (genericptr_t) &ez->zonetype, sizeof ez->zonetype);
|
mread(nhfp->fd, (genericptr_t) &ez->zonetype,
|
||||||
|
sizeof ez->zonetype);
|
||||||
mread(nhfp->fd, (genericptr_t) &ez->lx, sizeof ez->lx);
|
mread(nhfp->fd, (genericptr_t) &ez->lx, sizeof ez->lx);
|
||||||
mread(nhfp->fd, (genericptr_t) &ez->ly, sizeof ez->ly);
|
mread(nhfp->fd, (genericptr_t) &ez->ly, sizeof ez->ly);
|
||||||
mread(nhfp->fd, (genericptr_t) &ez->hx, sizeof ez->hx);
|
mread(nhfp->fd, (genericptr_t) &ez->hx, sizeof ez->hx);
|
||||||
@@ -2827,11 +2834,13 @@ init_mapseen(d_level *lev)
|
|||||||
init->lev.dlevel = lev->dlevel;
|
init->lev.dlevel = lev->dlevel;
|
||||||
|
|
||||||
/* walk until we get to the place where we should insert init */
|
/* walk until we get to the place where we should insert init */
|
||||||
for (mptr = svm.mapseenchn, prev = 0; mptr; prev = mptr, mptr = mptr->next)
|
for (mptr = svm.mapseenchn, prev = 0; mptr;
|
||||||
|
prev = mptr, mptr = mptr->next) {
|
||||||
if (mptr->lev.dnum > init->lev.dnum
|
if (mptr->lev.dnum > init->lev.dnum
|
||||||
|| (mptr->lev.dnum == init->lev.dnum
|
|| (mptr->lev.dnum == init->lev.dnum
|
||||||
&& mptr->lev.dlevel > init->lev.dlevel))
|
&& mptr->lev.dlevel > init->lev.dlevel))
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
if (!prev) {
|
if (!prev) {
|
||||||
init->next = svm.mapseenchn;
|
init->next = svm.mapseenchn;
|
||||||
svm.mapseenchn = init;
|
svm.mapseenchn = init;
|
||||||
@@ -3232,7 +3241,8 @@ recalc_mapseen(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*ARGUSED*/
|
/*ARGUSED*/
|
||||||
/* valley and sanctum levels get automatic annotation once temple is entered */
|
/* valley and sanctum levels get automatic annotation once their temple
|
||||||
|
is entered */
|
||||||
void
|
void
|
||||||
mapseen_temple(
|
mapseen_temple(
|
||||||
struct monst *priest UNUSED) /* not used; might be useful someday */
|
struct monst *priest UNUSED) /* not used; might be useful someday */
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ choke(struct obj *food)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
You("stuff yourself and then vomit voluminously.");
|
You("stuff yourself and then vomit voluminously.");
|
||||||
morehungry(Hunger ? (u.uhunger - 60) : 1000); /* you just got *very* sick! */
|
morehungry(Hunger ? (u.uhunger - 60) : 1000); /* just got very sick! */
|
||||||
vomit();
|
vomit();
|
||||||
} else {
|
} else {
|
||||||
svk.killer.format = KILLED_BY_AN;
|
svk.killer.format = KILLED_BY_AN;
|
||||||
@@ -1177,13 +1177,14 @@ cpostfx(int pm)
|
|||||||
tmp += 20;
|
tmp += 20;
|
||||||
if (gy.youmonst.data->mlet != S_MIMIC && !Unchanging) {
|
if (gy.youmonst.data->mlet != S_MIMIC && !Unchanging) {
|
||||||
char buf[BUFSZ];
|
char buf[BUFSZ];
|
||||||
|
const char *tempshape = !Hallucination ? "a pile of gold"
|
||||||
|
: "an orange";
|
||||||
|
|
||||||
if (!u.uconduct.polyselfs++) /* you're changing form */
|
if (!u.uconduct.polyselfs++) /* you're changing form */
|
||||||
livelog_printf(LL_CONDUCT,
|
livelog_printf(LL_CONDUCT,
|
||||||
"changed form for the first time by mimicking %s",
|
"changed form for the first time by mimicking %s",
|
||||||
Hallucination ? "an orange" : "a pile of gold");
|
tempshape);
|
||||||
You_cant("resist the temptation to mimic %s.",
|
You_cant("resist the temptation to mimic %s.", tempshape);
|
||||||
Hallucination ? "an orange" : "a pile of gold");
|
|
||||||
/* A pile of gold can't ride. */
|
/* A pile of gold can't ride. */
|
||||||
if (u.usteed)
|
if (u.usteed)
|
||||||
dismount_steed(DISMOUNT_FELL);
|
dismount_steed(DISMOUNT_FELL);
|
||||||
@@ -1665,7 +1666,8 @@ start_tin(struct obj *otmp)
|
|||||||
access); 1 turn delay case is non-deterministic: getting
|
access); 1 turn delay case is non-deterministic: getting
|
||||||
interrupted and retrying might yield another 1 turn delay
|
interrupted and retrying might yield another 1 turn delay
|
||||||
or might open immediately on 2nd (or 3rd, 4th, ...) try */
|
or might open immediately on 2nd (or 3rd, 4th, ...) try */
|
||||||
tmp = (uwep && uwep->blessed && uwep->otyp == TIN_OPENER) ? 0 : rn2(2);
|
tmp = (uwep && uwep->blessed && uwep->otyp == TIN_OPENER) ? 0
|
||||||
|
: rn2(2);
|
||||||
if (!tmp)
|
if (!tmp)
|
||||||
mesg = "The tin opens like magic!";
|
mesg = "The tin opens like magic!";
|
||||||
else
|
else
|
||||||
@@ -2491,7 +2493,8 @@ fpostfx(struct obj *otmp)
|
|||||||
if (!Stoned) {
|
if (!Stoned) {
|
||||||
Sprintf(svk.killer.name, "%s egg",
|
Sprintf(svk.killer.name, "%s egg",
|
||||||
mons[otmp->corpsenm].pmnames[NEUTRAL]);
|
mons[otmp->corpsenm].pmnames[NEUTRAL]);
|
||||||
make_stoned(5L, (char *) 0, KILLED_BY_AN, svk.killer.name);
|
make_stoned(5L, (char *) 0, KILLED_BY_AN,
|
||||||
|
svk.killer.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* note: no "tastes like chicken" message for eggs */
|
/* note: no "tastes like chicken" message for eggs */
|
||||||
@@ -2697,15 +2700,15 @@ doeat_nonfood(struct obj *otmp)
|
|||||||
|| material == DRAGON_HIDE || material == WAX) {
|
|| material == DRAGON_HIDE || material == WAX) {
|
||||||
if (!u.uconduct.unvegan++ && !ll_conduct) {
|
if (!u.uconduct.unvegan++ && !ll_conduct) {
|
||||||
livelog_printf(LL_CONDUCT,
|
livelog_printf(LL_CONDUCT,
|
||||||
"consumed animal products for the first time, by eating %s",
|
"consumed animal products for the first time, by eating %s",
|
||||||
an(food_xname(otmp, FALSE)));
|
an(food_xname(otmp, FALSE)));
|
||||||
ll_conduct++;
|
ll_conduct++;
|
||||||
}
|
}
|
||||||
if (material != WAX) {
|
if (material != WAX) {
|
||||||
if (!u.uconduct.unvegetarian && !ll_conduct)
|
if (!u.uconduct.unvegetarian && !ll_conduct)
|
||||||
livelog_printf(LL_CONDUCT,
|
livelog_printf(LL_CONDUCT,
|
||||||
"tasted meat by-products for the first time, by eating %s",
|
"tasted meat by-products for the first time, by eating %s",
|
||||||
an(food_xname(otmp, FALSE)));
|
an(food_xname(otmp, FALSE)));
|
||||||
violated_vegetarian();
|
violated_vegetarian();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3565,12 +3568,12 @@ floorfood(
|
|||||||
pline("%s but you %s eat them.", qbuf,
|
pline("%s but you %s eat them.", qbuf,
|
||||||
nodig ? "cannot" : "are too full to");
|
nodig ? "cannot" : "are too full to");
|
||||||
} else {
|
} else {
|
||||||
Strcat(qbuf, ((!svc.context.digging.chew
|
Strcat(qbuf, (!svc.context.digging.chew
|
||||||
|| svc.context.digging.pos.x != u.ux
|
|| !u_at(svc.context.digging.pos.x,
|
||||||
|| svc.context.digging.pos.y != u.uy
|
svc.context.digging.pos.y)
|
||||||
|| !on_level(&svc.context.digging.level, &u.uz))
|
|| !on_level(&svc.context.digging.level, &u.uz))
|
||||||
? "; eat them?"
|
? "; eat them?"
|
||||||
: "; resume eating them?"));
|
: "; resume eating them?");
|
||||||
c = yn_function(qbuf, ynqchars, 'n', TRUE);
|
c = yn_function(qbuf, ynqchars, 'n', TRUE);
|
||||||
}
|
}
|
||||||
if (c == 'y')
|
if (c == 'y')
|
||||||
|
|||||||
@@ -1622,7 +1622,7 @@ container_contents(
|
|||||||
| (flags.sortpack ? SORTLOOT_PACK : 0));
|
| (flags.sortpack ? SORTLOOT_PACK : 0));
|
||||||
sortedcobj = sortloot(&box->cobj, sortflags, FALSE,
|
sortedcobj = sortloot(&box->cobj, sortflags, FALSE,
|
||||||
(boolean (*)(OBJ_P)) 0);
|
(boolean (*)(OBJ_P)) 0);
|
||||||
for (srtc = sortedcobj; ((obj = srtc->obj) != 0); ++srtc) {
|
for (srtc = sortedcobj; (obj = srtc->obj) != 0; ++srtc) {
|
||||||
if (identified) {
|
if (identified) {
|
||||||
discover_object(obj->otyp, TRUE, FALSE);
|
discover_object(obj->otyp, TRUE, FALSE);
|
||||||
obj->known = obj->bknown = obj->dknown
|
obj->known = obj->bknown = obj->dknown
|
||||||
@@ -1748,9 +1748,9 @@ save_killers(NHFILE *nhfp)
|
|||||||
struct kinfo *kptr;
|
struct kinfo *kptr;
|
||||||
|
|
||||||
if (perform_bwrite(nhfp)) {
|
if (perform_bwrite(nhfp)) {
|
||||||
for (kptr = &svk.killer; kptr != (struct kinfo *) 0; kptr = kptr->next) {
|
for (kptr = &svk.killer; kptr; kptr = kptr->next) {
|
||||||
if (nhfp->structlevel)
|
if (nhfp->structlevel)
|
||||||
bwrite(nhfp->fd, (genericptr_t) kptr, sizeof(struct kinfo));
|
bwrite(nhfp->fd, (genericptr_t) kptr, sizeof (struct kinfo));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (release_data(nhfp)) {
|
if (release_data(nhfp)) {
|
||||||
@@ -1904,9 +1904,11 @@ NH_abort(char *why USED_FOR_CRASHREPORT)
|
|||||||
gdb_prio++;
|
gdb_prio++;
|
||||||
|
|
||||||
if (gdb_prio > libc_prio) {
|
if (gdb_prio > libc_prio) {
|
||||||
(void) (NH_panictrace_gdb() || (libc_prio && NH_panictrace_libc()));
|
(void) (NH_panictrace_gdb()
|
||||||
|
|| (libc_prio && NH_panictrace_libc()));
|
||||||
} else {
|
} else {
|
||||||
(void) (NH_panictrace_libc() || (gdb_prio && NH_panictrace_gdb()));
|
(void) (NH_panictrace_libc()
|
||||||
|
|| (gdb_prio && NH_panictrace_gdb()));
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* VMS */
|
#else /* VMS */
|
||||||
|
|||||||
+2
-2
@@ -1186,8 +1186,8 @@ doengrave(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Engraving will always take at least one action via being run as an
|
/* Engraving will always take at least one action via being run as an
|
||||||
* occupation, so do not count this setup as taking time. */
|
occupation, so do not count this setup as taking time. */
|
||||||
doengr_exit:
|
doengr_exit:
|
||||||
if (de->disprefresh)
|
if (de->disprefresh)
|
||||||
newsym(u.ux, u.uy);
|
newsym(u.ux, u.uy);
|
||||||
retval = de->ret;
|
retval = de->ret;
|
||||||
|
|||||||
+26
-21
@@ -296,8 +296,8 @@ explode(
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (olet == MON_EXPLODE && !you_exploding) {
|
if (olet == MON_EXPLODE && !you_exploding) {
|
||||||
/* when explode() is called recursively, svk.killer.name might change so
|
/* when explode() is called recursively, svk.killer.name might change
|
||||||
we need to retain a copy of the current value for this explosion */
|
so retain a copy of the current value for this explosion */
|
||||||
str = strcpy(killr_buf, svk.killer.name);
|
str = strcpy(killr_buf, svk.killer.name);
|
||||||
do_hallu = (Hallucination
|
do_hallu = (Hallucination
|
||||||
&& (strstri(str, "'s explosion")
|
&& (strstri(str, "'s explosion")
|
||||||
@@ -515,19 +515,19 @@ explode(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((explmask[i][j] & EXPL_MON) != 0) {
|
if ((explmask[i][j] & EXPL_MON) != 0) {
|
||||||
/* damage from ring/wand explosion isn't itself
|
/* Damage from ring/wand explosion isn't itself
|
||||||
* electrical in nature, nor is damage from freezing potion
|
* electrical in nature, nor is damage from freezing
|
||||||
* really cold in nature, nor is damage from boiling potion
|
* potion really cold in nature, nor is damage from
|
||||||
* or exploding oil; only burning items damage is the "same
|
* boiling potion or exploding oil; only burning items
|
||||||
* type" as the explosion. Because this is imperfect and
|
* damage is the "same type" as the explosion. Because
|
||||||
* marginal (burning items only deal 1 damage), ignore it
|
* this is imperfect and marginal (burning items only
|
||||||
* for golemeffects(). */
|
* deal 1 damage), ignore it for golemeffects(). */
|
||||||
golemeffects(mtmp, (int) adtyp, dam);
|
golemeffects(mtmp, (int) adtyp, dam);
|
||||||
mtmp->mhp -= itemdmg; /* item destruction dmg */
|
mtmp->mhp -= itemdmg; /* item destruction dmg */
|
||||||
} else {
|
} else {
|
||||||
/* call resist with 0 and do damage manually so 1) we can
|
/* Call resist with 0 and do damage manually so 1) we can
|
||||||
* get out the message before doing the damage, and 2) we
|
* get out the message before doing the damage, and 2) we
|
||||||
* can call mondied, not killed, if it's not your blast
|
* can call mondied, not killed, if it's not your blast.
|
||||||
*/
|
*/
|
||||||
int mdam = dam;
|
int mdam = dam;
|
||||||
|
|
||||||
@@ -644,7 +644,7 @@ explode(
|
|||||||
} else {
|
} else {
|
||||||
if (olet == MON_EXPLODE) {
|
if (olet == MON_EXPLODE) {
|
||||||
if (generic) /* explosion was unseen; str=="explosion", */
|
if (generic) /* explosion was unseen; str=="explosion", */
|
||||||
; /* svk.killer.name=="gas spore's explosion". */
|
; /* svk.killer.name=="gas spore's explosion". */
|
||||||
else if (str != svk.killer.name && str != hallu_buf)
|
else if (str != svk.killer.name && str != hallu_buf)
|
||||||
Strcpy(svk.killer.name, str);
|
Strcpy(svk.killer.name, str);
|
||||||
svk.killer.format = KILLED_BY_AN;
|
svk.killer.format = KILLED_BY_AN;
|
||||||
@@ -745,7 +745,8 @@ scatter(coordxy sx, coordxy sy, /* location of objects to scatter */
|
|||||||
if (shop_origin)
|
if (shop_origin)
|
||||||
credit_report(shkp, 0, TRUE); /* establish baseline, without msgs */
|
credit_report(shkp, 0, TRUE); /* establish baseline, without msgs */
|
||||||
|
|
||||||
while ((otmp = (individual_object ? obj : svl.level.objects[sx][sy])) != 0) {
|
while ((otmp = (individual_object ? obj
|
||||||
|
: svl.level.objects[sx][sy])) != 0) {
|
||||||
if (otmp == uball || otmp == uchain) {
|
if (otmp == uball || otmp == uchain) {
|
||||||
boolean waschain = (otmp == uchain);
|
boolean waschain = (otmp == uchain);
|
||||||
|
|
||||||
@@ -917,7 +918,8 @@ scatter(coordxy sx, coordxy sy, /* location of objects to scatter */
|
|||||||
retrieve the item and drop it back inside the shop,
|
retrieve the item and drop it back inside the shop,
|
||||||
the owed charges will only be reduced at that point
|
the owed charges will only be reduced at that point
|
||||||
by the lesser shopkeeper buying-price.
|
by the lesser shopkeeper buying-price.
|
||||||
The non-gold situation will likely get adjusted further.
|
The non-gold situation will likely get adjusted
|
||||||
|
further.
|
||||||
*/
|
*/
|
||||||
if (stmp->obj->otyp == GOLD_PIECE) {
|
if (stmp->obj->otyp == GOLD_PIECE) {
|
||||||
addtobill(stmp->obj, FALSE, FALSE, TRUE);
|
addtobill(stmp->obj, FALSE, FALSE, TRUE);
|
||||||
@@ -1006,12 +1008,14 @@ adtyp_to_expltype(const int adtyp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* A monster explodes in a way that produces a real explosion (e.g. a sphere or
|
/* A monster explodes in a way that produces a real explosion (e.g. a sphere
|
||||||
* gas spore, not a yellow light or similar).
|
* or gas spore, not a yellow light or similar).
|
||||||
* This is some common code between explmu() and explmm().
|
* This is some common code between explmu() and explmm().
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
mon_explodes(struct monst *mon, struct attack *mattk)
|
mon_explodes(
|
||||||
|
struct monst *mon,
|
||||||
|
struct attack *mattk)
|
||||||
{
|
{
|
||||||
int dmg;
|
int dmg;
|
||||||
int type;
|
int type;
|
||||||
@@ -1029,8 +1033,9 @@ mon_explodes(struct monst *mon, struct attack *mattk)
|
|||||||
type = PHYS_EXPL_TYPE;
|
type = PHYS_EXPL_TYPE;
|
||||||
}
|
}
|
||||||
else if (mattk->adtyp >= AD_MAGM && mattk->adtyp <= AD_SPC2) {
|
else if (mattk->adtyp >= AD_MAGM && mattk->adtyp <= AD_SPC2) {
|
||||||
/* The -1, +20, *-1 math is to set it up as a 'monster breath' type for
|
/* The -1, +20, *-1 math is to set it up as a 'monster breath' type
|
||||||
* the explosions (it isn't, but this is the closest analogue). */
|
* for the explosions (it isn't, but this is the closest analogue). */
|
||||||
|
/* FIXME: there are macros for kind of thing... */
|
||||||
type = -((mattk->adtyp - 1) + 20);
|
type = -((mattk->adtyp - 1) + 20);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -1039,8 +1044,8 @@ mon_explodes(struct monst *mon, struct attack *mattk)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Kill it now so it won't appear to be caught in its own explosion.
|
/* Kill it now so it won't appear to be caught in its own explosion.
|
||||||
* Must check to see if already dead - which happens if this is called from
|
* Must check to see if already dead - which happens if this is called
|
||||||
* an AT_BOOM attack upon death. */
|
* from an AT_BOOM attack upon death. */
|
||||||
if (!DEADMONSTER(mon)) {
|
if (!DEADMONSTER(mon)) {
|
||||||
mondead(mon);
|
mondead(mon);
|
||||||
}
|
}
|
||||||
|
|||||||
+41
-31
@@ -318,7 +318,8 @@ fname_encode(
|
|||||||
(void) sprintf(op, "%c%02X", quotechar, *sp);
|
(void) sprintf(op, "%c%02X", quotechar, *sp);
|
||||||
op += 3;
|
op += 3;
|
||||||
cnt += 3;
|
cnt += 3;
|
||||||
} else if ((strchr(legal, *sp) != 0) || (strchr(hexdigits, *sp) != 0)) {
|
} else if ((strchr(legal, *sp) != 0)
|
||||||
|
|| (strchr(hexdigits, *sp) != 0)) {
|
||||||
*op++ = *sp;
|
*op++ = *sp;
|
||||||
*op = '\0';
|
*op = '\0';
|
||||||
cnt++;
|
cnt++;
|
||||||
@@ -965,8 +966,8 @@ set_savefile_name(boolean regularize_it)
|
|||||||
#endif
|
#endif
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
if (regularize_it) {
|
if (regularize_it) {
|
||||||
static const char okchars[] =
|
static const char okchars[]
|
||||||
"*ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-.";
|
= "*ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-.";
|
||||||
const char *legal = okchars;
|
const char *legal = okchars;
|
||||||
|
|
||||||
++legal; /* skip '*' wildcard character */
|
++legal; /* skip '*' wildcard character */
|
||||||
@@ -1049,7 +1050,8 @@ set_savefile_name(boolean regularize_it)
|
|||||||
}
|
}
|
||||||
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||||
if (overflow)
|
if (overflow)
|
||||||
impossible("set_savefile_name() couldn't complete without overflow %d",
|
impossible("set_savefile_name() couldn't complete"
|
||||||
|
" without overflow %d",
|
||||||
overflow);
|
overflow);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -1946,7 +1948,8 @@ lock_file(const char *filename, int whichprefix,
|
|||||||
#ifdef USE_FCNTL
|
#ifdef USE_FCNTL
|
||||||
lockfd = open(filename, O_RDWR);
|
lockfd = open(filename, O_RDWR);
|
||||||
if (lockfd == -1) {
|
if (lockfd == -1) {
|
||||||
HUP raw_printf("Cannot open file %s. Is NetHack installed correctly?",
|
HUP raw_printf("Cannot open file %s. "
|
||||||
|
" Is NetHack installed correctly?",
|
||||||
filename);
|
filename);
|
||||||
gn.nesting--;
|
gn.nesting--;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -1970,8 +1973,8 @@ lock_file(const char *filename, int whichprefix,
|
|||||||
|
|
||||||
#ifdef USE_FCNTL
|
#ifdef USE_FCNTL
|
||||||
if (retryct--) {
|
if (retryct--) {
|
||||||
HUP raw_printf(
|
HUP raw_printf("Waiting for release of fcntl lock on %s. "
|
||||||
"Waiting for release of fcntl lock on %s. (%d retries left.)",
|
" (%d retries left.)",
|
||||||
filename, retryct);
|
filename, retryct);
|
||||||
sleep(1);
|
sleep(1);
|
||||||
} else {
|
} else {
|
||||||
@@ -1987,7 +1990,8 @@ lock_file(const char *filename, int whichprefix,
|
|||||||
switch (errnosv) { /* George Barbanis */
|
switch (errnosv) { /* George Barbanis */
|
||||||
case EEXIST:
|
case EEXIST:
|
||||||
if (retryct--) {
|
if (retryct--) {
|
||||||
HUP raw_printf("Waiting for access to %s. (%d retries left).",
|
HUP raw_printf("Waiting for access to %s. "
|
||||||
|
" (%d retries left).",
|
||||||
filename, retryct);
|
filename, retryct);
|
||||||
#if defined(SYSV) || defined(ULTRIX) || defined(VMS)
|
#if defined(SYSV) || defined(ULTRIX) || defined(VMS)
|
||||||
(void)
|
(void)
|
||||||
@@ -2022,8 +2026,8 @@ lock_file(const char *filename, int whichprefix,
|
|||||||
/* take a wild guess at the underlying cause */
|
/* take a wild guess at the underlying cause */
|
||||||
HUP perror(lockname);
|
HUP perror(lockname);
|
||||||
HUP raw_printf("Cannot lock %s.", filename);
|
HUP raw_printf("Cannot lock %s.", filename);
|
||||||
HUP raw_printf(
|
HUP raw_printf("(Perhaps you are running NetHack from"
|
||||||
"(Perhaps you are running NetHack from inside the distribution package?).");
|
" inside the distribution package?).");
|
||||||
gn.nesting--;
|
gn.nesting--;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
default:
|
default:
|
||||||
@@ -2174,8 +2178,8 @@ do_write_config_file(void)
|
|||||||
wait_synch();
|
wait_synch();
|
||||||
pline("Some settings are not saved!");
|
pline("Some settings are not saved!");
|
||||||
wait_synch();
|
wait_synch();
|
||||||
pline(
|
pline("All manual customization and comments are removed"
|
||||||
"All manual customization and comments are removed from the file!");
|
" from the file!");
|
||||||
wait_synch();
|
wait_synch();
|
||||||
}
|
}
|
||||||
#define overwrite_prompt "Overwrite config file %.*s?"
|
#define overwrite_prompt "Overwrite config file %.*s?"
|
||||||
@@ -2534,7 +2538,8 @@ handle_config_section(char *buf)
|
|||||||
}
|
}
|
||||||
if (*sect) { /* got a section name */
|
if (*sect) { /* got a section name */
|
||||||
gc.config_section_current = dupstr(sect);
|
gc.config_section_current = dupstr(sect);
|
||||||
debugpline1("set config section: '%s'", gc.config_section_current);
|
debugpline1("set config section: '%s'",
|
||||||
|
gc.config_section_current);
|
||||||
} else { /* empty section name => end of sections */
|
} else { /* empty section name => end of sections */
|
||||||
free_config_sections();
|
free_config_sections();
|
||||||
debugpline0("unset config section");
|
debugpline0("unset config section");
|
||||||
@@ -2981,8 +2986,8 @@ cnf_line_MAX_STATUENAME_RANK(char *bufp)
|
|||||||
int n = atoi(bufp);
|
int n = atoi(bufp);
|
||||||
|
|
||||||
if (n < 1) {
|
if (n < 1) {
|
||||||
config_error_add(
|
config_error_add("Illegal value in MAX_STATUENAME_RANK"
|
||||||
"Illegal value in MAX_STATUENAME_RANK (minimum is 1)");
|
" (minimum is 1)");
|
||||||
n = 10;
|
n = 10;
|
||||||
}
|
}
|
||||||
sysopt.tt_oname_maxrank = n;
|
sysopt.tt_oname_maxrank = n;
|
||||||
@@ -2998,8 +3003,8 @@ cnf_line_LIVELOG(char *bufp)
|
|||||||
long L = strtol(bufp, NULL, 0);
|
long L = strtol(bufp, NULL, 0);
|
||||||
|
|
||||||
if (L < 0L || L > 0xffffL) {
|
if (L < 0L || L > 0xffffL) {
|
||||||
config_error_add(
|
config_error_add("Illegal value for LIVELOG"
|
||||||
"Illegal value for LIVELOG (must be between 0 and 0xFFFF).");
|
" (must be between 0 and 0xFFFF).");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
sysopt.livelog = L;
|
sysopt.livelog = L;
|
||||||
@@ -3109,8 +3114,8 @@ cnf_line_PORTABLE_DEVICE_PATHS(char *bufp)
|
|||||||
int n = atoi(bufp);
|
int n = atoi(bufp);
|
||||||
|
|
||||||
if (n < 0 || n > 1) {
|
if (n < 0 || n > 1) {
|
||||||
config_error_add(
|
config_error_add("Illegal value in PORTABLE_DEVICE_PATHS"
|
||||||
"Illegal value in PORTABLE_DEVICE_PATHS (not 0,1)");
|
" (not 0 or 1)");
|
||||||
n = 0;
|
n = 0;
|
||||||
}
|
}
|
||||||
sysopt.portable_device_paths = n;
|
sysopt.portable_device_paths = n;
|
||||||
@@ -3733,7 +3738,8 @@ parse_conf_buf(struct _cnf_parser_state *p, boolean (*proc)(char *arg))
|
|||||||
char *bufp = find_optparam(p->buf);
|
char *bufp = find_optparam(p->buf);
|
||||||
|
|
||||||
if (!bufp) {
|
if (!bufp) {
|
||||||
config_error_add("Format is CHOOSE=section1,section2,...");
|
config_error_add("Format is CHOOSE=section1"
|
||||||
|
",section2,...");
|
||||||
p->rv = FALSE;
|
p->rv = FALSE;
|
||||||
free(p->buf), p->buf = (char *) 0;
|
free(p->buf), p->buf = (char *) 0;
|
||||||
return;
|
return;
|
||||||
@@ -3915,8 +3921,8 @@ fopen_wizkit_file(void)
|
|||||||
else if (errno != ENOENT) {
|
else if (errno != ENOENT) {
|
||||||
/* e.g., problems when setuid NetHack can't search home
|
/* e.g., problems when setuid NetHack can't search home
|
||||||
* directory restricted to user */
|
* directory restricted to user */
|
||||||
raw_printf("Couldn't open default gw.wizkit file %s (%d).", tmp_wizkit,
|
raw_printf("Couldn't open default gw.wizkit file %s (%d).",
|
||||||
errno);
|
tmp_wizkit, errno);
|
||||||
wait_synch();
|
wait_synch();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -4047,7 +4053,7 @@ read_sym_file(int which_set)
|
|||||||
clear_symsetentry(which_set, TRUE);
|
clear_symsetentry(which_set, TRUE);
|
||||||
config_error_done();
|
config_error_done();
|
||||||
|
|
||||||
/* If name was defined, it was invalid. Then we're loading fallback */
|
/* If name was defined, it was invalid. Then we're loading fallback */
|
||||||
if (gs.symset[which_set].name) {
|
if (gs.symset[which_set].name) {
|
||||||
gs.symset[which_set].explicitly = FALSE;
|
gs.symset[which_set].explicitly = FALSE;
|
||||||
return 0;
|
return 0;
|
||||||
@@ -4087,8 +4093,8 @@ check_recordfile(const char *dir UNUSED_if_not_OS2_CODEVIEW)
|
|||||||
if (fd >= 0) {
|
if (fd >= 0) {
|
||||||
#ifdef VMS /* must be stream-lf to use UPDATE_RECORD_IN_PLACE */
|
#ifdef VMS /* must be stream-lf to use UPDATE_RECORD_IN_PLACE */
|
||||||
if (!file_is_stmlf(fd)) {
|
if (!file_is_stmlf(fd)) {
|
||||||
raw_printf(
|
raw_printf("Warning: scoreboard file '%s'"
|
||||||
"Warning: scoreboard file '%s' is not in stream_lf format",
|
" is not in stream_lf format",
|
||||||
fq_record);
|
fq_record);
|
||||||
wait_synch();
|
wait_synch();
|
||||||
}
|
}
|
||||||
@@ -4280,16 +4286,18 @@ recover_savefile(void)
|
|||||||
}
|
}
|
||||||
if (read(gnhfp->fd, (genericptr_t) &hpid, sizeof hpid) != sizeof hpid) {
|
if (read(gnhfp->fd, (genericptr_t) &hpid, sizeof hpid) != sizeof hpid) {
|
||||||
raw_printf("\n%s\n%s\n",
|
raw_printf("\n%s\n%s\n",
|
||||||
"Checkpoint data incompletely written or subsequently clobbered.",
|
"Checkpoint data incompletely written"
|
||||||
|
" or subsequently clobbered.",
|
||||||
"Recovery impossible.");
|
"Recovery impossible.");
|
||||||
close_nhfile(gnhfp);
|
close_nhfile(gnhfp);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (read(gnhfp->fd, (genericptr_t) &savelev, sizeof(savelev))
|
if (read(gnhfp->fd, (genericptr_t) &savelev, sizeof(savelev))
|
||||||
!= sizeof(savelev)) {
|
!= sizeof(savelev)) {
|
||||||
raw_printf(
|
raw_printf("\n%s %s %s\n",
|
||||||
"\nCheckpointing was not in effect for %s -- recovery impossible.\n",
|
"Checkpointing was not in effect for",
|
||||||
gl.lock);
|
gl.lock,
|
||||||
|
"-- recovery impossible.");
|
||||||
close_nhfile(gnhfp);
|
close_nhfile(gnhfp);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -4304,7 +4312,8 @@ recover_savefile(void)
|
|||||||
|| (read(gnhfp->fd, (genericptr_t) &sfi, sizeof sfi) != sizeof sfi)
|
|| (read(gnhfp->fd, (genericptr_t) &sfi, sizeof sfi) != sizeof sfi)
|
||||||
|| (read(gnhfp->fd, (genericptr_t) &pltmpsiz, sizeof pltmpsiz)
|
|| (read(gnhfp->fd, (genericptr_t) &pltmpsiz, sizeof pltmpsiz)
|
||||||
!= sizeof pltmpsiz) || (pltmpsiz > PL_NSIZ)
|
!= sizeof pltmpsiz) || (pltmpsiz > PL_NSIZ)
|
||||||
|| (read(gnhfp->fd, (genericptr_t) &tmpplbuf, pltmpsiz) != pltmpsiz)) {
|
|| (read(gnhfp->fd, (genericptr_t) &tmpplbuf, pltmpsiz)
|
||||||
|
!= pltmpsiz)) {
|
||||||
raw_printf("\nError reading %s -- can't recover.\n", gl.lock);
|
raw_printf("\nError reading %s -- can't recover.\n", gl.lock);
|
||||||
close_nhfile(gnhfp);
|
close_nhfile(gnhfp);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -4832,7 +4841,8 @@ choose_passage(int passagecnt, /* total of available passages */
|
|||||||
res = (int) svc.context.novel.pasg[idx];
|
res = (int) svc.context.novel.pasg[idx];
|
||||||
/* move the last slot's passage index into the slot just used
|
/* move the last slot's passage index into the slot just used
|
||||||
and reduce the number of passages available */
|
and reduce the number of passages available */
|
||||||
svc.context.novel.pasg[idx] = svc.context.novel.pasg[--svc.context.novel.count];
|
svc.context.novel.pasg[idx]
|
||||||
|
= svc.context.novel.pasg[--svc.context.novel.count];
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -407,7 +407,8 @@ dipfountain(struct obj *obj)
|
|||||||
|
|
||||||
if (u.ualign.type != A_LAWFUL) {
|
if (u.ualign.type != A_LAWFUL) {
|
||||||
/* Ha! Trying to cheat her. */
|
/* Ha! Trying to cheat her. */
|
||||||
pline("A freezing mist rises from the %s and envelopes the sword.",
|
pline("A freezing mist rises from the %s"
|
||||||
|
" and envelopes the sword.",
|
||||||
hliquid("water"));
|
hliquid("water"));
|
||||||
pline_The("fountain disappears!");
|
pline_The("fountain disappears!");
|
||||||
curse(obj);
|
curse(obj);
|
||||||
|
|||||||
+10
-6
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 glyphs.c */
|
/* NetHack 3.7 glyphs.c TODO: add NHDT branch/date/revision tags */
|
||||||
/* Copyright (c) Michael Allison, 2021. */
|
/* Copyright (c) Michael Allison, 2021. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -82,7 +82,8 @@ to_custom_symset_entry_callback(int glyph, struct find_struct *findwhat)
|
|||||||
static int glyphnag = 0;
|
static int glyphnag = 0;
|
||||||
|
|
||||||
if (!glyphnag++)
|
if (!glyphnag++)
|
||||||
config_error_add("Unimplemented customization feature, ignoring for now");
|
config_error_add("Unimplemented customization feature,"
|
||||||
|
" ignoring for now");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -94,7 +95,8 @@ to_custom_symset_entry_callback(int glyph, struct find_struct *findwhat)
|
|||||||
static int colornag = 0;
|
static int colornag = 0;
|
||||||
|
|
||||||
if (!colornag++)
|
if (!colornag++)
|
||||||
config_error_add("Unimplemented customization feature, ignoring for now");
|
config_error_add("Unimplemented customization feature,"
|
||||||
|
" ignoring for now");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -208,7 +210,8 @@ glyph_find_core(const char *id, struct find_struct *findwhat)
|
|||||||
break;
|
break;
|
||||||
case find_pm:
|
case find_pm:
|
||||||
if (glyph_is_monster(glyph)
|
if (glyph_is_monster(glyph)
|
||||||
&& monsym(&mons[glyph_to_mon(glyph)]) == findwhat->val)
|
&& monsym(&mons[glyph_to_mon(glyph)])
|
||||||
|
== findwhat->val)
|
||||||
do_callback = TRUE;
|
do_callback = TRUE;
|
||||||
break;
|
break;
|
||||||
case find_oc:
|
case find_oc:
|
||||||
@@ -517,7 +520,7 @@ apply_customizations(
|
|||||||
if (sc->custtype == custom_nhcolor) {
|
if (sc->custtype == custom_nhcolor) {
|
||||||
gmap = &glyphmap[details->content.ccolor.glyphidx];
|
gmap = &glyphmap[details->content.ccolor.glyphidx];
|
||||||
(void) set_map_customcolor(gmap,
|
(void) set_map_customcolor(gmap,
|
||||||
details->content.ccolor.nhcolor);
|
details->content.ccolor.nhcolor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
details = details->next;
|
details = details->next;
|
||||||
@@ -683,7 +686,8 @@ find_matching_customization(
|
|||||||
enum customization_types custtype,
|
enum customization_types custtype,
|
||||||
enum graphics_sets which_set)
|
enum graphics_sets which_set)
|
||||||
{
|
{
|
||||||
struct symset_customization *gdc = &gs.sym_customizations[which_set][custtype];
|
struct symset_customization *gdc
|
||||||
|
= &gs.sym_customizations[which_set][custtype];
|
||||||
|
|
||||||
if ((gdc->custtype == custtype) && gdc->customization_name
|
if ((gdc->custtype == custtype) && gdc->customization_name
|
||||||
&& (strcmp(customization_name, gdc->customization_name) == 0))
|
&& (strcmp(customization_name, gdc->customization_name) == 0))
|
||||||
|
|||||||
+33
-22
@@ -14,7 +14,8 @@ staticfn int moverock(void);
|
|||||||
staticfn void dosinkfall(void);
|
staticfn void dosinkfall(void);
|
||||||
staticfn boolean findtravelpath(int);
|
staticfn boolean findtravelpath(int);
|
||||||
staticfn boolean trapmove(coordxy, coordxy, struct trap *);
|
staticfn boolean trapmove(coordxy, coordxy, struct trap *);
|
||||||
staticfn int QSORTCALLBACK notice_mons_cmp(const genericptr, const genericptr);
|
staticfn int QSORTCALLBACK notice_mons_cmp(const genericptr,
|
||||||
|
const genericptr) NONNULLPTRS;
|
||||||
staticfn schar u_simple_floortyp(coordxy, coordxy);
|
staticfn schar u_simple_floortyp(coordxy, coordxy);
|
||||||
staticfn boolean swim_move_danger(coordxy, coordxy);
|
staticfn boolean swim_move_danger(coordxy, coordxy);
|
||||||
staticfn boolean domove_bump_mon(struct monst *, int) NONNULLARG1;
|
staticfn boolean domove_bump_mon(struct monst *, int) NONNULLARG1;
|
||||||
@@ -483,17 +484,19 @@ moverock(void)
|
|||||||
newsym(sx, sy);
|
newsym(sx, sy);
|
||||||
}
|
}
|
||||||
/* maybe adjust bill if boulder was pushed across shop boundary;
|
/* maybe adjust bill if boulder was pushed across shop boundary;
|
||||||
normally otmp->unpaid would not apply because otmp isn't in hero's
|
normally otmp->unpaid would not apply because otmp isn't in
|
||||||
inventory, but addtobill() sets it and subfrombill() clears it */
|
hero's inventory, but addtobill() sets it and subfrombill()
|
||||||
|
clears it */
|
||||||
if (costly && !costly_spot(rx, ry)) {
|
if (costly && !costly_spot(rx, ry)) {
|
||||||
/* pushing from inside the shop to its boundary (or free spot) */
|
/* pushing from inside shop to its boundary (or free spot) */
|
||||||
addtobill(otmp, FALSE, FALSE, FALSE);
|
addtobill(otmp, FALSE, FALSE, FALSE);
|
||||||
} else if (!costly && costly_spot(rx, ry) && otmp->unpaid
|
} else if (!costly && costly_spot(rx, ry) && otmp->unpaid
|
||||||
&& ((shkp = shop_keeper(*in_rooms(rx, ry, SHOPBASE))) != 0)
|
&& ((shkp = shop_keeper(*in_rooms(rx, ry, SHOPBASE)))
|
||||||
|
!= 0)
|
||||||
&& onshopbill(otmp, shkp, TRUE)) {
|
&& onshopbill(otmp, shkp, TRUE)) {
|
||||||
/* this can happen if hero pushes boulder from farther inside
|
/* this can happen if hero pushes boulder from farther inside
|
||||||
the shop into shop's free spot (which will add it to the bill),
|
shop into shop's free spot (which will add it to the bill),
|
||||||
then teleports or Passes_walls to the doorway (without exiting
|
then teleports or Passes_walls to doorway (without exiting
|
||||||
the shop), and then pushes the boulder from the free spot
|
the shop), and then pushes the boulder from the free spot
|
||||||
back into the shop; it's contingent upon the shopkeeper not
|
back into the shop; it's contingent upon the shopkeeper not
|
||||||
"muttering an incantation" to fracture the boulder while it
|
"muttering an incantation" to fracture the boulder while it
|
||||||
@@ -589,7 +592,7 @@ still_chewing(coordxy x, coordxy y)
|
|||||||
struct obj *boulder = sobj_at(BOULDER, x, y);
|
struct obj *boulder = sobj_at(BOULDER, x, y);
|
||||||
const char *digtxt = (char *) 0, *dmgtxt = (char *) 0;
|
const char *digtxt = (char *) 0, *dmgtxt = (char *) 0;
|
||||||
|
|
||||||
if (svc.context.digging.down) /* not continuing previous dig (w/ pick-axe) */
|
if (svc.context.digging.down) /* not continuing prev dig (w/ pick-axe) */
|
||||||
(void) memset((genericptr_t) &svc.context.digging, 0,
|
(void) memset((genericptr_t) &svc.context.digging, 0,
|
||||||
sizeof (struct dig_info));
|
sizeof (struct dig_info));
|
||||||
|
|
||||||
@@ -967,7 +970,8 @@ test_move(
|
|||||||
You("cannot pass through the bars.");
|
You("cannot pass through the bars.");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
} else if (tunnels(gy.youmonst.data) && !needspick(gy.youmonst.data)) {
|
} else if (tunnels(gy.youmonst.data)
|
||||||
|
&& !needspick(gy.youmonst.data)) {
|
||||||
/* Eat the rock. */
|
/* Eat the rock. */
|
||||||
if (mode == DO_MOVE && still_chewing(x, y))
|
if (mode == DO_MOVE && still_chewing(x, y))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -988,7 +992,8 @@ test_move(
|
|||||||
} else if (flags.mention_walls) {
|
} else if (flags.mention_walls) {
|
||||||
char buf[BUFSZ];
|
char buf[BUFSZ];
|
||||||
int glyph = back_to_glyph(x, y),
|
int glyph = back_to_glyph(x, y),
|
||||||
sym = glyph_is_cmap(glyph) ? glyph_to_cmap(glyph) : -1;
|
sym = glyph_is_cmap(glyph) ? glyph_to_cmap(glyph)
|
||||||
|
: -1;
|
||||||
|
|
||||||
if (sym == S_stone)
|
if (sym == S_stone)
|
||||||
Strcpy(buf, "solid stone");
|
Strcpy(buf, "solid stone");
|
||||||
@@ -1318,12 +1323,13 @@ findtravelpath(int mode)
|
|||||||
|| (!Blind && couldsee(nx, ny)))) {
|
|| (!Blind && couldsee(nx, ny)))) {
|
||||||
if (nx == ux && ny == uy) {
|
if (nx == ux && ny == uy) {
|
||||||
if (mode == TRAVP_TRAVEL || mode == TRAVP_VALID) {
|
if (mode == TRAVP_TRAVEL || mode == TRAVP_VALID) {
|
||||||
boolean visited =
|
boolean visited
|
||||||
selection_getpoint(x, y, gt.travelmap);
|
= selection_getpoint(x, y, gt.travelmap);
|
||||||
u.dx = x - ux;
|
u.dx = x - ux;
|
||||||
u.dy = y - uy;
|
u.dy = y - uy;
|
||||||
if (mode == TRAVP_TRAVEL
|
if (mode == TRAVP_TRAVEL
|
||||||
&& ((x == u.tx && y == u.ty) || visited)) {
|
&& ((x == u.tx && y == u.ty)
|
||||||
|
|| visited)) {
|
||||||
nomul(0);
|
nomul(0);
|
||||||
/* reset run so domove run checks work */
|
/* reset run so domove run checks work */
|
||||||
svc.context.run = 8;
|
svc.context.run = 8;
|
||||||
@@ -1333,7 +1339,8 @@ findtravelpath(int mode)
|
|||||||
iflags.travelcc.x
|
iflags.travelcc.x
|
||||||
= iflags.travelcc.y = 0;
|
= iflags.travelcc.y = 0;
|
||||||
}
|
}
|
||||||
selection_setpoint(u.ux, u.uy, gt.travelmap, 1);
|
selection_setpoint(u.ux, u.uy,
|
||||||
|
gt.travelmap, 1);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
} else if (!travel[nx][ny]) {
|
} else if (!travel[nx][ny]) {
|
||||||
@@ -1687,7 +1694,8 @@ notice_all_mons(boolean reset)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (i) {
|
if (i) {
|
||||||
qsort((genericptr_t) arr, (size_t) i, sizeof *arr, notice_mons_cmp);
|
qsort((genericptr_t) arr, (size_t) i, sizeof *arr,
|
||||||
|
notice_mons_cmp);
|
||||||
|
|
||||||
for (j = 0; j < i; j++)
|
for (j = 0; j < i; j++)
|
||||||
notice_mon(arr[j]);
|
notice_mon(arr[j]);
|
||||||
@@ -2060,7 +2068,7 @@ domove_swap_with_pet(struct monst *mtmp, coordxy x, coordxy y)
|
|||||||
|| t_at(u.ux0, u.uy0) != NULL
|
|| t_at(u.ux0, u.uy0) != NULL
|
||||||
|| mundisplaceable(mtmp))) {
|
|| mundisplaceable(mtmp))) {
|
||||||
/* displacing peaceful into unsafe or trapped space, or trying to
|
/* displacing peaceful into unsafe or trapped space, or trying to
|
||||||
displace quest leader, Oracle, shopkeeper, priest, or vault guard */
|
displace quest leader, Oracle, shk, priest, or vault guard */
|
||||||
You("stop. %s doesn't want to swap places.", YMonnam(mtmp));
|
You("stop. %s doesn't want to swap places.", YMonnam(mtmp));
|
||||||
didnt_move = TRUE;
|
didnt_move = TRUE;
|
||||||
} else {
|
} else {
|
||||||
@@ -2145,7 +2153,8 @@ domove_fight_empty(coordxy x, coordxy y)
|
|||||||
/* specifying 'F' with no monster wastes a turn */
|
/* specifying 'F' with no monster wastes a turn */
|
||||||
if (svc.context.forcefight
|
if (svc.context.forcefight
|
||||||
/* remembered an 'I' && didn't use a move command */
|
/* remembered an 'I' && didn't use a move command */
|
||||||
|| (glyph_is_invisible(glyph) && !m_at(x, y) && !svc.context.nopick)) {
|
|| (glyph_is_invisible(glyph) && !m_at(x, y)
|
||||||
|
&& !svc.context.nopick)) {
|
||||||
struct obj *boulder = 0;
|
struct obj *boulder = 0;
|
||||||
boolean explo = (Upolyd && attacktype(gy.youmonst.data, AT_EXPL)),
|
boolean explo = (Upolyd && attacktype(gy.youmonst.data, AT_EXPL)),
|
||||||
solid = (off_edge || (!accessible(x, y)
|
solid = (off_edge || (!accessible(x, y)
|
||||||
@@ -2225,7 +2234,7 @@ domove_fight_empty(coordxy x, coordxy y)
|
|||||||
nomul(0);
|
nomul(0);
|
||||||
if (explo) {
|
if (explo) {
|
||||||
struct attack *attk
|
struct attack *attk
|
||||||
= attacktype_fordmg(gy.youmonst.data, AT_EXPL, AD_ANY);
|
= attacktype_fordmg(gy.youmonst.data, AT_EXPL, AD_ANY);
|
||||||
|
|
||||||
/* no monster has been attacked so we have bypassed explum() */
|
/* no monster has been attacked so we have bypassed explum() */
|
||||||
wake_nearto(u.ux, u.uy, 7 * 7); /* same radius as explum() */
|
wake_nearto(u.ux, u.uy, 7 * 7); /* same radius as explum() */
|
||||||
@@ -2775,7 +2784,8 @@ domove_core(void)
|
|||||||
|
|
||||||
if (mtmp) {
|
if (mtmp) {
|
||||||
if (displaceu) {
|
if (displaceu) {
|
||||||
boolean noticed_it = (canspotmon(mtmp) || glyph_is_invisible(glyph)
|
boolean noticed_it = (canspotmon(mtmp)
|
||||||
|
|| glyph_is_invisible(glyph)
|
||||||
|| glyph_is_warning(glyph));
|
|| glyph_is_warning(glyph));
|
||||||
|
|
||||||
remove_monster(u.ux, u.uy);
|
remove_monster(u.ux, u.uy);
|
||||||
@@ -2810,7 +2820,7 @@ domove_core(void)
|
|||||||
&& !(is_hider(mtmp->data) && mtmp->mundetected)) {
|
&& !(is_hider(mtmp->data) && mtmp->mundetected)) {
|
||||||
if (!domove_swap_with_pet(mtmp, x, y)) {
|
if (!domove_swap_with_pet(mtmp, x, y)) {
|
||||||
u.ux = u.ux0, u.uy = u.uy0; /* didn't move after all */
|
u.ux = u.ux0, u.uy = u.uy0; /* didn't move after all */
|
||||||
/* could skip this bit since we're about to call u_on_newpos() */
|
/* could skip this since we're about to call u_on_newpos() */
|
||||||
if (u.usteed)
|
if (u.usteed)
|
||||||
u.usteed->mx = u.ux, u.usteed->my = u.uy;
|
u.usteed->mx = u.ux, u.usteed->my = u.uy;
|
||||||
}
|
}
|
||||||
@@ -3739,7 +3749,8 @@ lookaround(void)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* stop for traps, sometimes */
|
/* stop for traps, sometimes */
|
||||||
if (avoid_moving_on_trap(x, y, (infront && svc.context.run > 1))) {
|
if (avoid_moving_on_trap(x, y,
|
||||||
|
(infront && svc.context.run > 1))) {
|
||||||
if (svc.context.run == 1)
|
if (svc.context.run == 1)
|
||||||
goto bcorr; /* if you must */
|
goto bcorr; /* if you must */
|
||||||
if (infront)
|
if (infront)
|
||||||
@@ -3762,7 +3773,7 @@ lookaround(void)
|
|||||||
}
|
}
|
||||||
goto stop;
|
goto stop;
|
||||||
}
|
}
|
||||||
/* we're orthogonal to a closed door, consider it a corridor */
|
/* orthogonal to a closed door, consider it a corridor */
|
||||||
goto bcorr;
|
goto bcorr;
|
||||||
} else if (levl[x][y].typ == CORR) {
|
} else if (levl[x][y].typ == CORR) {
|
||||||
/* corridor */
|
/* corridor */
|
||||||
|
|||||||
+15
-16
@@ -106,7 +106,8 @@ static struct ll_achieve_msg achieve_msg [] = {
|
|||||||
#define you_are(attr, ps) enl_msg(You_, are, were, (attr), (ps))
|
#define you_are(attr, ps) enl_msg(You_, are, were, (attr), (ps))
|
||||||
#define you_have(attr, ps) enl_msg(You_, have, had, (attr), (ps))
|
#define you_have(attr, ps) enl_msg(You_, have, had, (attr), (ps))
|
||||||
#define you_can(attr, ps) enl_msg(You_, can, could, (attr), (ps))
|
#define you_can(attr, ps) enl_msg(You_, can, could, (attr), (ps))
|
||||||
#define you_have_been(goodthing) enl_msg(You_, have_been, were, (goodthing), "")
|
#define you_have_been(goodthing) \
|
||||||
|
enl_msg(You_, have_been, were, (goodthing), "")
|
||||||
#define you_have_never(badthing) \
|
#define you_have_never(badthing) \
|
||||||
enl_msg(You_, have_never, never, (badthing), "")
|
enl_msg(You_, have_never, never, (badthing), "")
|
||||||
#define you_have_X(something) \
|
#define you_have_X(something) \
|
||||||
@@ -603,7 +604,8 @@ background_enlightenment(int unused_mode UNUSED, int final)
|
|||||||
you_have("just started your adventure", "");
|
you_have("just started your adventure", "");
|
||||||
} else {
|
} else {
|
||||||
/* 'turns' grates on the nerves in this context... */
|
/* 'turns' grates on the nerves in this context... */
|
||||||
Sprintf(buf, "the dungeon %ld turn%s ago", svm.moves, plur(svm.moves));
|
Sprintf(buf, "the dungeon %ld turn%s ago",
|
||||||
|
svm.moves, plur(svm.moves));
|
||||||
/* same phrasing for current and final: "entered" is unconditional */
|
/* same phrasing for current and final: "entered" is unconditional */
|
||||||
enlght_line(You_, "entered ", buf, "");
|
enlght_line(You_, "entered ", buf, "");
|
||||||
}
|
}
|
||||||
@@ -1501,7 +1503,8 @@ attributes_enlightenment(
|
|||||||
item_resistance_message(AD_DISN, " protected from disintegration", final);
|
item_resistance_message(AD_DISN, " protected from disintegration", final);
|
||||||
if (Shock_resistance)
|
if (Shock_resistance)
|
||||||
you_are("shock resistant", from_what(SHOCK_RES));
|
you_are("shock resistant", from_what(SHOCK_RES));
|
||||||
item_resistance_message(AD_ELEC, " protected from electric shocks", final);
|
item_resistance_message(AD_ELEC, " protected from electric shocks",
|
||||||
|
final);
|
||||||
if (Poison_resistance)
|
if (Poison_resistance)
|
||||||
you_are("poison resistant", from_what(POISON_RES));
|
you_are("poison resistant", from_what(POISON_RES));
|
||||||
if (Acid_resistance) {
|
if (Acid_resistance) {
|
||||||
@@ -1548,23 +1551,19 @@ attributes_enlightenment(
|
|||||||
Sprintf(buf, "aware of the presence of %s",
|
Sprintf(buf, "aware of the presence of %s",
|
||||||
(svc.context.warntype.obj & M2_ORC) ? "orcs"
|
(svc.context.warntype.obj & M2_ORC) ? "orcs"
|
||||||
: (svc.context.warntype.obj & M2_ELF) ? "elves"
|
: (svc.context.warntype.obj & M2_ELF) ? "elves"
|
||||||
: (svc.context.warntype.obj & M2_DEMON) ? "demons" : something);
|
: (svc.context.warntype.obj & M2_DEMON) ? "demons"
|
||||||
|
: something);
|
||||||
you_are(buf, from_what(WARN_OF_MON));
|
you_are(buf, from_what(WARN_OF_MON));
|
||||||
}
|
}
|
||||||
if (Warn_of_mon && svc.context.warntype.polyd) {
|
if (Warn_of_mon && svc.context.warntype.polyd) {
|
||||||
Sprintf(buf, "aware of the presence of %s",
|
Sprintf(buf, "aware of the presence of %s",
|
||||||
((svc.context.warntype.polyd & (M2_HUMAN | M2_ELF))
|
((svc.context.warntype.polyd & (M2_HUMAN | M2_ELF))
|
||||||
== (M2_HUMAN | M2_ELF))
|
== (M2_HUMAN | M2_ELF)) ? "humans and elves"
|
||||||
? "humans and elves"
|
: (svc.context.warntype.polyd & M2_HUMAN) ? "humans"
|
||||||
: (svc.context.warntype.polyd & M2_HUMAN)
|
: (svc.context.warntype.polyd & M2_ELF) ? "elves"
|
||||||
? "humans"
|
: (svc.context.warntype.polyd & M2_ORC) ? "orcs"
|
||||||
: (svc.context.warntype.polyd & M2_ELF)
|
: (svc.context.warntype.polyd & M2_DEMON) ? "demons"
|
||||||
? "elves"
|
: "certain monsters");
|
||||||
: (svc.context.warntype.polyd & M2_ORC)
|
|
||||||
? "orcs"
|
|
||||||
: (svc.context.warntype.polyd & M2_DEMON)
|
|
||||||
? "demons"
|
|
||||||
: "certain monsters");
|
|
||||||
you_are(buf, "");
|
you_are(buf, "");
|
||||||
}
|
}
|
||||||
warnspecies = svc.context.warntype.speciesidx;
|
warnspecies = svc.context.warntype.speciesidx;
|
||||||
@@ -2800,7 +2799,7 @@ list_vanquished(char defquery, boolean ask)
|
|||||||
if (c == 'q')
|
if (c == 'q')
|
||||||
done_stopprint++;
|
done_stopprint++;
|
||||||
if (c == 'y' || c == 'a') {
|
if (c == 'y' || c == 'a') {
|
||||||
if (c == 'a' && ntypes > 1) { /* ask player to choose sort order */
|
if (c == 'a' && ntypes > 1) { /* ask user to choose sort order */
|
||||||
/* choose value for vanq_sortmode via menu; ESC cancels list
|
/* choose value for vanq_sortmode via menu; ESC cancels list
|
||||||
of vanquished monsters but does not set 'done_stopprint' */
|
of vanquished monsters but does not set 'done_stopprint' */
|
||||||
if (set_vanq_order(TRUE) < 0)
|
if (set_vanq_order(TRUE) < 0)
|
||||||
|
|||||||
+25
-14
@@ -404,7 +404,8 @@ invletter_value(char c)
|
|||||||
: ('A' <= c && c <= 'Z') ? (c - 'A' + 2 + 26)
|
: ('A' <= c && c <= 'Z') ? (c - 'A' + 2 + 26)
|
||||||
: (c == '$') ? 1
|
: (c == '$') ? 1
|
||||||
: (c == '#') ? 1 + invlet_basic + 1
|
: (c == '#') ? 1 + invlet_basic + 1
|
||||||
: 1 + invlet_basic + 1 + 1; /* none of the above (shouldn't happen) */
|
: 1 + invlet_basic + 1 + 1; /* none of the above
|
||||||
|
* (shouldn't happen) */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* qsort comparison routine for sortloot() */
|
/* qsort comparison routine for sortloot() */
|
||||||
@@ -1006,11 +1007,11 @@ addinv_core1(struct obj *obj)
|
|||||||
dumplog, originally just recorded in XLOGFILE */
|
dumplog, originally just recorded in XLOGFILE */
|
||||||
if (is_mines_prize(obj)) {
|
if (is_mines_prize(obj)) {
|
||||||
record_achievement(ACH_MINE_PRIZE);
|
record_achievement(ACH_MINE_PRIZE);
|
||||||
svc.context.achieveo.mines_prize_oid = 0; /* done with luckstone o_id */
|
svc.context.achieveo.mines_prize_oid = 0; /* done w/ luckstone o_id */
|
||||||
obj->nomerge = 0; /* was set in create_object(sp_lev.c) */
|
obj->nomerge = 0; /* was set in create_object(sp_lev.c) */
|
||||||
} else if (is_soko_prize(obj)) {
|
} else if (is_soko_prize(obj)) {
|
||||||
record_achievement(ACH_SOKO_PRIZE);
|
record_achievement(ACH_SOKO_PRIZE);
|
||||||
svc.context.achieveo.soko_prize_oid = 0; /* done with bag/amulet o_id */
|
svc.context.achieveo.soko_prize_oid = 0; /* done w/ bag/amulet o_id */
|
||||||
obj->nomerge = 0; /* (got set in sp_lev.c) */
|
obj->nomerge = 0; /* (got set in sp_lev.c) */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1794,8 +1795,9 @@ getobj(
|
|||||||
*bp++ = ' '; /* put a space after the '-' in the prompt */
|
*bp++ = ' '; /* put a space after the '-' in the prompt */
|
||||||
break;
|
break;
|
||||||
case GETOBJ_DOWNPLAY: /* acceptable but not shown as likely choice */
|
case GETOBJ_DOWNPLAY: /* acceptable but not shown as likely choice */
|
||||||
case GETOBJ_EXCLUDE_INACCESS: /* nothing currently gives this for '-' but
|
case GETOBJ_EXCLUDE_INACCESS: /* nothing currently gives this for '-'
|
||||||
* theoretically could if wearing gloves */
|
* but theoretically could if wearing
|
||||||
|
* gloves */
|
||||||
case GETOBJ_EXCLUDE_SELECTABLE: /* ditto, I think... */
|
case GETOBJ_EXCLUDE_SELECTABLE: /* ditto, I think... */
|
||||||
allownone = TRUE;
|
allownone = TRUE;
|
||||||
*ap++ = HANDS_SYM;
|
*ap++ = HANDS_SYM;
|
||||||
@@ -2186,7 +2188,8 @@ ggetobj(const char *word, int (*fn)(OBJ_P), int mx,
|
|||||||
ofilter = not_fully_identified;
|
ofilter = not_fully_identified;
|
||||||
}
|
}
|
||||||
|
|
||||||
iletct = collect_obj_classes(ilets, gi.invent, FALSE, ofilter, &itemcount);
|
iletct = collect_obj_classes(ilets, gi.invent, FALSE, ofilter,
|
||||||
|
&itemcount);
|
||||||
unpaid = count_unpaid(gi.invent);
|
unpaid = count_unpaid(gi.invent);
|
||||||
|
|
||||||
if (ident && !iletct) {
|
if (ident && !iletct) {
|
||||||
@@ -3119,11 +3122,13 @@ itemactions(struct obj *otmp)
|
|||||||
if (otmp->oclass == COIN_CLASS)
|
if (otmp->oclass == COIN_CLASS)
|
||||||
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Flip a coin");
|
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Flip a coin");
|
||||||
else if (otmp->otyp == CREAM_PIE)
|
else if (otmp->otyp == CREAM_PIE)
|
||||||
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Hit yourself with this cream pie");
|
ia_addmenu(win, IA_APPLY_OBJ, 'a',
|
||||||
|
"Hit yourself with this cream pie");
|
||||||
else if (otmp->otyp == BULLWHIP)
|
else if (otmp->otyp == BULLWHIP)
|
||||||
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Lash out with this whip");
|
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Lash out with this whip");
|
||||||
else if (otmp->otyp == GRAPPLING_HOOK)
|
else if (otmp->otyp == GRAPPLING_HOOK)
|
||||||
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Grapple something with this hook");
|
ia_addmenu(win, IA_APPLY_OBJ, 'a',
|
||||||
|
"Grapple something with this hook");
|
||||||
else if (otmp->otyp == BAG_OF_TRICKS && objects[otmp->otyp].oc_name_known)
|
else if (otmp->otyp == BAG_OF_TRICKS && objects[otmp->otyp].oc_name_known)
|
||||||
/* bag of tricks skips this unless discovered */
|
/* bag of tricks skips this unless discovered */
|
||||||
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Reach into this bag");
|
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Reach into this bag");
|
||||||
@@ -3187,7 +3192,8 @@ itemactions(struct obj *otmp)
|
|||||||
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Make this figurine transform");
|
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Make this figurine transform");
|
||||||
else if (otmp->otyp == UNICORN_HORN)
|
else if (otmp->otyp == UNICORN_HORN)
|
||||||
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Use this unicorn horn");
|
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Use this unicorn horn");
|
||||||
else if (otmp->otyp == HORN_OF_PLENTY && objects[otmp->otyp].oc_name_known)
|
else if (otmp->otyp == HORN_OF_PLENTY
|
||||||
|
&& objects[otmp->otyp].oc_name_known)
|
||||||
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Blow into the horn of plenty");
|
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Blow into the horn of plenty");
|
||||||
else if (otmp->otyp >= WOODEN_FLUTE && otmp->otyp <= DRUM_OF_EARTHQUAKE)
|
else if (otmp->otyp >= WOODEN_FLUTE && otmp->otyp <= DRUM_OF_EARTHQUAKE)
|
||||||
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Play this musical instrument");
|
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Play this musical instrument");
|
||||||
@@ -3417,7 +3423,8 @@ itemactions(struct obj *otmp)
|
|||||||
ia_addmenu(win, IA_SWAPWEAPON, 'x',
|
ia_addmenu(win, IA_SWAPWEAPON, 'x',
|
||||||
"Ready this as an alternate weapon");
|
"Ready this as an alternate weapon");
|
||||||
else if (otmp == uswapwep)
|
else if (otmp == uswapwep)
|
||||||
ia_addmenu(win, IA_SWAPWEAPON, 'x', "Swap this with your main weapon");
|
ia_addmenu(win, IA_SWAPWEAPON, 'x',
|
||||||
|
"Swap this with your main weapon");
|
||||||
|
|
||||||
/* this is based on TWOWEAPOK() in wield.c; we don't call can_two_weapon()
|
/* this is based on TWOWEAPOK() in wield.c; we don't call can_two_weapon()
|
||||||
because it is very verbose; attempting to two-weapon might be rejected
|
because it is very verbose; attempting to two-weapon might be rejected
|
||||||
@@ -3997,7 +4004,8 @@ display_used_invlets(char avoidlet)
|
|||||||
tmpglyph = obj_to_glyph(otmp, rn2_on_display_rng);
|
tmpglyph = obj_to_glyph(otmp, rn2_on_display_rng);
|
||||||
map_glyphinfo(0, 0, tmpglyph, 0U, &tmpglyphinfo);
|
map_glyphinfo(0, 0, tmpglyph, 0U, &tmpglyphinfo);
|
||||||
add_menu(win, &tmpglyphinfo, &any, ilet, 0,
|
add_menu(win, &tmpglyphinfo, &any, ilet, 0,
|
||||||
ATR_NONE, clr, doname(otmp), MENU_ITEMFLAGS_NONE);
|
ATR_NONE, clr, doname(otmp),
|
||||||
|
MENU_ITEMFLAGS_NONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (flags.sortpack && *++invlet)
|
if (flags.sortpack && *++invlet)
|
||||||
@@ -4866,7 +4874,8 @@ stackobj(struct obj *obj)
|
|||||||
{
|
{
|
||||||
struct obj *otmp;
|
struct obj *otmp;
|
||||||
|
|
||||||
for (otmp = svl.level.objects[obj->ox][obj->oy]; otmp; otmp = otmp->nexthere)
|
for (otmp = svl.level.objects[obj->ox][obj->oy]; otmp;
|
||||||
|
otmp = otmp->nexthere)
|
||||||
if (otmp != obj && merged(&obj, &otmp))
|
if (otmp != obj && merged(&obj, &otmp))
|
||||||
break;
|
break;
|
||||||
return;
|
return;
|
||||||
@@ -5565,7 +5574,7 @@ doorganize_core(struct obj *obj)
|
|||||||
char let;
|
char let;
|
||||||
#define GOLD_INDX 0
|
#define GOLD_INDX 0
|
||||||
#define GOLD_OFFSET 1
|
#define GOLD_OFFSET 1
|
||||||
#define OVRFLW_INDX (GOLD_OFFSET + invlet_basic) /* past gold & 2*26 letters */
|
#define OVRFLW_INDX (GOLD_OFFSET + invlet_basic) /* past gold+2*26 letters */
|
||||||
char lets[1 + invlet_basic + 1 + 1]; /* room for '$a-zA-Z#\0' */
|
char lets[1 + invlet_basic + 1 + 1]; /* room for '$a-zA-Z#\0' */
|
||||||
char qbuf[QBUFSZ];
|
char qbuf[QBUFSZ];
|
||||||
char *objname, *otmpname;
|
char *objname, *otmpname;
|
||||||
@@ -5671,7 +5680,9 @@ doorganize_core(struct obj *obj)
|
|||||||
|
|
||||||
collect = (let == obj->invlet);
|
collect = (let == obj->invlet);
|
||||||
/* change the inventory and print the resulting item */
|
/* change the inventory and print the resulting item */
|
||||||
adj_type = collect ? "Collecting:" : !splitting ? "Moving:" : "Splitting:";
|
adj_type = collect ? "Collecting:"
|
||||||
|
: !splitting ? "Moving:"
|
||||||
|
: "Splitting:";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* don't use freeinv/addinv to avoid double-touching artifacts,
|
* don't use freeinv/addinv to avoid double-touching artifacts,
|
||||||
|
|||||||
Reference in New Issue
Block a user