fix #H291 - rogue backstab anomaly (trunk only)
From a bug report: rogue's backstab bonus (extra damage when foe is fleeing) doesn't apply when dual-wielding but does apply to thrown weapons--unless both conditions apply. Having it apply to throwing is too powerful. Elbereth makes it trivial to get monsters to flee and a rogue with expert dagger skill can throw up to 4 of those at a time, so a level 30 rogue could get rnd(30) bonus 4 times in a single attack. This makes the backstab bonus only applicable to melee and polearm attacks.
This commit is contained in:
@@ -219,6 +219,7 @@ when doppelgangers taking on new shape don't specifically pick nasty monster
|
|||||||
or role monster, bias the random form towards humanoid
|
or role monster, bias the random form towards humanoid
|
||||||
salamanders can use green slime corpses to cure themselves of petrification
|
salamanders can use green slime corpses to cure themselves of petrification
|
||||||
feedback about summoned monsters may use singular when it should use plural
|
feedback about summoned monsters may use singular when it should use plural
|
||||||
|
rogue's backstab bonus doesn't apply for throwing attacks
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
+8
-5
@@ -550,6 +550,9 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */
|
|||||||
boolean silvermsg = FALSE, silverobj = FALSE;
|
boolean silvermsg = FALSE, silverobj = FALSE;
|
||||||
boolean valid_weapon_attack = FALSE;
|
boolean valid_weapon_attack = FALSE;
|
||||||
boolean unarmed = !uwep && !uarm && !uarms;
|
boolean unarmed = !uwep && !uarm && !uarms;
|
||||||
|
boolean hand_to_hand = (thrown == HMON_MELEE ||
|
||||||
|
/* not grapnels; applied implies uwep */
|
||||||
|
(thrown == HMON_APPLIED && is_pole(uwep)));
|
||||||
#ifdef STEED
|
#ifdef STEED
|
||||||
int jousting = 0;
|
int jousting = 0;
|
||||||
#endif
|
#endif
|
||||||
@@ -638,7 +641,9 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */
|
|||||||
valid_weapon_attack = (tmp > 1);
|
valid_weapon_attack = (tmp > 1);
|
||||||
if (!valid_weapon_attack || mon == u.ustuck || u.twoweap) {
|
if (!valid_weapon_attack || mon == u.ustuck || u.twoweap) {
|
||||||
; /* no special bonuses */
|
; /* no special bonuses */
|
||||||
} else if (mon->mflee && Role_if(PM_ROGUE) && !Upolyd) {
|
} else if (mon->mflee && Role_if(PM_ROGUE) && !Upolyd &&
|
||||||
|
/* multi-shot throwing is too powerful here */
|
||||||
|
hand_to_hand) {
|
||||||
You("strike %s from behind!", mon_nam(mon));
|
You("strike %s from behind!", mon_nam(mon));
|
||||||
tmp += rnd(u.ulevel);
|
tmp += rnd(u.ulevel);
|
||||||
hittxt = TRUE;
|
hittxt = TRUE;
|
||||||
@@ -1037,8 +1042,7 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */
|
|||||||
/* iron weapon using melee or polearm hit */
|
/* iron weapon using melee or polearm hit */
|
||||||
obj && obj == uwep &&
|
obj && obj == uwep &&
|
||||||
objects[obj->otyp].oc_material == IRON &&
|
objects[obj->otyp].oc_material == IRON &&
|
||||||
(thrown == HMON_MELEE ||
|
hand_to_hand) {
|
||||||
(thrown == HMON_APPLIED && is_pole(obj)))) {
|
|
||||||
if (clone_mon(mon, 0, 0)) {
|
if (clone_mon(mon, 0, 0)) {
|
||||||
pline("%s divides as you hit it!", Monnam(mon));
|
pline("%s divides as you hit it!", Monnam(mon));
|
||||||
hittxt = TRUE;
|
hittxt = TRUE;
|
||||||
@@ -1092,8 +1096,7 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */
|
|||||||
} else if (destroyed) {
|
} else if (destroyed) {
|
||||||
if (!already_killed)
|
if (!already_killed)
|
||||||
killed(mon); /* takes care of most messages */
|
killed(mon); /* takes care of most messages */
|
||||||
} else if (u.umconf &&
|
} else if (u.umconf && hand_to_hand) {
|
||||||
(thrown == HMON_MELEE || thrown == HMON_APPLIED)) {
|
|
||||||
nohandglow(mon);
|
nohandglow(mon);
|
||||||
if (!mon->mconf && !resist(mon, SPBOOK_CLASS, 0, NOTELL)) {
|
if (!mon->mconf && !resist(mon, SPBOOK_CLASS, 0, NOTELL)) {
|
||||||
mon->mconf = 1;
|
mon->mconf = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user