diff options
author | Raphael Langella <raphael.langella@gmail.com> | 2011-03-21 22:07:04 +0100 |
---|---|---|
committer | Raphael Langella <raphael.langella@gmail.com> | 2011-03-21 22:07:04 +0100 |
commit | 095afaccfeca21c5621c9a746d8a2103e6d39bfb (patch) | |
tree | 137702f12a38bf4da261fd0280d93b42c68e0e7b /crawl-ref/source/props.h | |
parent | 289229c3ac78d7b552c232e30326729bc3007098 (diff) | |
download | crawl-ref-095afaccfeca21c5621c9a746d8a2103e6d39bfb.tar.gz crawl-ref-095afaccfeca21c5621c9a746d8a2103e6d39bfb.zip |
Ashenzari also warns about monsters' wands.
Chance is the same as for other items: boundedness / 3.
It has some (good) side effects. Now, if the player sees a monster pick or use
a wand, then it will be shown in xv and ctrl+x modes. It will respect the
player 's knowledge of the specific wand.
I also added a props.h file to document specific props keys. Not sure if
doxygen has taken it into account or if the syntax is correct, but I felt
we needed a place to document them. Documenting directly in actor.h would
have lead to a lot of recompiling on each documentation update.
Diffstat (limited to 'crawl-ref/source/props.h')
-rw-r--r-- | crawl-ref/source/props.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/crawl-ref/source/props.h b/crawl-ref/source/props.h new file mode 100644 index 0000000000..e3342c9d40 --- /dev/null +++ b/crawl-ref/source/props.h @@ -0,0 +1,28 @@ +/*! \class actor + \brief Virtual base class for player and monster classes. + + Contains all the properties and methods common to monsters and players. +*/ + +/*! \var CrawlHashTable props + \brief Properties hash table. + + actor keys + public + private + + player keys + public + private + + monster keys + public + "wand_known" For wands, we can't simply rely on item knowledge, because + if the player has already identified the wand type, item_type_known + returns true regarding player's knowledge of this specific wand. + Thus, we track wand knowledge using this key. + If the property exists, it means the player knows the monster has a wand. + If it's true, the player also knows it's type. + + private +*/ |