more mhitu.c style/formatting
This commit is contained in:
40
src/mhitu.c
40
src/mhitu.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 mhitu.c $NHDT-Date: 1762750699 2025/11/09 20:58:19 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.334 $ */
|
||||
/* NetHack 3.7 mhitu.c $NHDT-Date: 1775259433 2026/04/03 15:37:13 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.341 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -12,13 +12,13 @@ staticfn void missmu(struct monst *, boolean, struct attack *);
|
||||
staticfn void mswings(struct monst *, struct obj *, boolean);
|
||||
staticfn void wildmiss(struct monst *, struct attack *);
|
||||
staticfn void calc_mattacku_vars(struct monst *, boolean *, boolean *,
|
||||
boolean *, boolean *);
|
||||
boolean *, boolean *);
|
||||
staticfn void summonmu(struct monst *, boolean);
|
||||
staticfn int hitmu(struct monst *, struct attack *);
|
||||
staticfn int gulpmu(struct monst *, struct attack *);
|
||||
staticfn int explmu(struct monst *, struct attack *, boolean);
|
||||
staticfn void mayberem(struct monst *, const char *, struct obj *,
|
||||
const char *);
|
||||
const char *);
|
||||
staticfn int assess_dmg(struct monst *, int);
|
||||
staticfn int passiveum(struct permonst *, struct monst *, struct attack *);
|
||||
|
||||
@@ -94,7 +94,7 @@ missmu(struct monst *mtmp, boolean nearmiss, struct attack *mattk)
|
||||
pline_mon(mtmp, "%s pretends to be friendly.", Monnam(mtmp));
|
||||
else
|
||||
pline_mon(mtmp, "%s %smisses!", Monnam(mtmp),
|
||||
(nearmiss && flags.verbose) ? "just " : "");
|
||||
(nearmiss && flags.verbose) ? "just " : "");
|
||||
|
||||
stop_occupation();
|
||||
}
|
||||
@@ -142,7 +142,9 @@ mswings(
|
||||
|
||||
/* return how a poison attack was delivered */
|
||||
const char *
|
||||
mpoisons_subj(struct monst *mtmp, struct attack *mattk)
|
||||
mpoisons_subj(
|
||||
struct monst *mtmp,
|
||||
struct attack *mattk)
|
||||
{
|
||||
if (mattk->aatyp == AT_WEAP) {
|
||||
struct obj *mwep = (mtmp == &gy.youmonst) ? uwep : MON_WEP(mtmp);
|
||||
@@ -210,9 +212,9 @@ wildmiss(struct monst *mtmp, struct attack *mattk)
|
||||
|| nolimbs(mtmp->data)) ? "lunges"
|
||||
: "swings";
|
||||
|
||||
if (compat)
|
||||
if (compat) {
|
||||
pline("%s tries to touch you and misses!", Monst_name);
|
||||
else
|
||||
} else {
|
||||
switch (rn2(3)) {
|
||||
case 0:
|
||||
pline("%s %s wildly and misses!", Monst_name, swings);
|
||||
@@ -230,7 +232,7 @@ wildmiss(struct monst *mtmp, struct attack *mattk)
|
||||
pline("%s %s wildly!", Monst_name, swings);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
} else if (unotthere) { /* Displaced */
|
||||
/* give 'displaced' message even if hero is Blind */
|
||||
if (compat)
|
||||
@@ -899,7 +901,8 @@ mattacku(struct monst *mtmp)
|
||||
mon_currwep = MON_WEP(mtmp);
|
||||
if (mon_currwep) {
|
||||
boolean bash = (is_pole(mon_currwep)
|
||||
&& !is_art(mon_currwep, ART_SNICKERSNEE)
|
||||
&& !is_art(mon_currwep,
|
||||
ART_SNICKERSNEE)
|
||||
&& m_next2u(mtmp));
|
||||
|
||||
hittmp = hitval(mon_currwep, &gy.youmonst);
|
||||
@@ -1041,7 +1044,9 @@ diseasemu(struct permonst *mdat)
|
||||
|
||||
/* check whether slippery clothing protects from hug or wrap attack */
|
||||
boolean
|
||||
u_slip_free(struct monst *mtmp, struct attack *mattk)
|
||||
u_slip_free(
|
||||
struct monst *mtmp,
|
||||
struct attack *mattk)
|
||||
{
|
||||
struct obj *obj;
|
||||
|
||||
@@ -1583,7 +1588,10 @@ gulpmu(struct monst *mtmp, struct attack *mattk)
|
||||
|
||||
/* monster explodes in your face */
|
||||
staticfn int
|
||||
explmu(struct monst *mtmp, struct attack *mattk, boolean ufound)
|
||||
explmu(
|
||||
struct monst *mtmp,
|
||||
struct attack *mattk,
|
||||
boolean ufound)
|
||||
{
|
||||
boolean kill_agr = TRUE;
|
||||
boolean not_affected;
|
||||
@@ -2365,8 +2373,8 @@ assess_dmg(struct monst *mtmp, int tmp)
|
||||
|
||||
boolean
|
||||
ranged_attk_assessed(
|
||||
struct monst *mtmp,
|
||||
boolean (*assessfunc)(struct monst *, int))
|
||||
struct monst *mtmp,
|
||||
boolean (*assessfunc)(struct monst *, int))
|
||||
{
|
||||
int i;
|
||||
struct permonst *ptr = mtmp->data;
|
||||
@@ -2383,7 +2391,9 @@ boolean (*assessfunc)(struct monst *, int))
|
||||
/* can be used as ranged_attk_assessed() callback.
|
||||
Returns TRUE if monster is avoiding use of this attack */
|
||||
boolean
|
||||
mon_avoiding_this_attack(struct monst *mtmp, int attkidx)
|
||||
mon_avoiding_this_attack(
|
||||
struct monst *mtmp,
|
||||
int attkidx)
|
||||
{
|
||||
struct permonst *ptr = mtmp->data;
|
||||
int typ = -1;
|
||||
@@ -2628,4 +2638,6 @@ cloneu(void)
|
||||
return mon;
|
||||
}
|
||||
|
||||
#undef ld
|
||||
|
||||
/*mhitu.c*/
|
||||
|
||||
Reference in New Issue
Block a user