diff options
author | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2009-12-15 23:17:59 +0100 |
---|---|---|
committer | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2009-12-16 00:37:56 +0100 |
commit | eafd79ae664bb6e38f4ddcd97fda1ef60570e0e1 (patch) | |
tree | 3e264a6a5a1d971925e9a55fabd6f84e64d79315 /crawl-ref/source/effects.cc | |
parent | 88cc1ee26273aa1b2030efaabba3b5886125df07 (diff) | |
download | crawl-ref-eafd79ae664bb6e38f4ddcd97fda1ef60570e0e1.tar.gz crawl-ref-eafd79ae664bb6e38f4ddcd97fda1ef60570e0e1.zip |
Don't mark books acquired during acquirement statistics as "seen".
This _could_ be useful for the question "Which books can I expect to have
seen after N acquirements?"
However, when running the acquirement statistics I prefer a slightly
different question: "What are the chances of getting a certain book in
this precise situation?"
Don't know which of the two is the "correct" one, but I think it is annoying
if I have to recreate a character for my book acquirement statistics just
because the old one already "saw" all interesting spells, thus heavily
skewing the results.
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r-- | crawl-ref/source/effects.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 7573ca6313..e97fc60ac8 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -1959,9 +1959,8 @@ static int _failed_acquirement(bool quiet) } int acquirement_create_item(object_class_type class_wanted, - int agent, - bool quiet, - const coord_def &pos) + int agent, bool quiet, + const coord_def &pos, bool debug) { ASSERT(class_wanted != OBJ_RANDOM); @@ -2145,7 +2144,10 @@ int acquirement_create_item(object_class_type class_wanted, destroy_item(thing, true); return _failed_acquirement(quiet); } - mark_had_book(thing); + // Don't mark books as seen if only generated for the + // acquirement statistics. + if (!debug) + mark_had_book(thing); } else if (thing.base_type == OBJ_JEWELLERY) { @@ -2288,7 +2290,7 @@ int acquirement_create_item(object_class_type class_wanted, } bool acquirement(object_class_type class_wanted, int agent, - bool quiet, int* item_index) + bool quiet, int* item_index, bool debug) { ASSERT(!crawl_state.arena); @@ -2369,7 +2371,7 @@ bool acquirement(object_class_type class_wanted, int agent, } *item_index = - acquirement_create_item(class_wanted, agent, quiet, you.pos()); + acquirement_create_item(class_wanted, agent, quiet, you.pos(), debug); return (*item_index != NON_ITEM); } |