diff options
author | Stefan O'Rear <stefanor@cox.net> | 2009-11-02 01:15:51 -0800 |
---|---|---|
committer | Stefan O'Rear <stefanor@cox.net> | 2009-11-02 01:16:01 -0800 |
commit | b5cf9fc68435f29c831ebd60b8a2c4cd80f7773f (patch) | |
tree | 7aff6a73e7706874888b738b8a4aa177fa1f1d90 /crawl-ref/source/ouch.cc | |
parent | 533471df126b96e8b1a06f0baaedd2f1caf015c0 (diff) | |
download | crawl-ref-b5cf9fc68435f29c831ebd60b8a2c4cd80f7773f.tar.gz crawl-ref-b5cf9fc68435f29c831ebd60b8a2c4cd80f7773f.zip |
Implement conservation mutations for new DS
Diffstat (limited to 'crawl-ref/source/ouch.cc')
-rw-r--r-- | crawl-ref/source/ouch.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 8a06b6357e..96f806bbfc 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -456,6 +456,21 @@ static bool _expose_invent_to_element(beam_type flavour, int strength) continue; } + // These stack with conservation; they're supposed to be good. + if (target_class == OBJ_SCROLLS + && you.mutation[MUT_CONSERVE_SCROLLS] + && !one_chance_in(10)) + { + continue; + } + + if (target_class == OBJ_POTIONS + && you.mutation[MUT_CONSERVE_POTIONS] + && !one_chance_in(10)) + { + continue; + } + // Loop through all items in the stack. for (int j = 0; j < you.inv[i].quantity; ++j) { |