Skip to content

Commit

Permalink
Do not allow mimicked objects to stack
Browse files Browse the repository at this point in the history
  • Loading branch information
backwardsEric authored and NickMcConnell committed Sep 1, 2024
1 parent 7925b63 commit e75e126
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/obj-pile.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,9 @@ bool object_similar(const struct object *obj1, const struct object *obj2,
if (object_is_equipped(player->body, obj2))
return false;

/* Mimicked items do not stack */
if (obj1->mimicking_m_idx || obj2->mimicking_m_idx) return false;

/* If either item is unknown, do not stack */
if (mode & OSTACK_LIST && obj1->kind != obj1->known->kind) return false;
if (mode & OSTACK_LIST && obj2->kind != obj2->known->kind) return false;
Expand Down

0 comments on commit e75e126

Please sign in to comment.