From e16edb7fb76c0f594845eadf2f31f4bf1cbe5515 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Tue, 17 Aug 2004 00:40:35 +0000 Subject: [PATCH] monsters throwing greased objects Make the chance for thrown object to slip or shot object to misfire be the same for monsters as it is for the hero. --- doc/fixes34.4 | 1 + src/mthrowu.c | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 2b144909b..f03f13122 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -47,6 +47,7 @@ fix incomplete sentence occuring when unique monster's corpse fell down stairs fractured boulders or statues produced inconsistent object settings on the resulting rocks really fix rolling boulder bug C340-18, the previous "fix" reversed the test +monster throwing greased weapon has same chance for slip/misfire as player Platform- and/or Interface-Specific Fixes diff --git a/src/mthrowu.c b/src/mthrowu.c index b6d25b988..3198ce880 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)mthrowu.c 3.4 2004/06/12 */ +/* SCCS Id: @(#)mthrowu.c 3.4 2004/08/16 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -234,11 +234,11 @@ boolean verbose; /* give message(s) even when you can't see what happened */ void m_throw(mon, x, y, dx, dy, range, obj) - register struct monst *mon; - register int x,y,dx,dy,range; /* direction and range */ - register struct obj *obj; +struct monst *mon; /* launching monster */ +int x, y, dx, dy, range; /* launch point, direction, and range */ +struct obj *obj; /* missile (or stack providing it) */ { - register struct monst *mtmp; + struct monst *mtmp; struct obj *singleobj; char sym = obj->oclass; int hitu, blindinc = 0; @@ -273,7 +273,8 @@ m_throw(mon, x, y, dx, dy, range, obj) singleobj->owornmask = 0; /* threw one of multiple weapons in hand? */ - if (singleobj->cursed && (dx || dy) && !rn2(7)) { + if ((singleobj->cursed || singleobj->greased) && (dx || dy) && + !rn2(7)) { if(canseemon(mon) && flags.verbose) { if(is_ammo(singleobj)) pline("%s misfires!", Monnam(mon)); -- 2.40.0