waking waiting monsters after non-damaging attacks
- From a bug report, there are ways to, for example, steal items from Medusa without waking her, by clever use of Conflict. Avoid this by removing STRAT_WAITFORU when such an attack succeeds - it was theoretically possible to use a similar approach to steal from a STRAT_WAITFORU monster without it noticing while polymorphed and very fast, so bulletproof this case as well. Simpler because failed attacks wake too.
This commit is contained in:
@@ -1464,6 +1464,7 @@ register struct attack *mattk;
|
||||
break;
|
||||
}
|
||||
|
||||
mdef->mstrategy &= ~STRAT_WAITFORU; /* in case player is very fast */
|
||||
if((mdef->mhp -= tmp) < 1) {
|
||||
if (mdef->mtame && !cansee(mdef->mx,mdef->my)) {
|
||||
You_feel("embarrassed for a moment.");
|
||||
|
||||
Reference in New Issue
Block a user