From 3f5af1f5bdd0869198014605d69f255f3e4c730c Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 1 Mar 2020 00:19:22 +0100 Subject: [PATCH] items[0] no longer is raised and is no longer displayed --- attack.cpp | 2 +- items.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/attack.cpp b/attack.cpp index 2cd15971..877bba80 100644 --- a/attack.cpp +++ b/attack.cpp @@ -669,7 +669,7 @@ EX void killMonster(cell *c, eMonster who, flagtype deathflags IS(0)) { if(who == moPlayer || (isFriendly(who) && items[itOrbEmpathy])) { eItem o = frog_power(m); if(o && who != moPlayer) markOrb2(itOrbEmpathy); - items[o] += 5; + if(o) items[o] += 5; } if(checkOrb(who, itOrbStone)) petrify(c, waPetrified, m), pcount = 0; diff --git a/items.cpp b/items.cpp index bbcecaa3..094ba9fd 100644 --- a/items.cpp +++ b/items.cpp @@ -222,8 +222,10 @@ EX bool collectItem(cell *c2, bool telekinesis IS(false)) { if(c2->item == itBarrow) for(int i=0; ilandparam; i++) gainItem(c2->item); else if(c2->item) gainItem(c2->item); - if(vid.bubbles_all || (among(items[c2->item], 5, 10, 25, 50, 100, 250, 500) && vid.bubbles_threshold)) + + if(c2->item && (vid.bubbles_all || (among(items[c2->item], 5, 10, 25, 50, 100, 250, 500) && vid.bubbles_threshold))) { drawBubble(c2, iinf[c2->item].color, its(items[c2->item]), 0.5); + } if(c2->item) { char ch = iinf[c2->item].glyph;