diff options
author | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2010-01-04 20:08:44 +0530 |
---|---|---|
committer | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2010-01-04 20:08:44 +0530 |
commit | f1fdc16676179c58bff565682afa989ee93e79b7 (patch) | |
tree | be3e04e6eba9f3b4379381e19cff2dd233da31c3 /crawl-ref/source/items.cc | |
parent | 30dc9be38427eeeb21fde290e707841cd6989b3d (diff) | |
download | crawl-ref-f1fdc16676179c58bff565682afa989ee93e79b7.tar.gz crawl-ref-f1fdc16676179c58bff565682afa989ee93e79b7.zip |
[Mantis 331] Fix inverted chunk-stacking logic that caused missiles of different brands to stack (syllogism).
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r-- | crawl-ref/source/items.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index f7aca1abb3..969b1afbac 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -1304,9 +1304,11 @@ bool items_similar(const item_def &item1, const item_def &item2, bool ignore_ide { if (item1.plus != item2.plus || item1.plus2 != item2.plus2 - || (item1.base_type == OBJ_FOOD && item2.sub_type == FOOD_CHUNK) ? - (item1.special != item2.special) : - (abs(item1.special - item2.special) > 5)) + || ((item1.base_type == OBJ_FOOD && item2.sub_type == FOOD_CHUNK) ? + // Reject chunk merge if chunk ages differ by more than 5 + abs(item1.special - item2.special) > 5 + // Non-chunk item specials must match exactly. + : item1.special != item2.special)) { return (false); } |