Pull request by Theyflower: carrying a loadstone prevents big
monsters from hitting their target for knockback effect, same as
wielding Giantslayer.
The PR code needed fixing (unintended switch from 'otmp' to 'obj')
so I didn't use the commeit. The PR code also required that the
loadstone be blessed which sounds nethackish but would mean that
nobody would ever notice. Allow carrying any loadstone to prevent
being knocked back. It will still be a rare accident or uncommon
tactical decision. (It doesn't happen if the target is flying or
levitating because those checks deliberately come first.)
supersedes #906
closes #906
some large monsters can knock back smaller monsters with a hit
change Demonbane to a mace, make it the first sac gift for priests,
and give it an invoke ability to banish demons
-wielding Giantslayer prevents knockback from larger monsters
+wielding Giantslayer prevents knockback from larger monsters; likewise for
+ carried loadstone(s)
scared hostile monster which cannot move away will attack
prevent a fog cloud that has engulfed the hero from moving under closed doors
allow cutting a known spider web with wielded weapon by force-fighting the web
if (is_art(otmp, ART_GIANTSLAYER))
return TRUE;
+
+ /* steadfast if carrying any loadstone (and not floating or flying) */
+ for (otmp = is_u ? g.invent : mtmp->minvent; otmp; otmp = otmp->nobj)
+ if (otmp->otyp == LOADSTONE)
+ return TRUE;
+
return FALSE;
}