From 71480033c6dcb7277e6eb75cb103577f597e211c Mon Sep 17 00:00:00 2001 From: cohrs Date: Thu, 24 Oct 2002 01:40:58 +0000 Subject: [PATCH] B12010 - boulders in throw menu for giants When the player is poly'd to a giant, it was a bit odd that boulders weren't listed in the throw menu, especially since the usual check for them is throws_rocks. Since statues are not appropriate, I added this thru yet another ugly check in getobj. --- src/invent.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/invent.c b/src/invent.c index 52aa17889..9d5d0a8be 100644 --- a/src/invent.c +++ b/src/invent.c @@ -760,6 +760,7 @@ register const char *let,*word; boolean usegold = FALSE; /* can't use gold because its illegal */ boolean allowall = FALSE; boolean allownone = FALSE; + boolean useboulder = FALSE; xchar foox = 0; long cnt; boolean prezero = FALSE; @@ -793,6 +794,11 @@ register const char *let,*word; */ if(allowall && !strcmp(word, "read")) allowall = FALSE; + /* another ugly check: show boulders (not statues) */ + if(*let == WEAPON_CLASS && + !strcmp(word, "throw") && throws_rocks(youmonst.data)) + useboulder = TRUE; + if(allownone) *bp++ = '-'; #ifndef GOLDOBJ if(allowgold) *bp++ = def_oc_syms[COIN_CLASS]; @@ -811,6 +817,7 @@ register const char *let,*word; #ifdef GOLDOBJ || (usegold && otmp->invlet == GOLD_SYM) #endif + || (useboulder && otmp->otyp == BOULDER) ) { register int otyp = otmp->otyp; bp[foo++] = otmp->invlet;