diff options
author | mycroft <mycroft@NetBSD.org> | 1997-10-15 12:43:35 +0000 |
---|---|---|
committer | mycroft <mycroft@NetBSD.org> | 1997-10-15 12:43:35 +0000 |
commit | fe2230fd8049e33e0d1bee98ecf09bbc44fc5886 (patch) | |
tree | 3b91f10ecc770e950b5fea6b36f47a07adc389f0 /rogue/object.c | |
parent | a2f924a0ac6edb349e3d2366bf26e40641676ab5 (diff) | |
download | bsdgames-darwin-fe2230fd8049e33e0d1bee98ecf09bbc44fc5886.tar.gz bsdgames-darwin-fe2230fd8049e33e0d1bee98ecf09bbc44fc5886.tar.zst bsdgames-darwin-fe2230fd8049e33e0d1bee98ecf09bbc44fc5886.zip |
Better fix for the previous.
Diffstat (limited to 'rogue/object.c')
-rw-r--r-- | rogue/object.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/rogue/object.c b/rogue/object.c index 627216f7..ad0e2a0a 100644 --- a/rogue/object.c +++ b/rogue/object.c @@ -1,4 +1,4 @@ -/* $NetBSD: object.c,v 1.5 1997/10/15 09:27:06 is Exp $ */ +/* $NetBSD: object.c,v 1.6 1997/10/15 12:43:35 mycroft Exp $ */ /* * Copyright (c) 1988, 1993 @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)object.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: object.c,v 1.5 1997/10/15 09:27:06 is Exp $"); +__RCSID("$NetBSD: object.c,v 1.6 1997/10/15 12:43:35 mycroft Exp $"); #endif #endif /* not lint */ @@ -504,8 +504,6 @@ gr_weapon(obj, assign_wk) short i; short blessing, increment; - increment = 0; /* XXX make gcc happy */ - obj->what_is = WEAPON; if (assign_wk) { obj->which_kind = get_rand(0, (WEAPONS - 1)); @@ -522,13 +520,13 @@ gr_weapon(obj, assign_wk) percent = get_rand(1, 96); blessing = get_rand(1, 3); - if (percent <= 16) { - increment = 1; - } else if (percent <= 32) { - increment = -1; - obj->is_cursed = 1; - } if (percent <= 32) { + if (percent <= 16) { + increment = 1; + } else { + increment = -1; + obj->is_cursed = 1; + } for (i = 0; i < blessing; i++) { if (coin_toss()) { obj->hit_enchant += increment; |