combat fixes
1) make two-weapon combat perform two attacks instead of always either hitting twice or missing twice; 2) address <Someone>'s report of weapon skill to-hit adjustment being ignored for bare-handed and martial arts attacks; 3) address newsgroup complaints about the intrusive "your armor is rather cumbersome" message given every time a monk wearing a suit attacks; this implements the suggestion that it only occur for those times where you miss because of the penalty involved, suppressing it when you miss due to other reasons and when you successfully hit; 4) bonus fix: a side-effect of #3 is that the order of the messages "your armor is cumbersome" and Stormbringer's "bloodthirsty blade attacks" is inverted, making a sensible sequence instead of implying precognition.
This commit is contained in:
11
src/dokick.c
11
src/dokick.c
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)dokick.c 3.4 2003/01/08 */
|
||||
/* SCCS Id: @(#)dokick.c 3.4 2003/03/14 */
|
||||
/* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -135,8 +135,9 @@ register xchar x, y;
|
||||
*/
|
||||
if (Upolyd && attacktype(youmonst.data, AT_KICK)) {
|
||||
struct attack *uattk;
|
||||
int sum;
|
||||
schar tmp = find_roll_to_hit(mon);
|
||||
int sum, kickdieroll, armorpenalty, attknum = 0,
|
||||
tmp = find_roll_to_hit(mon, AT_KICK, (struct obj *)0,
|
||||
&attknum, &armorpenalty);
|
||||
|
||||
for (i = 0; i < NATTK; i++) {
|
||||
/* first of two kicks might have provoked counterattack
|
||||
@@ -153,14 +154,14 @@ register xchar x, y;
|
||||
and shades have no passive counterattack */
|
||||
Your("%s %s.", kick_passes_thru, mon_nam(mon));
|
||||
break; /* skip any additional kicks */
|
||||
} else if (tmp > rnd(20)) {
|
||||
} else if (tmp > (kickdieroll = rnd(20))) {
|
||||
You("kick %s.", mon_nam(mon));
|
||||
sum = damageum(mon, uattk);
|
||||
(void)passive(mon, (boolean)(sum > 0), (sum != 2), AT_KICK);
|
||||
if (sum == 2)
|
||||
break; /* Defender died */
|
||||
} else {
|
||||
missum(mon, uattk);
|
||||
missum(mon, uattk, (tmp + armorpenalty > kickdieroll));
|
||||
(void)passive(mon, 0, 1, AT_KICK);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user