diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-28 23:00:12 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-28 23:00:12 +0000 |
commit | ca1e897a646bb9c098a1fc651a3b4aa6c976ddc7 (patch) | |
tree | dbf6313bff2e2906a4f9ee61fdefff8594849522 /crawl-ref/source/spl-cast.cc | |
parent | 0f8c8527e5a685509462e0990a7b6ec6595e445a (diff) | |
download | crawl-ref-ca1e897a646bb9c098a1fc651a3b4aa6c976ddc7.tar.gz crawl-ref-ca1e897a646bb9c098a1fc651a3b4aa6c976ddc7.zip |
Apply r6640, r6694 (both by Darshan), r6670 (Haran), r6679 and r6703
(me) to branch.
Includes TSO no longer granting permanent allies and resultant friendly
pickup change, and a number of smaller changes.
Also update change log.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6709 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r-- | crawl-ref/source/spl-cast.cc | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index ed711ad7a1..adca9c8e4e 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -191,7 +191,7 @@ static std::string _spell_extra_description(spell_type spell) return desc.str(); } -int list_spells() +int list_spells(bool toggle_with_I) { ToggleableMenu spell_menu(MF_SINGLESELECT | MF_ANYPRINTABLE | MF_ALWAYS_SHOW_MORE | MF_ALLOW_FORMATTING); @@ -203,12 +203,22 @@ int list_spells() " Hunger Level", MEL_TITLE)); spell_menu.set_highlighter(NULL); - spell_menu.set_more(formatted_string("Press '!' or 'I' to toggle spell view.")); spell_menu.add_toggle_key('!'); - spell_menu.add_toggle_key('I'); + if (toggle_with_I) + { + spell_menu.set_more( + formatted_string("Press '!' or 'I' to toggle spell view.")); + spell_menu.add_toggle_key('I'); + } + else + { + spell_menu.set_more( + formatted_string("Press '!' to toggle spell view.")); + } + spell_menu.set_tag("spell"); - for ( int i = 0; i < 52; ++i ) + for (int i = 0; i < 52; ++i) { const char letter = index_to_letter(i); const spell_type spell = get_spell_by_letter(letter); @@ -1037,7 +1047,10 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) const bool needs_path = (!testbits(flags, SPFLAG_GRID) && !testbits(flags, SPFLAG_TARGET)); - if (!spell_direction(spd, beam, dir, targ, needs_path, true, prompt, + const bool dont_cancel_me = testbits(flags, SPFLAG_AREA); + + if (!spell_direction(spd, beam, dir, targ, needs_path, true, + dont_cancel_me, prompt, testbits(flags, SPFLAG_NOT_SELF))) { return (SPRET_ABORT); |