Make paralysis intefere with seduction attempts
tinklebear on IRC noticed that a hero paralyzed by a floating eye was still "charmed" and capable of "removing her armor" as part of a nymph's theft attack. The same thing was true of foocubus seduction: a paralyzed hero was still able to respond to the questions about whether particular pieces of armor should be removed (and also do whatever else may be involved in a successful attack...). I think paralysis should prevent both those things. Nymph theft will still work, unless she needs the hero's active cooperation in removing a bulky piece of armor. Foocubus attacks will be prevented entirely by paralysis, making it interfere like unconsciousness already does. Apply a similar constraint to hero vs monster seduction, as well.
This commit is contained in:
@@ -2680,6 +2680,7 @@ extern int num_spells(void);
|
||||
extern long somegold(long);
|
||||
extern void stealgold(struct monst *);
|
||||
extern void thiefdead(void);
|
||||
extern boolean unresponsive(void);
|
||||
extern void remove_worn_item(struct obj *, boolean);
|
||||
extern int steal(struct monst *, char *);
|
||||
extern int mpickobj(struct monst *, struct obj *);
|
||||
|
||||
@@ -1824,7 +1824,7 @@ doseduce(struct monst *mon)
|
||||
mhe(mon), mon->mcan ? "severe " : "");
|
||||
return 0;
|
||||
}
|
||||
if (unconscious()) {
|
||||
if (unresponsive()) {
|
||||
pline("%s seems dismayed at your lack of response.", Monnam(mon));
|
||||
return 0;
|
||||
}
|
||||
|
||||
24
src/steal.c
24
src/steal.c
@@ -137,6 +137,20 @@ thiefdead(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* checks whether hero can be responsive to seduction attempts; similar to
|
||||
Unaware but also includes paralysis */
|
||||
boolean
|
||||
unresponsive(void)
|
||||
{
|
||||
if (gm.multi >= 0)
|
||||
return FALSE;
|
||||
|
||||
return (unconscious() || is_fainted()
|
||||
|| (gm.multi_reason
|
||||
&& (!strncmp(gm.multi_reason, "frozen", 6)
|
||||
|| !strncmp(gm.multi_reason, "paralyzed", 9))));
|
||||
}
|
||||
|
||||
/* called via (*ga.afternmv)() when hero finishes taking off armor that
|
||||
was slated to be stolen but the thief died in the interim */
|
||||
static int
|
||||
@@ -406,9 +420,10 @@ steal(struct monst* mtmp, char* objnambuf)
|
||||
armordelay = objects[otmp->otyp].oc_delay;
|
||||
if (olddelay > 0 && olddelay < armordelay)
|
||||
armordelay = olddelay;
|
||||
if (monkey_business) {
|
||||
/* animals usually don't have enough patience
|
||||
to take off items which require extra time */
|
||||
if (monkey_business || unresponsive()) {
|
||||
/* animals usually don't have enough patience to take off
|
||||
items which require extra time; unconscious or paralyzed
|
||||
hero can't be charmed into taking off his own armor */
|
||||
if (armordelay >= 1 && !olddelay && rn2(10))
|
||||
goto cant_take;
|
||||
remove_worn_item(otmp, TRUE);
|
||||
@@ -419,9 +434,6 @@ steal(struct monst* mtmp, char* objnambuf)
|
||||
boolean seen = canspotmon(mtmp);
|
||||
|
||||
otmp->cursed = 0;
|
||||
/* can't charm you without first waking you */
|
||||
if (Unaware)
|
||||
unmul((char *) 0);
|
||||
slowly = (armordelay >= 1 || gm.multi < 0);
|
||||
if (flags.female)
|
||||
urgent_pline("%s charms you. You gladly %s your %s.",
|
||||
|
||||
@@ -1764,7 +1764,7 @@ steal_it(struct monst *mdef, struct attack *mattk)
|
||||
|
||||
/* look for worn body armor */
|
||||
ustealo = (struct obj *) 0;
|
||||
if (could_seduce(&gy.youmonst, mdef, mattk)) {
|
||||
if (could_seduce(&gy.youmonst, mdef, mattk) && mdef->mcanmove) {
|
||||
/* find armor, and move it to end of inventory in the process */
|
||||
minvent_ptr = &mdef->minvent;
|
||||
while ((otmp = *minvent_ptr) != 0)
|
||||
|
||||
Reference in New Issue
Block a user