misc core formatting
Some of these are post-3.6.0, some just got overlooked before the 3.6.0 release.
This commit is contained in:
@@ -952,8 +952,8 @@ int how;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((wizard || discover) && (how <= GENOCIDED) &&
|
if ((wizard || discover) && (how <= GENOCIDED)
|
||||||
!paranoid_query(ParanoidDie, "Die?")) {
|
&& !paranoid_query(ParanoidDie, "Die?")) {
|
||||||
pline("OK, so you don't %s.", (how == CHOKING) ? "choke" : "die");
|
pline("OK, so you don't %s.", (how == CHOKING) ? "choke" : "die");
|
||||||
savelife(how);
|
savelife(how);
|
||||||
killer.name[0] = 0;
|
killer.name[0] = 0;
|
||||||
|
|||||||
@@ -2383,8 +2383,9 @@ struct monst *mtmp;
|
|||||||
SUPPRESS_SADDLE | SUPPRESS_HALLUCINATION
|
SUPPRESS_SADDLE | SUPPRESS_HALLUCINATION
|
||||||
| SUPPRESS_INVISIBLE | SUPPRESS_IT,
|
| SUPPRESS_INVISIBLE | SUPPRESS_IT,
|
||||||
FALSE),
|
FALSE),
|
||||||
amorphous(mtmp->data) ? "coalesces on the" :
|
amorphous(mtmp->data) ? "coalesces on the"
|
||||||
is_flyer(mtmp->data) ? "drops to the" : "writhes on the",
|
: is_flyer(mtmp->data) ? "drops to the"
|
||||||
|
: "writhes on the",
|
||||||
surface(x,y));
|
surface(x,y));
|
||||||
mtmp->mcanmove = 1;
|
mtmp->mcanmove = 1;
|
||||||
mtmp->mfrozen = 0;
|
mtmp->mfrozen = 0;
|
||||||
|
|||||||
+11
-10
@@ -526,10 +526,9 @@ boolean user_typed_name, without_asking;
|
|||||||
/*
|
/*
|
||||||
* If the object is named, then the name is the alternate description;
|
* If the object is named, then the name is the alternate description;
|
||||||
* otherwise, the result of makesingular() applied to the name is.
|
* otherwise, the result of makesingular() applied to the name is.
|
||||||
* This
|
* This isn't strictly optimal, but named objects of interest to the
|
||||||
* isn't strictly optimal, but named objects of interest to the user
|
* user will usually be found under their name, rather than under
|
||||||
* will usually be found under their name, rather than under their
|
* their object type, so looking for a singular form is pointless.
|
||||||
* object type, so looking for a singular form is pointless.
|
|
||||||
*/
|
*/
|
||||||
if (!alt)
|
if (!alt)
|
||||||
alt = makesingular(dbase_str);
|
alt = makesingular(dbase_str);
|
||||||
@@ -565,10 +564,11 @@ boolean user_typed_name, without_asking;
|
|||||||
if (!(ep = index(buf, '\n')))
|
if (!(ep = index(buf, '\n')))
|
||||||
goto bad_data_file;
|
goto bad_data_file;
|
||||||
(void) strip_newline((ep > buf) ? ep - 1 : ep);
|
(void) strip_newline((ep > buf) ? ep - 1 : ep);
|
||||||
/* if we match a key that begins with "~", skip this entry */
|
/* if we match a key that begins with "~", skip
|
||||||
|
this entry */
|
||||||
chk_skip = (*buf == '~') ? 1 : 0;
|
chk_skip = (*buf == '~') ? 1 : 0;
|
||||||
if ((pass == 0 && pmatch(&buf[chk_skip], dbase_str)) ||
|
if ((pass == 0 && pmatch(&buf[chk_skip], dbase_str))
|
||||||
(pass == 1 && alt && pmatch(&buf[chk_skip], alt))) {
|
|| (pass == 1 && alt && pmatch(&buf[chk_skip], alt))) {
|
||||||
if (chk_skip) {
|
if (chk_skip) {
|
||||||
skipping_entry = TRUE;
|
skipping_entry = TRUE;
|
||||||
continue;
|
continue;
|
||||||
@@ -592,7 +592,7 @@ boolean user_typed_name, without_asking;
|
|||||||
if (sscanf(buf, "%ld,%d\n", &entry_offset, &entry_count) < 2) {
|
if (sscanf(buf, "%ld,%d\n", &entry_offset, &entry_count) < 2) {
|
||||||
bad_data_file:
|
bad_data_file:
|
||||||
impossible("'data' file in wrong format or corrupted");
|
impossible("'data' file in wrong format or corrupted");
|
||||||
/* window will exist if we came here from below via 'goto' */
|
/* window will exist if came here from below via 'goto' */
|
||||||
if (datawin != WIN_ERR)
|
if (datawin != WIN_ERR)
|
||||||
destroy_nhwindow(datawin);
|
destroy_nhwindow(datawin);
|
||||||
(void) dlb_fclose(fp);
|
(void) dlb_fclose(fp);
|
||||||
@@ -604,6 +604,7 @@ boolean user_typed_name, without_asking;
|
|||||||
unsigned maxt = strlen("More info about \"\"?");
|
unsigned maxt = strlen("More info about \"\"?");
|
||||||
char *entrytext = pass ? alt : dbase_str;
|
char *entrytext = pass ? alt : dbase_str;
|
||||||
char question[BUFSZ];
|
char question[BUFSZ];
|
||||||
|
|
||||||
if (strlen(entrytext) < BUFSZ - maxt) {
|
if (strlen(entrytext) < BUFSZ - maxt) {
|
||||||
Strcpy(question, "More info about \"");
|
Strcpy(question, "More info about \"");
|
||||||
Strcat(question, entrytext);
|
Strcat(question, entrytext);
|
||||||
@@ -614,8 +615,8 @@ boolean user_typed_name, without_asking;
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (user_typed_name || without_asking || yes_to_moreinfo) {
|
if (user_typed_name || without_asking || yes_to_moreinfo) {
|
||||||
if (dlb_fseek(fp,
|
if (dlb_fseek(fp, (long) txt_offset + entry_offset,
|
||||||
(long) txt_offset + entry_offset, SEEK_SET) < 0) {
|
SEEK_SET) < 0) {
|
||||||
pline("? Seek error on 'data' file!");
|
pline("? Seek error on 'data' file!");
|
||||||
(void) dlb_fclose(fp);
|
(void) dlb_fclose(fp);
|
||||||
return;
|
return;
|
||||||
|
|||||||
+2
-2
@@ -1839,8 +1839,8 @@ reverse_loot()
|
|||||||
boxdummy = zeroobj, boxdummy.otyp = SPE_WIZARD_LOCK;
|
boxdummy = zeroobj, boxdummy.otyp = SPE_WIZARD_LOCK;
|
||||||
(void) boxlock(coffers, &boxdummy);
|
(void) boxlock(coffers, &boxdummy);
|
||||||
}
|
}
|
||||||
} else if (levl[x][y].looted != T_LOOTED &&
|
} else if (levl[x][y].looted != T_LOOTED
|
||||||
(mon = makemon(courtmon(), x, y, NO_MM_FLAGS)) != 0) {
|
&& (mon = makemon(courtmon(), x, y, NO_MM_FLAGS)) != 0) {
|
||||||
freeinv(goldob);
|
freeinv(goldob);
|
||||||
add_to_minv(mon, goldob);
|
add_to_minv(mon, goldob);
|
||||||
pline("The exchequer accepts your contribution.");
|
pline("The exchequer accepts your contribution.");
|
||||||
|
|||||||
+2
-2
@@ -377,8 +377,8 @@ invault()
|
|||||||
}
|
}
|
||||||
trycount = 5;
|
trycount = 5;
|
||||||
do {
|
do {
|
||||||
getlin(Deaf ? "You are required to supply your name. -" :
|
getlin(Deaf ? "You are required to supply your name. -"
|
||||||
"\"Hello stranger, who are you?\" -", buf);
|
: "\"Hello stranger, who are you?\" -", buf);
|
||||||
(void) mungspaces(buf);
|
(void) mungspaces(buf);
|
||||||
} while (!buf[0] && --trycount > 0);
|
} while (!buf[0] && --trycount > 0);
|
||||||
|
|
||||||
|
|||||||
@@ -577,9 +577,9 @@ coord *cc;
|
|||||||
if (mtmp->m_id) {
|
if (mtmp->m_id) {
|
||||||
mtmp2->m_id = mtmp->m_id;
|
mtmp2->m_id = mtmp->m_id;
|
||||||
/* might be bringing quest leader back to life */
|
/* might be bringing quest leader back to life */
|
||||||
if (quest_status.leader_is_dead &&
|
if (quest_status.leader_is_dead
|
||||||
/* leader_is_dead implies leader_m_id is valid */
|
/* leader_is_dead implies leader_m_id is valid */
|
||||||
mtmp2->m_id == quest_status.leader_m_id)
|
&& mtmp2->m_id == quest_status.leader_m_id)
|
||||||
quest_status.leader_is_dead = FALSE;
|
quest_status.leader_is_dead = FALSE;
|
||||||
}
|
}
|
||||||
mtmp2->mx = mtmp->mx;
|
mtmp2->mx = mtmp->mx;
|
||||||
@@ -708,16 +708,16 @@ boolean by_hero;
|
|||||||
break; /* x,y are 0 */
|
break; /* x,y are 0 */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!x || !y ||
|
if (!x || !y
|
||||||
/* Rules for revival from containers:
|
/* Rules for revival from containers:
|
||||||
- the container cannot be locked
|
* - the container cannot be locked
|
||||||
- the container cannot be heavily nested (>2 is arbitrary)
|
* - the container cannot be heavily nested (>2 is arbitrary)
|
||||||
- the container cannot be a statue or bag of holding
|
* - the container cannot be a statue or bag of holding
|
||||||
(except in very rare cases for the latter)
|
* (except in very rare cases for the latter)
|
||||||
*/
|
*/
|
||||||
(container && (container->olocked || container_nesting > 2
|
|| (container && (container->olocked || container_nesting > 2
|
||||||
|| container->otyp == STATUE
|
|| container->otyp == STATUE
|
||||||
|| (container->otyp == BAG_OF_HOLDING && rn2(40)))))
|
|| (container->otyp == BAG_OF_HOLDING && rn2(40)))))
|
||||||
return (struct monst *) 0;
|
return (struct monst *) 0;
|
||||||
|
|
||||||
/* record the object's location now that we're sure where it is */
|
/* record the object's location now that we're sure where it is */
|
||||||
@@ -2695,10 +2695,10 @@ struct obj *obj; /* wand or spell */
|
|||||||
if (is_db_wall(x, y) && find_drawbridge(&xx, &yy)) {
|
if (is_db_wall(x, y) && find_drawbridge(&xx, &yy)) {
|
||||||
open_drawbridge(xx, yy);
|
open_drawbridge(xx, yy);
|
||||||
disclose = TRUE;
|
disclose = TRUE;
|
||||||
} else if (u.dz > 0 && (x == xdnstair && y == ydnstair) &&
|
} else if (u.dz > 0 && (x == xdnstair && y == ydnstair)
|
||||||
/* can't use the stairs down to quest level 2 until
|
/* can't use the stairs down to quest level 2 until
|
||||||
leader "unlocks" them; give feedback if you try */
|
leader "unlocks" them; give feedback if you try */
|
||||||
on_level(&u.uz, &qstart_level) && !ok_to_quest()) {
|
&& on_level(&u.uz, &qstart_level) && !ok_to_quest()) {
|
||||||
pline_The("stairs seem to ripple momentarily.");
|
pline_The("stairs seem to ripple momentarily.");
|
||||||
disclose = TRUE;
|
disclose = TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user