more steadfast
Make changes similar to the suggested patch from entrez: support for 'youmonst' as the monster passed to m_carrying(). This doesn't change carrying(otyp) to call m_carrying(&g.youmonst,otyp) though. Also, treat being on the Plane of Air or in an air bubble on the Plane of Water similar to flying or levitating: wielded Giantslayer (or carried loadstone) doesn't prevent knockback there.
This commit is contained in:
@@ -1285,15 +1285,17 @@ nxtobj(struct obj *obj, int type, boolean by_nexthere)
|
||||
return otmp;
|
||||
}
|
||||
|
||||
/* return inventory object of type 'type' if hero has one, otherwise Null */
|
||||
struct obj *
|
||||
carrying(int type)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
|
||||
/* this could be replaced by 'return m_carrying(&g.youmonst, type);' */
|
||||
for (otmp = g.invent; otmp; otmp = otmp->nobj)
|
||||
if (otmp->otyp == type)
|
||||
return otmp;
|
||||
return (struct obj *) 0;
|
||||
break;
|
||||
return otmp;
|
||||
}
|
||||
|
||||
/* Fictional and not-so-fictional currencies.
|
||||
|
||||
Reference in New Issue
Block a user