B03005 - canceling monster redux
Revert the code, but add a comment. The behavior is not obvious to everyone.
This commit is contained in:
@@ -76,7 +76,6 @@ choking while eating non-food always called the food "quick snack"
|
|||||||
short swords are not throwing weapons
|
short swords are not throwing weapons
|
||||||
several sit-in-trap cases were unreachable
|
several sit-in-trap cases were unreachable
|
||||||
curse candelabrum in bones, like other similar artifacts
|
curse candelabrum in bones, like other similar artifacts
|
||||||
clear up Magicbane messages when it attempts to re-cancel a canceled monster
|
|
||||||
detecting a trap in a chest while confused should not exercise wisdom
|
detecting a trap in a chest while confused should not exercise wisdom
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -766,8 +766,7 @@ char *hittee; /* target's name: "you" or mon_nam(mdef) */
|
|||||||
const char *verb;
|
const char *verb;
|
||||||
boolean youattack = (magr == &youmonst),
|
boolean youattack = (magr == &youmonst),
|
||||||
youdefend = (mdef == &youmonst),
|
youdefend = (mdef == &youmonst),
|
||||||
resisted = FALSE, was_canceled = FALSE,
|
resisted = FALSE, do_stun, do_confuse, result;
|
||||||
do_stun, do_confuse, result;
|
|
||||||
int attack_indx, scare_dieroll = MB_MAX_DIEROLL / 2;
|
int attack_indx, scare_dieroll = MB_MAX_DIEROLL / 2;
|
||||||
|
|
||||||
result = FALSE; /* no message given yet */
|
result = FALSE; /* no message given yet */
|
||||||
@@ -810,11 +809,6 @@ char *hittee; /* target's name: "you" or mon_nam(mdef) */
|
|||||||
verb = mb_verb[!!Hallucination][attack_indx];
|
verb = mb_verb[!!Hallucination][attack_indx];
|
||||||
if (youattack || youdefend || vis) {
|
if (youattack || youdefend || vis) {
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
/* canceling monster only happens if not already canceled */
|
|
||||||
if (attack_indx == MB_INDEX_CANCEL && !youdefend && mdef->mcan) {
|
|
||||||
was_canceled = TRUE;
|
|
||||||
verb = "hit"; /* doesn't change its attack to, eg stun */
|
|
||||||
}
|
|
||||||
pline_The("magic-absorbing blade %s %s!",
|
pline_The("magic-absorbing blade %s %s!",
|
||||||
vtense((const char *)0, verb), hittee);
|
vtense((const char *)0, verb), hittee);
|
||||||
/* assume probing has some sort of noticeable feedback
|
/* assume probing has some sort of noticeable feedback
|
||||||
@@ -827,9 +821,11 @@ char *hittee; /* target's name: "you" or mon_nam(mdef) */
|
|||||||
switch (attack_indx) {
|
switch (attack_indx) {
|
||||||
case MB_INDEX_CANCEL:
|
case MB_INDEX_CANCEL:
|
||||||
old_uasmon = youmonst.data;
|
old_uasmon = youmonst.data;
|
||||||
if (was_canceled) {
|
/* No mdef->mcan check: even a cancelled monster can be polymorphed
|
||||||
/* nothing left to cancel */
|
* into a golem, and the "cancel" effect acts as if some magical
|
||||||
} else if (!cancel_monst(mdef, mb, youattack, FALSE, FALSE)) {
|
* energy remains in spellcasting defenders to be absorbed later.
|
||||||
|
*/
|
||||||
|
if (!cancel_monst(mdef, mb, youattack, FALSE, FALSE)) {
|
||||||
resisted = TRUE;
|
resisted = TRUE;
|
||||||
} else {
|
} else {
|
||||||
do_stun = FALSE;
|
do_stun = FALSE;
|
||||||
|
|||||||
Reference in New Issue
Block a user