Fix strange object mimic in shop sanity error
Shop population code set the mimic shape to strange object without checking for protection from shape changers. Let set_mimic_sym (via makemon) handle it correctly instead.
This commit is contained in:
@@ -2212,6 +2212,10 @@ set_mimic_sym(register struct monst *mtmp)
|
||||
*/
|
||||
|
||||
} else if (rt >= SHOPBASE) {
|
||||
if (rn2(10) >= depth(&u.uz)) {
|
||||
s_sym = S_MIMIC_DEF; /* -> STRANGE_OBJECT */
|
||||
goto assign_sym;
|
||||
}
|
||||
s_sym = get_shop_item(rt - SHOPBASE);
|
||||
if (s_sym < 0) {
|
||||
ap_type = M_AP_OBJECT;
|
||||
|
||||
@@ -463,11 +463,7 @@ mkshobj_at(const struct shclass* shp, int sx, int sy, boolean mkspecl)
|
||||
if (rn2(100) < depth(&u.uz) && !MON_AT(sx, sy)
|
||||
&& (ptr = mkclass(S_MIMIC, 0)) != 0
|
||||
&& (mtmp = makemon(ptr, sx, sy, NO_MM_FLAGS)) != 0) {
|
||||
/* note: makemon will set the mimic symbol to a shop item */
|
||||
if (rn2(10) >= depth(&u.uz)) {
|
||||
mtmp->m_ap_type = M_AP_OBJECT;
|
||||
mtmp->mappearance = STRANGE_OBJECT;
|
||||
}
|
||||
/* nothing */
|
||||
} else {
|
||||
atype = get_shop_item((int) (shp - shtypes));
|
||||
if (atype == VEGETARIAN_CLASS)
|
||||
|
||||
Reference in New Issue
Block a user