diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-05-17 01:29:38 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-05-17 01:29:38 +0000 |
commit | a10146ff5a744a2add4b50d697f28bc785ba2217 (patch) | |
tree | f4761a9676c5146bfd34f448b762a754b949717f /crawl-ref/source/religion.cc | |
parent | a08c869de350186368c2b009d0bee00949f77804 (diff) | |
download | crawl-ref-a10146ff5a744a2add4b50d697f28bc785ba2217.tar.gz crawl-ref-a10146ff5a744a2add4b50d697f28bc785ba2217.zip |
When using Elyvilon's weapon destruction against missiles, count each
missile individually, as we do with Nemelex already. Also, increase the
value of large rocks; they're mundane, but they do massive damage, so
they should be worth more than ordinary darts or stones.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9787 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r-- | crawl-ref/source/religion.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 7217147444..d7fb25671a 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -3872,7 +3872,6 @@ static bool _destroyed_valuable_weapon(int value, int type) return (true); // Medium valuable items are more likely to net piety at low piety. - // This includes missiles in sufficiently large quantities. if (random2(value) >= random2(100) && one_chance_in(1 + you.piety / 50)) { @@ -3915,7 +3914,8 @@ bool ely_destroy_weapons() continue; } - const int value = item_value(item, true); + // item_value() multiplies by quantity. + const int value = item_value(item, true) / item.quantity; #ifdef DEBUG_DIAGNOSTICS mprf(MSGCH_DIAGNOSTICS, "Destroyed weapon value: %d", value); #endif @@ -6303,7 +6303,8 @@ static void _give_sac_group_feedback(int which) static piety_gain_t _sacrifice_one_item_noncount(const item_def& item) { piety_gain_t relative_piety_gain = PIETY_NONE; - // item_value() multiplies by quantity + + // item_value() multiplies by quantity. const int value = item_value(item) / item.quantity; switch (you.religion) |