Made manuals visibly different from spellbooks. Also, you can't cancel reading a manual; so you risk wasting it if you read all unIDed books.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2851 c06c8d41-db1a-0410-9941-cceddc491573
G6WNKWA4GNUGNOH63AKXJQMQS2V4FGJ55CB4P2Z3MPSX3UPMVF6AC
LZ4UZ7OHXQZ6KQHDKAJ53SYUDICKYODTPDYK52PEBLWUFU6BZIHAC
5BJPWUPLJFS34FUTFJVKA4A52YMIGV6EWDXLNSDCWBJWBGVSQFGQC
KFULGQQOHWUTXOM3BXCCYPGGVGGY4Z6265XUFRCBPNLTZAEHJZSQC
VNHFP63ZLLZU3A3PLXP4BITX57DUIYDHFOHQYK3BOBHV3S64G26QC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
DDU4A3JGN5IUIPP5IASOODKPR2WBHSDSV4FITZ6HNXNSXXQACWAQC
B62ICMDTN5V7R7RBL4JALFVKEMVOOVLRSJASRNYS6CGFWBEEF5JQC
X5WLJCJVW55SXZVP7IKP7ADCJIGNKN4PKAXFECVR6TNK7XSMZR7QC
YCL3W2PFE6ILTGBFODCSXNPDIA46KVSZP2TI7HDMYAOEJT65RIEAC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
spell_index = letter_to_index( spell );
const spell_type nthing =
which_spell_in_book(you.inv[item_slot].sub_type, spell_index);
if (nthing == SPELL_NO_SPELL)
const spell_type spell = which_spell_in_book(book.sub_type,
letter_to_index(ltr));
if (spell == SPELL_NO_SPELL)
temp_rand = random2(23) + random2( you.skills[SK_EVOCATIONS] / 3 );
const spell_type spell_casted =
((temp_rand > 24) ? SPELL_LEHUDIBS_CRYSTAL_SPEAR :
(temp_rand > 21) ? SPELL_BOLT_OF_FIRE :
(temp_rand > 18) ? SPELL_BOLT_OF_COLD :
(temp_rand > 16) ? SPELL_LIGHTNING_BOLT :
(temp_rand > 10) ? SPELL_FIREBALL :
(temp_rand > 9) ? SPELL_VENOM_BOLT :
(temp_rand > 8) ? SPELL_BOLT_OF_DRAINING :
(temp_rand > 7) ? SPELL_BOLT_OF_INACCURACY :
(temp_rand > 6) ? SPELL_STICKY_FLAME :
(temp_rand > 5) ? SPELL_TELEPORT_SELF :
(temp_rand > 4) ? SPELL_CIGOTUVIS_DEGENERATION :
(temp_rand > 3) ? SPELL_POLYMORPH_OTHER :
(temp_rand > 2) ? SPELL_MEPHITIC_CLOUD :
(temp_rand > 1) ? SPELL_THROW_FLAME :
(temp_rand > 0) ? SPELL_THROW_FROST
: SPELL_MAGIC_DART);
spell_casted = ((temp_rand > 19) ? SPELL_FIREBALL :
(temp_rand > 16) ? SPELL_BOLT_OF_FIRE :
(temp_rand > 13) ? SPELL_BOLT_OF_COLD :
(temp_rand > 11) ? SPELL_LIGHTNING_BOLT :
(temp_rand > 10) ? SPELL_LEHUDIBS_CRYSTAL_SPEAR :
(temp_rand > 9) ? SPELL_VENOM_BOLT :
(temp_rand > 8) ? SPELL_BOLT_OF_DRAINING :
(temp_rand > 7) ? SPELL_BOLT_OF_INACCURACY :
(temp_rand > 6) ? SPELL_STICKY_FLAME :
(temp_rand > 5) ? SPELL_TELEPORT_SELF :
(temp_rand > 4) ? SPELL_CIGOTUVIS_DEGENERATION :
(temp_rand > 3) ? SPELL_POLYMORPH_OTHER :
(temp_rand > 2) ? SPELL_MEPHITIC_CLOUD :
(temp_rand > 1) ? SPELL_THROW_FLAME :
(temp_rand > 0) ? SPELL_THROW_FROST
: SPELL_MAGIC_DART);
your_spells( spell_casted, powc, false );
} // end tome_of_power()
void skill_manual(char sc_read_2)
void skill_manual(int slot)
set_ident_flags( you.inv[sc_read_2], ISFLAG_IDENT_MASK );
const int skill = you.inv[sc_read_2].plus;
const char* skname = skill_name(skill);
mprf("This is a manual of %s!", skname);
// Removed confirmation request because you know it's
// a manual in advance.