some miscellaneous formatting and comments

Clear out some miscellaneous changes that have been sitting around
for a while.
This commit is contained in:
PatR
2024-08-27 13:59:57 -07:00
parent 0ce02a7224
commit 8085d03898
3 changed files with 26 additions and 15 deletions

View File

@@ -242,7 +242,7 @@ losestr(int num, const char *knam, schar k_format)
losehp(dmg, knam, k_format);
if (Upolyd) {
/* if still polymorphed, reduce you-as-monst maxHP; never below 1 */
/* when still poly'd, reduce you-as-monst maxHP; never below 1 */
u.mhmax -= min(dmg, u.mhmax - 1);
} else if (!waspolyd) {
/* not polymorphed now and didn't rehumanize when taking damage;

View File

@@ -937,8 +937,7 @@ fuzzer_savelife(int how)
* Some debugging code pulled out of done() to unclutter it.
* 'done_seq' is maintained in done().
*/
if (!program_state.panicking
&& how != PANICKED && how != TRICKED) {
if (!program_state.panicking && how != PANICKED && how != TRICKED) {
savelife(how);
/* periodically restore characteristics plus lost experience
@@ -986,11 +985,14 @@ fuzzer_savelife(int how)
svk.killer.name[0] = '\0';
svk.killer.format = 0;
/* Guard against getting stuck in a loop if we die in one of
/*
* Guard against getting stuck in a loop if we die in one of
* the few ways where life-saving isn't effective (cited case
* was burning in lava when the level was too full to allow
* teleporting to safety). Deal with it by recreating
* the level, if we're in wizmode */
* teleporting to safety). Deal with it by recreating the level
* if we're in wizmode (always the case for debug_fuzzer unless
* player has used a debugger to fiddle with 'iflags' bits).
*/
if (gd.done_seq++ > gh.hero_seq + 100L) {
if (!wizard)
return FALSE; /* can't deal with it */

View File

@@ -308,8 +308,10 @@ is_exclusion_zone(xint16 type, coordxy x, coordxy y)
struct exclusion_zone *ez = sve.exclusion_zones;
while (ez) {
if (((type == LR_DOWNTELE && (ez->zonetype == LR_DOWNTELE || ez->zonetype == LR_TELE))
|| (type == LR_UPTELE && (ez->zonetype == LR_UPTELE || ez->zonetype == LR_TELE))
if (((type == LR_DOWNTELE
&& (ez->zonetype == LR_DOWNTELE || ez->zonetype == LR_TELE))
|| (type == LR_UPTELE
&& (ez->zonetype == LR_UPTELE || ez->zonetype == LR_TELE))
|| type == ez->zonetype)
&& within_bounded_area(x, y, ez->lx, ez->ly, ez->hx, ez->hy))
return TRUE;
@@ -406,7 +408,8 @@ put_lregion_here(
{
struct monst *mtmp;
if (bad_location(x, y, nlx, nly, nhx, nhy) || is_exclusion_zone(rtype, x, y)) {
if (bad_location(x, y, nlx, nly, nhx, nhy)
|| is_exclusion_zone(rtype, x, y)) {
if (!oneshot) {
return FALSE; /* caller should try again */
} else {
@@ -420,7 +423,8 @@ put_lregion_here(
mtmp->mtrapped = 0;
deltrap(t);
}
if (bad_location(x, y, nlx, nly, nhx, nhy) || is_exclusion_zone(rtype, x, y))
if (bad_location(x, y, nlx, nly, nhx, nhy)
|| is_exclusion_zone(rtype, x, y))
return FALSE;
}
}
@@ -807,7 +811,7 @@ stolen_booty(void)
cnt = rnd(3);
for (i = 0; i < cnt; ++i)
migr_booty_item(SKELETON_KEY, gang);
otyp = rn2((GAUNTLETS_OF_DEXTERITY - LEATHER_GLOVES) + 1) + LEATHER_GLOVES;
otyp = rn1((GAUNTLETS_OF_DEXTERITY - LEATHER_GLOVES) + 1, LEATHER_GLOVES);
migr_booty_item(otyp, gang);
cnt = rnd(10);
for (i = 0; i < cnt; ++i) {
@@ -1456,6 +1460,8 @@ mkportal(coordxy x, coordxy y, xint16 todnum, xint16 todlevel)
return;
}
/* augment the Plane of Fire; called from goto_level() when arriving and
moveloop_core() when on the level */
void
fumaroles(void)
{
@@ -1509,13 +1515,16 @@ staticfn void set_wportal(void);
staticfn void mk_bubble(coordxy, coordxy, int);
staticfn void mv_bubble(struct bubble *, coordxy, coordxy, boolean);
/* augment the Plane of Water; called from goto_level() when arriving and
moveloop_core() when on the level */
void
movebubbles(void)
{
static const struct rm water_pos = { cmap_b_to_glyph(S_water), WATER, 0,
0, 0, 0, 0, 0, 0, 0 };
static const struct rm air_pos = { cmap_b_to_glyph(S_cloud), AIR, 0, 0, 0,
1, 0, 0, 0, 0 };
static const struct rm water_pos = {
cmap_b_to_glyph(S_water), WATER, 0, 0, 0, 0, 0, 0, 0, 0
}, air_pos = {
cmap_b_to_glyph(S_cloud), AIR, 0, 0, 0, 1, 0, 0, 0, 0
};
static boolean up = FALSE;
struct bubble *b;
struct container *cons;