X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/d378ebfd8ce254d9b5f99bbf4f415c5859a30154..af314729a412f4936a44bcfabe14d34c3b152a82:/hack/hack.wizard.c diff --git a/hack/hack.wizard.c b/hack/hack.wizard.c index 38004cb0..0cd00c7f 100644 --- a/hack/hack.wizard.c +++ b/hack/hack.wizard.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.wizard.c,v 1.6 2003/04/02 18:36:41 jsm Exp $ */ +/* $NetBSD: hack.wizard.c,v 1.10 2011/08/07 06:03:45 dholland Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -63,7 +63,7 @@ #include #ifndef lint -__RCSID("$NetBSD: hack.wizard.c,v 1.6 2003/04/02 18:36:41 jsm Exp $"); +__RCSID("$NetBSD: hack.wizard.c,v 1.10 2011/08/07 06:03:45 dholland Exp $"); #endif /* not lint */ /* wizard code - inspired by rogue code from Merlyn Leroy (digi-g!brian) */ @@ -76,11 +76,15 @@ __RCSID("$NetBSD: hack.wizard.c,v 1.6 2003/04/02 18:36:41 jsm Exp $"); #define BOLT_LIM 8 /* from this distance D and 1 will try to hit * you */ -const char wizapp[] = "@DNPTUVXcemntx"; +static const char wizapp[] = "@DNPTUVXcemntx"; + +static void aggravate(void); +static void clonewiz(struct monst *); + /* If he has found the Amulet, make the wizard appear after some time */ void -amulet() +amulet(void) { struct obj *otmp; struct monst *mtmp; @@ -102,8 +106,7 @@ amulet() } int -wiz_hit(mtmp) - struct monst *mtmp; +wiz_hit(struct monst *mtmp) { /* if we have stolen or found the amulet, we disappear */ if (mtmp->minvent && mtmp->minvent->olet == AMULET_SYM && @@ -141,15 +144,16 @@ hithim: * on level 26 again. */ if (hitu(mtmp, d(mtmp->data->damn, mtmp->data->damd)) - && !rn2(20) && stealamulet(mtmp)); + && !rn2(20) && stealamulet(mtmp)) { + /* nothing */ + } } else inrange(mtmp); /* try magic */ return (0); } void -inrange(mtmp) - struct monst *mtmp; +inrange(struct monst *mtmp) { schar tx, ty; @@ -217,7 +221,7 @@ inrange(mtmp) pline("\"Destroy the thief, my pets!\""); aggravate(); /* aggravate all the * monsters */ - /* fall into next case */ + /* FALLTHROUGH */ case 2: if (flags.no_of_wizards == 1 && rnd(5) == 0) /* @@ -253,7 +257,7 @@ inrange(mtmp) } void -aggravate() +aggravate(void) { struct monst *mtmp; @@ -265,8 +269,7 @@ aggravate() } void -clonewiz(mtmp) - struct monst *mtmp; +clonewiz(struct monst *mtmp) { struct monst *mtmp2;