diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-08-04 20:53:33 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-08-04 20:53:33 +0000 |
commit | e51a590beed02f0445ec463309f1c3e2b7f67fc2 (patch) | |
tree | b2a65574798686836734ef1f594f177a352dfc98 /crawl-ref/source/religion.cc | |
parent | 1f3c5a4d49e8059489b4b66dab75ddc2ac200626 (diff) | |
download | crawl-ref-e51a590beed02f0445ec463309f1c3e2b7f67fc2.tar.gz crawl-ref-e51a590beed02f0445ec463309f1c3e2b7f67fc2.zip |
Tweaked piety gain for burning books (Trog ability).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1968 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r-- | crawl-ref/source/religion.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 3ac6d2d957..d9ace426eb 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -1549,7 +1549,7 @@ void trog_burn_books() i = next; } - int totalcount = 0; + int totalpiety = 0; for (int xpos = you.x_pos - 8; xpos < you.x_pos + 8; xpos++) for (int ypos = you.y_pos - 8; ypos < you.y_pos + 8; ypos++) { @@ -1590,6 +1590,14 @@ void trog_burn_books() } 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; #ifdef DEBUG_DIAGNOSTICS mprf(MSGCH_DIAGNOSTICS, "Burned book rarity: %d", rarity); @@ -1602,7 +1610,6 @@ void trog_burn_books() if (count) { - totalcount += count; if ( cloud != EMPTY_CLOUD ) { // reinforce the cloud @@ -1632,14 +1639,14 @@ void trog_burn_books() } - if (!totalcount) + if (!totalpiety) { mpr("There are no books in sight to burn!"); } else { simple_god_message(" is delighted!", GOD_TROG); - gain_piety(totalcount*5); + gain_piety(totalpiety); } } |