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:
nhmall
2019-04-22 14:17:18 -04:00
parent cd6b5ef933
commit dcf4da2150
30 changed files with 127 additions and 115 deletions

View File

@@ -1487,7 +1487,7 @@ boolean maybe_wakeup;
An attentive player will still notice that this is different from
an arrow just landing short of any target (no message in that case),
so will realize that there is a valid target here anyway. */
if (!canseemon(mon) || (mon->m_ap_type && mon->m_ap_type != M_AP_MONSTER))
if (!canseemon(mon) || (M_AP_TYPE(mon) && M_AP_TYPE(mon) != M_AP_MONSTER))
pline("%s %s.", The(missile), otense(obj, "miss"));
else
miss(missile, mon);