summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/items.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-23 14:21:09 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-23 14:21:09 +0000
commitdf39d45725b62feba8dbc81496902161ddb9f3ef (patch)
treed1b50d84c8852c7e0af92cee6c2ac53bbbbbc6c6 /crawl-ref/source/items.cc
parentf6859509007cd7fbc7b744dd74c319456acf2a48 (diff)
downloadcrawl-ref-df39d45725b62feba8dbc81496902161ddb9f3ef.tar.gz
crawl-ref-df39d45725b62feba8dbc81496902161ddb9f3ef.zip
Lots of things which used to be members (invis, conf, confusing_touch, etc.)
are now durations. Removed some unnecessary limitations. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1626 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r--crawl-ref/source/items.cc21
1 files changed, 6 insertions, 15 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index b493c5c367..6928a4ff58 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -915,17 +915,8 @@ std::string origin_desc(const item_def &item)
case AQ_SCROLL:
desc += "You acquired " + article_it(item) + " ";
break;
- case AQ_CARD_ACQUISITION:
- desc += "You drew \"Acquisition\" ";
- break;
- case AQ_CARD_VIOLENCE:
- desc += "You drew \"Violence\" ";
- break;
- case AQ_CARD_PROTECTION:
- desc += "You drew \"Protection\" ";
- break;
- case AQ_CARD_KNOWLEDGE:
- desc += "You drew \"Knowledge\" ";
+ case AQ_CARD_GENIE:
+ desc += "You drew the Genie ";
break;
case AQ_WIZMODE:
desc += "Your wizardly powers created "
@@ -2235,10 +2226,10 @@ void handle_time( long time_delta )
// about 1.5 points on average, so they can corrupt the player
// quite quickly. Wielding one for a short battle is OK, which is
// as things should be. -- GDL
- if (you.invis && random2(10) < 6)
+ if (you.duration[DUR_INVIS] && random2(10) < 6)
added_contamination++;
- if (you.haste && !you.berserker && random2(10) < 6)
+ if (you.duration[DUR_HASTE] && !you.duration[DUR_BERSERKER] && random2(10) < 6)
added_contamination++;
// randarts are usually about 20x worse than running around invisible
@@ -2246,7 +2237,7 @@ void handle_time( long time_delta )
added_contamination += random2(1 + scan_randarts(RAP_MUTAGENIC));
// we take off about .5 points per turn
- if (!you.invis && !you.haste && coinflip())
+ if (!you.duration[DUR_INVIS] && !you.duration[DUR_HASTE] && coinflip())
added_contamination -= 1;
contaminate_player( added_contamination );
@@ -2507,7 +2498,7 @@ void handle_time( long time_delta )
}
else // exercise stealth skill:
{
- if (you.burden_state != BS_UNENCUMBERED || you.berserker)
+ if (you.burden_state != BS_UNENCUMBERED || you.duration[DUR_BERSERKER])
return;
if (you.special_wield == SPWLD_SHADOW)