diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-13 14:19:42 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-13 14:19:42 +0000 |
commit | 1572e9c9223b1b45eada6fec2e1a82eb6950ebfd (patch) | |
tree | 722a3bd7d205b8ade2d81b39e5c68ddf77c7c099 /crawl-ref/source/religion.cc | |
parent | 71c47c6d4e6a0b05f439f08dfabf6a83f481fa2f (diff) | |
download | crawl-ref-1572e9c9223b1b45eada6fec2e1a82eb6950ebfd.tar.gz crawl-ref-1572e9c9223b1b45eada6fec2e1a82eb6950ebfd.zip |
Added several new tutorial triggers including information on being caught
in a net, specific skills, magic resistance, and which stat to choose.
In a given game you'll only ever see a small fraction of all tutorial
events (we're at 71 now, and some of them are exclusive). In fact, a lot
of the information is so generally useful (esp. on gods, skills and items)
that I'm seriously considering opening up the general information (How do I
use item x? What does Spellcasting do?) to a wider selection of characters.
I don't think we'll want to explain the intricacies of Mummies, Ghouls,
or Vampires, but a lot of this stuff even applies to them... (If we
overhaul the tutorial, it's certainly not a 0.4 target, though.)
Resetting the tutorial version to 8 as we somehow switched from digital
version to binary and back to digital. It will take some time until we
actually reach 110, and by then, I am sure the base files won't be save
compatible anymore. :)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5777 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r-- | crawl-ref/source/religion.cc | 88 |
1 files changed, 45 insertions, 43 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 813a1979dd..0a0d2ad4a3 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -2713,11 +2713,16 @@ bool is_evil_item(const item_def& item) bool god_dislikes_item_handling(const item_def &item) { - return (item_type_known(item) - && (is_good_god(you.religion) && is_evil_item(item) - || you.religion == GOD_TROG && item.base_type == OBJ_BOOKS - && item.sub_type != BOOK_MANUAL - && item.sub_type != BOOK_DESTRUCTION)); + if (you.religion == GOD_TROG) + { + return (item.base_type == OBJ_BOOKS + && item.sub_type != BOOK_MANUAL + && (!item_type_known(item) + || item.sub_type != BOOK_DESTRUCTION)); + } + + return (is_good_god(you.religion) && is_evil_item(item) + && item_type_known(item)); } // Is the destroyed weapon valuable enough to gain piety by doing so? @@ -2810,7 +2815,7 @@ bool ely_destroy_weapons() return success; } -// returns false if invocation fails (no books in sight etc.) +// Returns false if the invocation fails (no books in sight etc.). bool trog_burn_books() { if (you.religion != GOD_TROG) @@ -2877,47 +2882,44 @@ bool trog_burn_books() continue; } - rarity += book_rarity(mitm[i].sub_type); - // Piety increases by 2 for books never picked up, else by 1. - if (mitm[i].flags & ISFLAG_DROPPED - || mitm[i].flags & ISFLAG_THROWN) - { - totalpiety++; - } - else - totalpiety += 2; + rarity += book_rarity(mitm[i].sub_type); + // Piety increases by 2 for books never cracked open, else 1. + // Conversely, rarity influences the duration of the pyre. + if (!item_type_known(mitm[i])) + totalpiety += 2; + else + totalpiety++; #ifdef DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, "Burned book rarity: %d", rarity); + mprf(MSGCH_DIAGNOSTICS, "Burned book rarity: %d", rarity); #endif + destroy_item(i); + count++; + i = next; + } + + if (count) + { + if (cloud != EMPTY_CLOUD) + { + // Reinforce the cloud. + mpr( "The fire roars with new energy!" ); + const int extra_dur = count + random2(rarity/2); + env.cloud[cloud].decay += extra_dur * 5; + env.cloud[cloud].whose = KC_YOU; + continue; + } - destroy_item(i); - count++; - i = next; - } - - if (count) - { - if ( cloud != EMPTY_CLOUD ) - { - // reinforce the cloud - mpr( "The fire roars with new energy!" ); - const int extra_dur = count + random2(rarity/2); - env.cloud[cloud].decay += extra_dur * 5; - env.cloud[cloud].whose = KC_YOU; - continue; - } - - int durat = 4 + count + random2(rarity/2); - - if (durat > 23) - durat = 23; - - place_cloud( CLOUD_FIRE, xpos, ypos, durat, KC_YOU ); - - mpr(count == 1 ? "The book bursts into flames." - : "The books burst into flames.", MSGCH_GOD); - } + int durat = 4 + count + random2(rarity/2); + + if (durat > 23) + durat = 23; + + place_cloud( CLOUD_FIRE, xpos, ypos, durat, KC_YOU ); + + mpr(count == 1 ? "The book bursts into flames." + : "The books burst into flames.", MSGCH_GOD); + } } |