B01016 - misplaced "you steal" message after being blasted by an artifact
I saw no straight-forward way to insert the message earlier in the sequence, so... I reasoned that you might not yet have a good grasp and not be able to continue holding the object when reverting form. So, I made this into a drop case and made the drop message a rare past tense message. Past tense is still OK for the other drop cases. While testing this, I noticed you'd keep stealing even after reverting form. Added code to stop this. Finally, there was a missing MON_NOWEP call in the stealing code, added it.
This commit is contained in:
@@ -384,6 +384,7 @@ const char *drop_fmt, *drop_arg, *hold_msg;
|
|||||||
/* place_object may change these */
|
/* place_object may change these */
|
||||||
boolean crysknife = (obj->otyp == CRYSKNIFE);
|
boolean crysknife = (obj->otyp == CRYSKNIFE);
|
||||||
int oerode = obj->oerodeproof;
|
int oerode = obj->oerodeproof;
|
||||||
|
boolean wasUpolyd = Upolyd;
|
||||||
|
|
||||||
/* in case touching this object turns out to be fatal */
|
/* in case touching this object turns out to be fatal */
|
||||||
place_object(obj, u.ux, u.uy);
|
place_object(obj, u.ux, u.uy);
|
||||||
@@ -392,6 +393,12 @@ const char *drop_fmt, *drop_arg, *hold_msg;
|
|||||||
obj_extract_self(obj); /* remove it from the floor */
|
obj_extract_self(obj); /* remove it from the floor */
|
||||||
dropy(obj); /* now put it back again :-) */
|
dropy(obj); /* now put it back again :-) */
|
||||||
return obj;
|
return obj;
|
||||||
|
} else if (wasUpolyd && !Upolyd) {
|
||||||
|
/* loose your grip if you revert your form */
|
||||||
|
if (drop_fmt) pline(drop_fmt, drop_arg);
|
||||||
|
obj_extract_self(obj);
|
||||||
|
dropy(obj);
|
||||||
|
return obj;
|
||||||
}
|
}
|
||||||
obj_extract_self(obj);
|
obj_extract_self(obj);
|
||||||
if (crysknife) {
|
if (crysknife) {
|
||||||
|
|||||||
@@ -1102,12 +1102,15 @@ struct attack *mattk;
|
|||||||
}
|
}
|
||||||
|
|
||||||
while ((otmp = mdef->minvent) != 0) {
|
while ((otmp = mdef->minvent) != 0) {
|
||||||
|
if (!Upolyd) break; /* no longer have ability to steal */
|
||||||
/* take the object away from the monster */
|
/* take the object away from the monster */
|
||||||
obj_extract_self(otmp);
|
obj_extract_self(otmp);
|
||||||
if ((unwornmask = otmp->owornmask) != 0L) {
|
if ((unwornmask = otmp->owornmask) != 0L) {
|
||||||
mdef->misc_worn_check &= ~unwornmask;
|
mdef->misc_worn_check &= ~unwornmask;
|
||||||
if (otmp->owornmask & W_WEP)
|
if (otmp->owornmask & W_WEP) {
|
||||||
setmnotwielded(mdef,otmp);
|
setmnotwielded(mdef,otmp);
|
||||||
|
MON_NOWEP(mdef);
|
||||||
|
}
|
||||||
otmp->owornmask = 0L;
|
otmp->owornmask = 0L;
|
||||||
update_mon_intrinsics(mdef, otmp, FALSE);
|
update_mon_intrinsics(mdef, otmp, FALSE);
|
||||||
|
|
||||||
@@ -1116,7 +1119,7 @@ struct attack *mattk;
|
|||||||
Monnam(mdef), mhis(mdef));
|
Monnam(mdef), mhis(mdef));
|
||||||
}
|
}
|
||||||
/* give the object to the character */
|
/* give the object to the character */
|
||||||
otmp = hold_another_object(otmp, "You steal %s.",
|
otmp = hold_another_object(otmp, "You snatched but dropped %s.",
|
||||||
doname(otmp), "You steal: ");
|
doname(otmp), "You steal: ");
|
||||||
if (otmp->where != OBJ_INVENT) continue;
|
if (otmp->where != OBJ_INVENT) continue;
|
||||||
if (otmp->otyp == CORPSE &&
|
if (otmp->otyp == CORPSE &&
|
||||||
|
|||||||
Reference in New Issue
Block a user