fix #6691 and a couple other twoweap issues
Report was for dual-wielding hitting an enchanter and assumed that a resistant artifact as primary weapon was protecting vulnerable secondary weapon. Actual reason was simpler. When in normal form, dual-wielding attacks against creatures which cause erosion to the weapon which hits them would only inflict the passive erosion damage to the primary weapon, even if it missed and secondary hit. Make primary attack always trigger passive counter- attack--before second swing now, rather than after--even if it misses, and secondary attack trigger another one if that hits. Both weapons are now subject to passive erosion (but only when they actually hit); when secondary weapon hits, hero gets a double dose of counter-attack. Hero poly'd into a monster with multiple weapon attacks (various leaders: dwarf lord, orc-captain, and so forth) would try to emulate dual wielding and first hit with uwep then with uswapwep. But it would do that even if uswapwep was a bow or stack of darts that the player had no itention of using for hand-to-hand. Stick with repeat hits by uwep when uswapwep seems inappropriate. Splitting a pudding while dual-wielding would only do so when hit by uwep of appropriate material, never when hit by uswapwep. So silver saber and longsword could split if longsword was primary but never split if saber was primary. Check material and splitting separately for each hit. It's now possible to split twice with one dual-weapon attack if both weapons hit and both are made of the right material (iron or 'metal'; among relevant objects the latter is only used for tsurugi and scapel).
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 extern.h $NHDT-Date: 1514769568 2018/01/01 01:19:28 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.622 $ */
|
||||
/* NetHack 3.6 extern.h $NHDT-Date: 1517128658 2018/01/28 08:37:38 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.624 $ */
|
||||
/* Copyright (c) Steve Creps, 1988. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -2473,13 +2473,14 @@ E void NDECL(u_init);
|
||||
E void FDECL(erode_armor, (struct monst *, int));
|
||||
E boolean FDECL(attack_checks, (struct monst *, struct obj *));
|
||||
E void FDECL(check_caitiff, (struct monst *));
|
||||
E int FDECL(find_roll_to_hit,
|
||||
(struct monst *, UCHAR_P, struct obj *, int *, int *));
|
||||
E int FDECL(find_roll_to_hit, (struct monst *, UCHAR_P, struct obj *,
|
||||
int *, int *));
|
||||
E boolean FDECL(attack, (struct monst *));
|
||||
E boolean FDECL(hmon, (struct monst *, struct obj *, int, int));
|
||||
E int FDECL(damageum, (struct monst *, struct attack *));
|
||||
E void FDECL(missum, (struct monst *, struct attack *, BOOLEAN_P));
|
||||
E int FDECL(passive, (struct monst *, BOOLEAN_P, int, UCHAR_P, BOOLEAN_P));
|
||||
E int FDECL(passive, (struct monst *, struct obj *, BOOLEAN_P, int,
|
||||
UCHAR_P, BOOLEAN_P));
|
||||
E void FDECL(passive_obj, (struct monst *, struct obj *, struct attack *));
|
||||
E void FDECL(stumble_onto_mimic, (struct monst *));
|
||||
E int FDECL(flash_hits_mon, (struct monst *, struct obj *));
|
||||
|
||||
Reference in New Issue
Block a user