summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libgui.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-31 20:26:20 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-31 20:26:20 +0000
commit57ec78ae83592e5f55457fbcff4de929f5a9b7d7 (patch)
tree7f85295bb2791f405554336cc2e1ebb744571a4c /crawl-ref/source/libgui.cc
parent7df3a8aa8296fea631280b085f4c70a93fd23a54 (diff)
downloadcrawl-ref-57ec78ae83592e5f55457fbcff4de929f5a9b7d7.tar.gz
crawl-ref-57ec78ae83592e5f55457fbcff4de929f5a9b7d7.zip
Consolidate all cases where corpses are turned into skeletons, as
suggested by dolorous in BR 1977925, and turn coloured draconian corpses into plain draconian skeletons. Same when the game attempts to create coloured draconian skeletons or simulacrums. Added autoinscription to the single inscription command ('{') - this is necessary for items with long descriptions that can't autoinscribed otherwise. Added a small hack to make death cobs (%) appear correctly in the monster list. The rest is cleanup, I believe. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5376 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/libgui.cc')
-rw-r--r--crawl-ref/source/libgui.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/crawl-ref/source/libgui.cc b/crawl-ref/source/libgui.cc
index c45013a798..93f3c90cf8 100644
--- a/crawl-ref/source/libgui.cc
+++ b/crawl-ref/source/libgui.cc
@@ -1197,22 +1197,22 @@ int convert_cursor_pos(int mx, int my, int *cx, int *cy)
return id;
}
-// assumes the item is equipped in the first place!
+// NOTE: Assumes the item is equipped in the first place!
static bool _is_true_equipped_item(item_def item)
{
- // weapons and staves are only truly equipped if wielded
+ // Weapons and staves are only truly equipped if wielded.
if (item.link == you.equip[EQ_WEAPON])
return (item.base_type == OBJ_WEAPONS || item.base_type == OBJ_STAVES);
- // cursed armour and rings are only truly equipped if *not* wielded
+ // Cursed armour and rings are only truly equipped if *not* wielded.
return (item.link != you.equip[EQ_WEAPON]);
}
-// returns whether there's any action you can take with an item in inventory
-// apart from dropping it
+// Returns whether there's any action you can take with an item in inventory
+// apart from dropping it.
static bool _can_use_item(item_def item, bool equipped)
{
- // vampires can drain corpses
+ // Vampires can drain corpses.
if (item.base_type == OBJ_CORPSES)
{
return (you.species == SP_VAMPIRE
@@ -1223,20 +1223,20 @@ static bool _can_use_item(item_def item, bool equipped)
if (equipped && item_cursed(item))
{
- // misc. items/rods can always be evoked, cursed or not
+ // Misc. items/rods can always be evoked, cursed or not.
if (item.base_type == OBJ_MISCELLANY || item_is_rod(item))
return true;
- // you can't unwield/fire a wielded cursed weapon/staff
- // but cursed armour and rings can be unwielded without problems
+ // You can't unwield/fire a wielded cursed weapon/staff
+ // but cursed armour and rings can be unwielded without problems.
return (!_is_true_equipped_item(item));
}
- // mummies can't do anything with food or potions
+ // Mummies can't do anything with food or potions.
if (you.species == SP_MUMMY)
return (item.base_type != OBJ_POTIONS && item.base_type != OBJ_FOOD);
- // in all other cases you can use the item in some way
+ // In all other cases you can use the item in some way.
return true;
}