remove and transfer INVISIBLE_OBJECTS to branch

This commit is contained in:
Derek S. Ray
2015-03-17 18:46:49 +02:00
committed by Pasi Kallinen
parent 8fa8e02415
commit 66289b13ab
15 changed files with 12 additions and 133 deletions
+5 -17
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);