remove and transfer INVISIBLE_OBJECTS to branch

This commit is contained in:
Derek S. Ray
2015-02-17 13:58:27 -05:00
committed by Sean Hunt
parent 5ee52039ca
commit 4dddb97301
15 changed files with 12 additions and 133 deletions

View File

@@ -242,26 +242,14 @@ nothing_to_steal:
retry:
tmp = 0;
for(otmp = invent; otmp; otmp = otmp->nobj)
if ((!uarm || otmp != uarmc) && otmp != uskin
&& otmp->oclass != COIN_CLASS
#ifdef INVISIBLE_OBJECTS
&& (!otmp->oinvis || perceives(mtmp->data))
#endif
)
tmp += ((otmp->owornmask &
(W_ARMOR | W_RING | W_AMUL | W_TOOL)) ? 5 : 1);
if ((!uarm || otmp != uarmc) && otmp != uskin && otmp->oclass != COIN_CLASS)
tmp += ((otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL)) ? 5 : 1);
if (!tmp) goto nothing_to_steal;
tmp = rn2(tmp);
for(otmp = invent; otmp; otmp = otmp->nobj)
if ((!uarm || otmp != uarmc) && otmp != uskin
&& otmp->oclass != COIN_CLASS
#ifdef INVISIBLE_OBJECTS
&& (!otmp->oinvis || perceives(mtmp->data))
#endif
)
if((tmp -= ((otmp->owornmask &
(W_ARMOR | W_RING | W_AMUL | W_TOOL)) ? 5 : 1)) < 0)
break;
if ((!uarm || otmp != uarmc) && otmp != uskin && otmp->oclass != COIN_CLASS)
if((tmp -= ((otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL)) ? 5 : 1)) < 0)
break;
if(!otmp) {
impossible("Steal fails!");
return(0);