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:
@@ -313,7 +313,7 @@ boolean verbose; /* give message(s) even when you can't see what happened */
|
||||
struct obj *mon_launcher = archer ? MON_WEP(archer) : NULL;
|
||||
|
||||
notonhead = (bhitpos.x != mtmp->mx || bhitpos.y != mtmp->my);
|
||||
ismimic = mtmp->m_ap_type && mtmp->m_ap_type != M_AP_MONSTER;
|
||||
ismimic = M_AP_TYPE(mtmp) && M_AP_TYPE(mtmp) != M_AP_MONSTER;
|
||||
vis = cansee(bhitpos.x, bhitpos.y);
|
||||
|
||||
tmp = 5 + find_mac(mtmp) + omon_adj(mtmp, otmp, FALSE);
|
||||
@@ -1073,8 +1073,8 @@ register struct monst *mtmp;
|
||||
|
||||
/* hero concealment usually trumps monst awareness of being lined up */
|
||||
if (Upolyd && rn2(25)
|
||||
&& (u.uundetected || (youmonst.m_ap_type != M_AP_NOTHING
|
||||
&& youmonst.m_ap_type != M_AP_MONSTER)))
|
||||
&& (u.uundetected || (U_AP_TYPE != M_AP_NOTHING
|
||||
&& U_AP_TYPE != M_AP_MONSTER)))
|
||||
return FALSE;
|
||||
|
||||
ignore_boulders = (throws_rocks(mtmp->data)
|
||||
|
||||
Reference in New Issue
Block a user