preserve dknown field between fakeobj instances
Preserve temporary fake object's previous dknown value by storing it as a flag value within the m_ap_type field of the posing monster, and recalling it when it is needed. This is intended to help eliminate observable differences in price display between real objects and mimics posing as objects. 98% of this is just switching the code to utilize macro M_AP_TYPE(mon) everywhere to ensure that the flag bits are stripped off when needed.
This commit is contained in:
@@ -231,8 +231,8 @@ register struct monst *mtmp;
|
||||
|| mtmp->data->mlet == S_LEPRECHAUN) || !rn2(50))
|
||||
&& (Aggravate_monster
|
||||
|| (mtmp->data->mlet == S_DOG || mtmp->data->mlet == S_HUMAN)
|
||||
|| (!rn2(7) && mtmp->m_ap_type != M_AP_FURNITURE
|
||||
&& mtmp->m_ap_type != M_AP_OBJECT))) {
|
||||
|| (!rn2(7) && M_AP_TYPE(mtmp) != M_AP_FURNITURE
|
||||
&& M_AP_TYPE(mtmp) != M_AP_OBJECT))) {
|
||||
mtmp->msleeping = 0;
|
||||
return 1;
|
||||
}
|
||||
@@ -289,8 +289,8 @@ boolean fleemsg;
|
||||
mtmp->mfleetim = (unsigned) min(fleetime, 127);
|
||||
}
|
||||
if (!mtmp->mflee && fleemsg && canseemon(mtmp)
|
||||
&& mtmp->m_ap_type != M_AP_FURNITURE
|
||||
&& mtmp->m_ap_type != M_AP_OBJECT) {
|
||||
&& M_AP_TYPE(mtmp) != M_AP_FURNITURE
|
||||
&& M_AP_TYPE(mtmp) != M_AP_OBJECT) {
|
||||
/* unfortunately we can't distinguish between temporary
|
||||
sleep and temporary paralysis, so both conditions
|
||||
receive the same alternate message */
|
||||
|
||||
Reference in New Issue
Block a user