diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-13 17:49:42 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-13 17:49:42 +0000 |
commit | be6a0a38de9cba44caca289f155d46df6324d0a5 (patch) | |
tree | 70eb4fee49e3ea473a14ebdb848a7d0c74e3e5b5 /crawl-ref/source/religion.cc | |
parent | e6525c83826d150eb2a283ce5bf23218cb75f82e (diff) | |
download | crawl-ref-be6a0a38de9cba44caca289f155d46df6324d0a5.tar.gz crawl-ref-be6a0a38de9cba44caca289f155d46df6324d0a5.zip |
Bunch of changes:
Removed unnecessary static_casts<> from branch.cc, improved messages a bit.
Removed incorrect caps from entomb().
Changed ornate/legendary bonuses from percentages to flat power bonuses
(+150 and +300 respectively.)
Ensured at least one Nemelex gift by the time you get the first power.
Changed probability of Nemelex liking a gift, made it dependent on
piety.
Fix warning in cloud.cc.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2850 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r-- | crawl-ref/source/religion.cc | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 93b59a40d3..8f203d69fc 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -596,10 +596,15 @@ static void show_pure_deck_chances() static void give_nemelex_gift() { - if (random2(MAX_PIETY) <= you.piety - && one_chance_in(3) - && !you.attribute[ATTR_CARD_COUNTDOWN] - && !grid_destroys_items(grd[you.x_pos][you.y_pos])) + if ( grid_destroys_items(grd[you.x_pos][you.y_pos]) ) + return; + + // Nemelex will give at least one gift early. + if ((you.num_gifts[GOD_NEMELEX_XOBEH] == 0 + && random2(piety_breakpoint(1)) < you.piety) || + (random2(MAX_PIETY) <= you.piety + && one_chance_in(3) + && !you.attribute[ATTR_CARD_COUNTDOWN])) { misc_item_type gift_type; if ( random2(MAX_PIETY) <= you.piety ) @@ -3245,9 +3250,11 @@ void offer_items() // 60: 50.0% // 70: 58.0% // 80: 63.0% - if ((item.base_type == OBJ_CORPSES && coinflip()) - // Nemelex piety gain is fairly fast. - || random2(value) >= random2(60)) + if ((item.base_type == OBJ_CORPSES && + one_chance_in(2+you.piety/50)) + // Nemelex piety gain is fairly fast...at least + // when you have low piety. + || value/2 >= random2(30 + you.piety/2)) { gain_piety(1); gained_piety = true; |