assigned arbitrarily and probably much too good. (There's a 50% chance of getting one of hasting, healing, teleportation, or fireball.)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10503 c06c8d41-db1a-0410-9941-cceddc491573
HG54HNDIBBRTBEXZZXDQJNSL3TDMCCLGL2VUQMN2C2ZR4OV7E42QC L2HDKXXUL27V7CTKPRAJMUVZNV6ZVSWVEYEOWZZ6NO6O7Y2THDZQC 43XCHFXZ34FDVT2QG23RZ65V6NRBY6PE3ENQEEDXFYKRR7IRFHCAC KFULGQQOHWUTXOM3BXCCYPGGVGGY4Z6265XUFRCBPNLTZAEHJZSQC OE3TD4J5FSIFAM37J2UPEV7QQNXLSZM6GDUMPI66LC5LW2OM2J4AC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC HHHZGZT7QAERYSE26QGJPFAV6TQQXXECP6RTCLF6SZQ5L6GTXPWAC 52XHD5LKS6UVLXBYUXMPTMVMTXQ6FBUFXJ2TAW6R7CSJY7OXWVJAC BSI5DB3LVY42ZHOS46X2CAPPVOSOTTQWFGLTMAKRFTROI5BQWFDQC CCRQESB4ADT4WA7FGLNZZXAJ6G5QMCTYCZIWORBN45P6ZPILC34AC }static int _acquirement_wand_subtype(){int picked = NUM_WANDS;int total = 0;for (int type = 0; type < NUM_WANDS; ++type){int w = 0;// First, weight according to usefulness.// (The numbers are approximately percentages.)switch (type){case WAND_HASTING:case WAND_HEALING:w = 15; break;case WAND_TELEPORTATION:case WAND_FIREBALL:w = 10; break;case WAND_INVISIBILITY:case WAND_DIGGING:case WAND_DISINTEGRATION:case WAND_POLYMORPH_OTHER:w = 7; break;case WAND_FIRE:case WAND_COLD:case WAND_LIGHTNING:w = 5; break;default:w = 1; break;}// Unknown wands get another huge weight bonus.if (get_ident_type(OBJ_WANDS, type) == ID_UNKNOWN_TYPE)w += 10;total += w;if (x_chance_in_y(w, total))picked = type;}return (picked);
case OBJ_MISCELLANY: type_wanted = _acquirement_misc_subtype(); break;case OBJ_STAVES: type_wanted = _acquirement_staff_subtype(already_has);
case OBJ_MISCELLANY: type_wanted = _acquirement_misc_subtype(); break;case OBJ_WANDS: type_wanted = _acquirement_wand_subtype(); break;case OBJ_STAVES: type_wanted = _acquirement_staff_subtype(already_has);
case 'a': class_wanted = OBJ_WEAPONS; break;case 'b': class_wanted = OBJ_ARMOUR; break;case 'c': class_wanted = OBJ_JEWELLERY; break;case 'd': class_wanted = OBJ_BOOKS; break;case 'e': class_wanted = OBJ_STAVES; break;case 'f': class_wanted = OBJ_FOOD; break;case 'g': class_wanted = OBJ_MISCELLANY; break;case 'h': class_wanted = OBJ_GOLD; break;
case 'a': case ')': class_wanted = OBJ_WEAPONS; break;case 'b': case '[': case ']': class_wanted = OBJ_ARMOUR; break;case 'c': case '=': case '"': class_wanted = OBJ_JEWELLERY; break;case 'd': case '+': case ':': class_wanted = OBJ_BOOKS; break;case 'e': case '\\': case '|': class_wanted = OBJ_STAVES; break;case 'f': case '/': class_wanted = OBJ_WANDS; break;case 'g': case '}': case '{': class_wanted = OBJ_MISCELLANY; break;case 'h': case '%': class_wanted = OBJ_FOOD; break;case 'i': case '$': class_wanted = OBJ_GOLD; break;