summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/effects.cc14
-rw-r--r--crawl-ref/source/effects.h8
-rw-r--r--crawl-ref/source/wiz-item.cc10
3 files changed, 18 insertions, 14 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);
}
diff --git a/crawl-ref/source/effects.h b/crawl-ref/source/effects.h
index c430e17be2..dbabe6cd48 100644
--- a/crawl-ref/source/effects.h
+++ b/crawl-ref/source/effects.h
@@ -55,12 +55,12 @@ void collect_radius_points(std::vector<std::vector<coord_def> > &radius_points,
void random_uselessness(int scroll_slot = -1);
bool acquirement(object_class_type force_class, int agent,
- bool quiet = false, int *item_index = NULL);
+ bool quiet = false, int *item_index = NULL,
+ bool debug = false);
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 = false);
bool recharge_wand(const int item_slot = -1);
diff --git a/crawl-ref/source/wiz-item.cc b/crawl-ref/source/wiz-item.cc
index bc72ffc00e..f214c2846c 100644
--- a/crawl-ref/source/wiz-item.cc
+++ b/crawl-ref/source/wiz-item.cc
@@ -889,7 +889,7 @@ static void _debug_acquirement_stats(FILE *ostat)
int item_index = NON_ITEM;
- if (!acquirement(type, AQ_WIZMODE, true, &item_index)
+ if (!acquirement(type, AQ_WIZMODE, true, &item_index, true)
|| item_index == NON_ITEM
|| !mitm[item_index].is_valid())
{
@@ -964,6 +964,7 @@ static void _debug_acquirement_stats(FILE *ostat)
EQ_GLOVES, EQ_BOOTS, EQ_AMULET, EQ_RIGHT_RING, EQ_LEFT_RING
};
+ bool naked = true;
for (int i = 0; i < NUM_EQUIP; i++)
{
int eqslot = e_order[i];
@@ -979,10 +980,11 @@ static void _debug_acquirement_stats(FILE *ostat)
fprintf(ostat, "%-7s: %s %s\n", equip_slot_to_name(eqslot),
item.name(DESC_PLAIN, true).c_str(),
melded ? "(melded)" : "");
+ naked = false;
}
-// else if (e_order[i] == EQ_WEAPON)
-// fprintf(ostat, "%-7s: unarmed\n", equip_slot_to_name(eqslot));
}
+ if (naked)
+ fprintf(ostat, "Not wearing or wielding anything.\n");
// Also print the skills, in case they matter.
std::string skills = "\nSkills:\n";
@@ -992,7 +994,7 @@ static void _debug_acquirement_stats(FILE *ostat)
// TODO: For spellbooks, for each spell discipline list the number of
// known spells and castable seen/unseen spells
- fprintf(ostat, "Acquirement called %d times, total quantity = %d\n\n",
+ fprintf(ostat, "\nAcquirement called %d times, total quantity = %d\n\n",
acq_calls, total_quant);
fprintf(ostat, "%5.2f%% artefacts.\n",