/* returns nonzero if something was hit */
int
-bhitpile(struct obj *obj, int (*fhito)(OBJ_P, OBJ_P), int tx, int ty, schar zz)
+bhitpile(
+ struct obj *obj, /* wand or fake spellbook for type of zap */
+ int (*fhito)(OBJ_P, OBJ_P), /* callback for each object being hit */
+ int tx, int ty, /* target location */
+ schar zz) /* direction for up/down zaps */
{
int hitanything = 0;
register struct obj *otmp, *next_obj;
case WAN_OPENING:
case SPE_KNOCK:
while (stway) {
- if (!stway->isladder && !stway->up && stway->tolev.dnum == u.uz.dnum)
+ if (!stway->isladder && !stway->up
+ && stway->tolev.dnum == u.uz.dnum)
break;
stway = stway->next;
}
/* augment damage for a spell dased on the hero's intelligence (and level) */
int
-spell_damage_bonus(int dmg) /* base amount to be adjusted by bonus or penalty */
+spell_damage_bonus(
+ int dmg) /* base amount to be adjusted by bonus or penalty */
{
int intell = ACURR(A_INT);
void
miss(const char *str, struct monst *mtmp)
{
- pline(
- "%s %s %s.", The(str), vtense(str, "miss"),
- ((cansee(g.bhitpos.x, g.bhitpos.y) || canspotmon(mtmp)) && flags.verbose)
- ? mon_nam(mtmp)
- : "it");
+ pline("%s %s %s.", The(str), vtense(str, "miss"),
+ ((cansee(g.bhitpos.x, g.bhitpos.y) || canspotmon(mtmp))
+ && flags.verbose) ? mon_nam(mtmp) : "it");
}
static void
* when a light beam is flashed (FLASHED_LIGHT)
* when a mirror is applied (INVIS_BEAM)
* A thrown/kicked object falls down at end of its range or when a monster
- * is hit. The variable 'g.bhitpos' is set to the final position of the weapon
- * thrown/zapped. The ray of a wand may affect (by calling a provided
+ * is hit. The variable 'g.bhitpos' is set to the final position of the
+ * weapon thrown/zapped. The ray of a wand may affect (by calling a provided
* function) several objects and monsters on its path. The return value
* is the monster hit (weapon != ZAPPED_WAND), or a null monster pointer.
*
mtmp = (struct monst *) 0;
if (mtmp) {
- g.notonhead = (g.bhitpos.x != mtmp->mx || g.bhitpos.y != mtmp->my);
+ g.notonhead = (g.bhitpos.x != mtmp->mx
+ || g.bhitpos.y != mtmp->my);
if (weapon == FLASHED_LIGHT) {
/* FLASHED_LIGHT hitting invisible monster should
pass through instead of stop so we call
/* used by buzz(); also used by munslime(muse.c); returns damage applied
to mon; note: caller is responsible for killing mon if damage is fatal */
int
-zhitm(struct monst *mon, int type, int nd,
- struct obj **ootmp) /* to return worn armor for caller to disintegrate */
+zhitm(
+ struct monst *mon, /* monster being hit */
+ int type, /* zap or breath type */
+ int nd, /* number of hit dice to use */
+ struct obj **ootmp) /* to return worn armor for caller to disintegrate */
{
- register int tmp = 0;
- register int abstype = abs(type) % 10;
+ int tmp = 0; /* damage amount */
+ int abstype = abs(type) % 10;
boolean sho_shieldeff = FALSE;
boolean spellcaster = is_hero_spell(type); /* maybe get a bonus! */
bury_objs(x, y);
if (see_it) {
if (lava)
- Norep("The %s cools and solidifies.", hliquid("lava"));
+ Norep("The %s cools and solidifies.",
+ hliquid("lava"));
else if (moat)
Norep("The %s is bridged with ice!", buf);
else