fix #H1749 - kick that misses didn't reveal concealed mimic
From a bug report, getting "your clumsy kick does no damage" when attempting to kick the location of a concealed mimic or hidden monster didn't bring the target out of hiding.
This commit is contained in:
@@ -294,6 +294,7 @@ if polymorph causes a monster to drop items, they won't be used up via
|
|||||||
monsters who ate green slime corpses weren't turned into green slime
|
monsters who ate green slime corpses weren't turned into green slime
|
||||||
"hand slip" while naming an object would never pick 'z' as a substitute letter
|
"hand slip" while naming an object would never pick 'z' as a substitute letter
|
||||||
hero would "gladly take off <armor>" for nymph or succubus even while asleep
|
hero would "gladly take off <armor>" for nymph or succubus even while asleep
|
||||||
|
concealed mimic wasn't revealed if kicking attmpt yielded a clumsy miss
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
42
src/dokick.c
42
src/dokick.c
@@ -125,8 +125,27 @@ register xchar x, y;
|
|||||||
bhitpos.x = x;
|
bhitpos.x = x;
|
||||||
bhitpos.y = y;
|
bhitpos.y = y;
|
||||||
if (attack_checks(mon, (struct obj *)0)) return;
|
if (attack_checks(mon, (struct obj *)0)) return;
|
||||||
|
/* anger target even if wild miss will occur */
|
||||||
setmangry(mon);
|
setmangry(mon);
|
||||||
|
|
||||||
|
if (Levitation && !rn2(3) && verysmall(mon->data) &&
|
||||||
|
!is_flyer(mon->data)) {
|
||||||
|
pline("Floating in the air, you miss wildly!");
|
||||||
|
exercise(A_DEX, FALSE);
|
||||||
|
(void) passive(mon, FALSE, 1, AT_KICK, FALSE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* reveal hidden target even if kick ends up missing (note: being
|
||||||
|
hidden doesn't affect chance to hit so neither does this reveal) */
|
||||||
|
if (mon->mundetected ||
|
||||||
|
(mon->m_ap_type && mon->m_ap_type != M_AP_MONSTER)) {
|
||||||
|
/* [revealing the monster should probably give a message...] */
|
||||||
|
if (mon->m_ap_type) seemimic(mon);
|
||||||
|
mon->mundetected = 0;
|
||||||
|
if (!canspotmon(mon)) map_invisible(x, y);
|
||||||
|
}
|
||||||
|
|
||||||
/* Kick attacks by kicking monsters are normal attacks, not special.
|
/* Kick attacks by kicking monsters are normal attacks, not special.
|
||||||
* This is almost always worthless, since you can either take one turn
|
* This is almost always worthless, since you can either take one turn
|
||||||
* and do all your kicks, or else take one turn and attack the monster
|
* and do all your kicks, or else take one turn and attack the monster
|
||||||
@@ -168,14 +187,6 @@ register xchar x, y;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Levitation && !rn2(3) && verysmall(mon->data) &&
|
|
||||||
!is_flyer(mon->data)) {
|
|
||||||
pline("Floating in the air, you miss wildly!");
|
|
||||||
exercise(A_DEX, FALSE);
|
|
||||||
(void) passive(mon, FALSE, 1, AT_KICK, FALSE);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = -inv_weight();
|
i = -inv_weight();
|
||||||
j = weight_cap();
|
j = weight_cap();
|
||||||
|
|
||||||
@@ -782,9 +793,18 @@ dokick()
|
|||||||
}
|
}
|
||||||
maploc = &levl[x][y];
|
maploc = &levl[x][y];
|
||||||
|
|
||||||
/* The next five tests should stay in */
|
/*
|
||||||
/* their present order: monsters, pools, */
|
* The next five tests should stay in their present order:
|
||||||
/* objects, non-doors, doors. */
|
* monsters, pools, objects, non-doors, doors.
|
||||||
|
*
|
||||||
|
* [FIXME: Monsters who are hidden underneath objects or
|
||||||
|
* in pools should lead to hero kicking the concealment
|
||||||
|
* rather than the monster, probably exposing the hidden
|
||||||
|
* monster in the process. And monsters who are hidden on
|
||||||
|
* ceiling shouldn't be kickable (unless hero is flying?);
|
||||||
|
* kicking toward them should just target whatever is on
|
||||||
|
* the floor at that spot.]
|
||||||
|
*/
|
||||||
|
|
||||||
if(MON_AT(x, y)) {
|
if(MON_AT(x, y)) {
|
||||||
struct permonst *mdat;
|
struct permonst *mdat;
|
||||||
|
|||||||
Reference in New Issue
Block a user