summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/it_use2.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-13 16:04:24 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-13 16:04:24 +0000
commit280d409759be7af8b54366f07ccba17348ea24f9 (patch)
tree99b931599c7a6544a9c9b3f4aeb7d9c99752b5d9 /crawl-ref/source/it_use2.cc
parent8b4a043aa12cf1492ff94b0ef071afce5997dff2 (diff)
downloadcrawl-ref-280d409759be7af8b54366f07ccba17348ea24f9.tar.gz
crawl-ref-280d409759be7af8b54366f07ccba17348ea24f9.zip
Commit several patches:
* patch 2849505 by weyrava: make submerged monsters use the correct colour * patch 2857771 by caotto: another Feawn update * patch 2838771 by camedo: add potions of brilliance/agility * BR 2841651 by bookofjude: allow Merfolk to control-tele into deep water Now we need tiles for the new potions! git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10669 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/it_use2.cc')
-rw-r--r--crawl-ref/source/it_use2.cc44
1 files changed, 44 insertions, 0 deletions
diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc
index 62e8a6ab26..45b0605cbf 100644
--- a/crawl-ref/source/it_use2.cc
+++ b/crawl-ref/source/it_use2.cc
@@ -162,6 +162,50 @@ bool potion_effect(potion_type pot_eff, int pow, bool drank_it, bool was_known)
break;
}
+ case POT_BRILLIANCE:
+ {
+ const bool were_brilliant = you.duration[DUR_BRILLIANCE] > 0;
+
+ mprf(MSGCH_DURATION, "You feel %s all of a sudden.",
+ were_brilliant ? "clever" : "more clever");
+
+ if (were_brilliant)
+ contaminate_player(1, was_known);
+ else
+ modify_stat(STAT_INTELLIGENCE, 5, true, "");
+
+ you.duration[DUR_BRILLIANCE] += (35 + random2(pow)) / factor;
+
+ if (you.duration[DUR_BRILLIANCE] > 80)
+ you.duration[DUR_BRILLIANCE] = 80;
+
+ did_god_conduct(DID_STIMULANTS, 4 + random2(4), was_known);
+ break;
+ }
+
+ case POT_AGILITY:
+ {
+ const bool were_agile = you.duration[DUR_AGILITY] > 0;
+
+ mprf(MSGCH_DURATION, "You feel %s all of a sudden.",
+ were_agile ? "agile" : "more agile");
+
+ if (were_agile)
+ contaminate_player(1, was_known);
+ else
+ modify_stat(STAT_DEXTERITY, 5, true, "");
+
+ you.duration[DUR_AGILITY] += (35 + random2(pow)) / factor;
+
+ if (you.duration[DUR_AGILITY] > 80)
+ you.duration[DUR_AGILITY] = 80;
+
+ you.redraw_evasion = true;
+
+ did_god_conduct(DID_STIMULANTS, 4 + random2(4), was_known);
+ break;
+ }
+
case POT_GAIN_STRENGTH:
if (mutate(MUT_STRONG, true, false, false, true))
learned_something_new(TUT_YOU_MUTATED);