summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tile1.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-02-10 13:32:04 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-02-10 13:32:04 +0000
commita028038652c432ed0ee67ca632edea8deb410ef0 (patch)
treef53d054bb9f1510aab468008626b94aa596ca77b /crawl-ref/source/tile1.cc
parent269aa80ee67b5a50709de6d678892b63a7fbe75b (diff)
downloadcrawl-ref-a028038652c432ed0ee67ca632edea8deb410ef0.tar.gz
crawl-ref-a028038652c432ed0ee67ca632edea8deb410ef0.zip
Rework staves/rods to match the ID behaviour of wands etc., i.e.
they get randomised but fixed descriptions at the beginning of the game, and once you know one type you'll be able to recognize another staff/rod of the same type. In the case of rods you'll still have to evoke it to find out the number of charges. I've tried to put the secondary descriptions into an order that will roughly match the ten current staff tiles. This solves part of FR 1837348, and is likely to cause havoc to saved games, at least concerning staves. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3424 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tile1.cc')
-rw-r--r--crawl-ref/source/tile1.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/crawl-ref/source/tile1.cc b/crawl-ref/source/tile1.cc
index 25c7352cc6..cdf12cdf45 100644
--- a/crawl-ref/source/tile1.cc
+++ b/crawl-ref/source/tile1.cc
@@ -1611,7 +1611,13 @@ int tileidx_item(const item_def &item)
return TILE_BOOK_PAPYRUS;
case OBJ_STAVES:
- return TILE_STAFF_OFFSET + special % 10;
+/*
+ if (id[ IDTYPE_STAVES ][type] == ID_KNOWN_TYPE
+ || (item.flags &ISFLAG_KNOW_TYPE ))
+ return TILE_STAFF_WIZARDRY + type;
+*/
+ // try to return an appropriate tile
+ return TILE_STAFF_OFFSET + (special / 4) % 10;
case OBJ_CORPSES:
if (item.sub_type == CORPSE_SKELETON)
@@ -3972,6 +3978,13 @@ static int item_unid_type(const item_def &item)
return 1;
else
return 0;
+
+ case OBJ_STAVES:
+ id0 = id[ IDTYPE_STAVES ][s];
+ if (id0 != ID_KNOWN_TYPE)
+ return 1;
+ else
+ return 0;
}
return 0;
}