Add another optional parameter to items() of makeitem.{cc,h}, the agent

parameter. If not -1 then it will be used to set the acquirement agent of the item. This is done in items() so that make_item_randart() can use it if it's called from items(). Before this _god_fits_artefact() in randart.cc was only being called for choosing an appropriate god for random artifact names, and not to check the appropriateness of the randart proeprties chosen for randart god gifts.

Changed _god_fits_artefact() so that if a bug leads a god to gifting an item with an inapropriate base_type or sub_type that it will give an assertion or error message instead of causing make_item_randart() to go into an infinite loop.

git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7726 c06c8d41-db1a-0410-9941-cceddc491573

Created by  zelgadis  on December 3, 2008
JJVROJMJVKS7VN5HJNB4ZNCG7Y6EMHJQZR3MDN2VZCFTZC73HOZQC
Dependencies
In channels
main
Change contents