changed, fixed. We should now see the demon of the infinite void a lot less often.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1815 c06c8d41-db1a-0410-9941-cceddc491573
52XHD5LKS6UVLXBYUXMPTMVMTXQ6FBUFXJ2TAW6R7CSJY7OXWVJAC
// Remember lava!
object_class_type class_wanted = OBJ_RANDOM;
unsigned char type_wanted = OBJ_RANDOM;
unsigned char unique = 1;
if (force_class == OBJ_RANDOM)
{
mpr("This is a scroll of acquirement!");
query:
mpr( "[a|A] Weapon [b|B] Armour [c|C] Jewellery [d|D] Book" );
mpr( "[e|E] Staff [f|F] Food [g|G] Miscellaneous [h|H] Gold" );
//mpr("[r|R] - Just give me something good.");
mpr("What kind of item would you like to acquire? ", MSGCH_PROMPT);
keyin = tolower( get_ch() );
if (keyin == 'a')
class_wanted = OBJ_WEAPONS;
else if (keyin == 'b')
class_wanted = OBJ_ARMOUR;
else if (keyin == 'c')
class_wanted = OBJ_JEWELLERY;
else if (keyin == 'd')
class_wanted = OBJ_BOOKS;
else if (keyin == 'e')
class_wanted = OBJ_STAVES;
else if (keyin == 'f')
class_wanted = OBJ_FOOD;
else if (keyin == 'g')
class_wanted = OBJ_MISCELLANY;
else if (keyin == 'h')
class_wanted = OBJ_GOLD;
}
else
class_wanted = force_class;
return (type_wanted);
}
bool acquirement(object_class_type class_wanted, int agent)
{
int thing_created = 0;
// Remember lava!
int type_wanted = OBJ_RANDOM;
int unique = 1;
while (class_wanted == OBJ_RANDOM)
{
mesclr();
mpr("This is a scroll of acquirement!");
mpr( "[a|A] Weapon [b|B] Armour [c|C] Jewellery [d|D] Book" );
mpr( "[e|E] Staff [f|F] Food [g|G] Miscellaneous [h|H] Gold" );
mpr("What kind of item would you like to acquire? ", MSGCH_PROMPT);
const int keyin = tolower( get_ch() );
if (keyin == 'a')
class_wanted = OBJ_WEAPONS;
else if (keyin == 'b')
class_wanted = OBJ_ARMOUR;
else if (keyin == 'c')
class_wanted = OBJ_JEWELLERY;
else if (keyin == 'd')
class_wanted = OBJ_BOOKS;
else if (keyin == 'e')
class_wanted = OBJ_STAVES;
else if (keyin == 'f')
class_wanted = OBJ_FOOD;
else if (keyin == 'g')
class_wanted = OBJ_MISCELLANY;
else if (keyin == 'h')
class_wanted = OBJ_GOLD;
}