summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-06 03:04:53 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-06 03:04:53 +0000
commiteb9ac5f3b834de412a88eccf346ce0bd064d2e9c (patch)
tree7c4f0697735edb550d3a96728ac9bec29963209c /crawl-ref
parentdd0eb9eb3ac3cdde10a40639ac099141b2916d42 (diff)
downloadcrawl-ref-eb9ac5f3b834de412a88eccf346ce0bd064d2e9c.tar.gz
crawl-ref-eb9ac5f3b834de412a88eccf346ce0bd064d2e9c.zip
Make all the starting equipment of arena monsters fully identified, plus
randomize the colour of their potions and scrolls so as to not leak any info to the player. During arena mode don't display the pluses, curse status or glowing/runed/etc status of items. Don't learn-through-observation the identities of potions/wands/etc during arena mode. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8257 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/arena.cc17
-rw-r--r--crawl-ref/source/itemname.cc6
2 files changed, 22 insertions, 1 deletions
diff --git a/crawl-ref/source/arena.cc b/crawl-ref/source/arena.cc
index 074f99518b..cd0b2896d2 100644
--- a/crawl-ref/source/arena.cc
+++ b/crawl-ref/source/arena.cc
@@ -757,6 +757,23 @@ bool arena_veto_random_monster(monster_type type)
void arena_placed_monster(monsters *monster, const mgen_data &mg,
bool first_band_member)
{
+ for (int i = 0; i < NUM_MONSTER_SLOTS; i++)
+ {
+ short it = monster->inv[i];
+ if (it != NON_ITEM)
+ {
+ item_def &item(mitm[it]);
+ item.flags |= ISFLAG_IDENT_MASK;
+
+ // Don't leak info on wands or potions.
+ if (item.base_type == OBJ_WANDS
+ || item.base_type == OBJ_POTIONS)
+ {
+ item.colour = random_colour();
+ }
+ }
+ }
+
if (arena::name_monsters && !monster->is_named())
monster->mname = make_name(random_int(), false);
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index cc17f9ce2e..7ae8372e2c 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -83,6 +83,10 @@ std::string item_def::name(description_level_type descrip,
bool quantity_words,
unsigned long ignore_flags) const
{
+ if (crawl_state.arena)
+ ignore_flags |= ISFLAG_KNOW_PLUSES | ISFLAG_KNOW_CURSE
+ | ISFLAG_COSMETIC_MASK;
+
if (descrip == DESC_NONE)
return ("");
@@ -1726,7 +1730,7 @@ id_arr& get_typeid_array()
void set_ident_type( item_def &item, item_type_id_state_type setting,
bool force )
{
- if (is_artefact(item))
+ if (is_artefact(item) || crawl_state.arena)
return;
item_type_id_state_type old_setting = get_ident_type(item);