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-04-11 10:49:36 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-11 10:49:36 +0000
commit294794073634d4aa598858ba8f577b95f606356d (patch)
tree7e27e63b134741eba35c7b125f7ffe1f4ff23ff4 /crawl-ref/source/it_use2.cc
parent6f24f856327baae51e8f95ccbbd485bca3d81104 (diff)
downloadcrawl-ref-294794073634d4aa598858ba8f577b95f606356d.tar.gz
crawl-ref-294794073634d4aa598858ba8f577b95f606356d.zip
* Allow viewing known items from "Use on what item?" scroll prompt.
* Default use_fake_cursor to true on Unix, else false. * Tweak some descriptions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9594 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/it_use2.cc')
-rw-r--r--crawl-ref/source/it_use2.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc
index f45fb531f4..5d63c851e1 100644
--- a/crawl-ref/source/it_use2.cc
+++ b/crawl-ref/source/it_use2.cc
@@ -48,6 +48,9 @@ bool potion_effect(potion_type pot_eff, int pow, bool drank_it, bool was_known)
&& you.hunger_state < HS_SATIATED
&& drank_it ? 2 : 1);
+ // Knowingly drinking bad potions is much less amusing.
+ const int xom_factor = factor * (drank_it && was_known ? 2 : 1);
+
switch (pot_eff)
{
case POT_HEALING:
@@ -117,7 +120,7 @@ bool potion_effect(potion_type pot_eff, int pow, bool drank_it, bool was_known)
{
// Full herbivores always become ill from blood.
disease_player(50 + random2(100));
- xom_is_stimulated(32);
+ xom_is_stimulated(32/xom_factor);
}
else
lessen_hunger(value, true);
@@ -214,24 +217,24 @@ bool potion_effect(potion_type pot_eff, int pow, bool drank_it, bool was_known)
poison_player( ((pot_eff == POT_POISON) ? 1 + random2avg(5, 2)
: 3 + random2avg(13, 2)) );
- xom_is_stimulated(128);
+ xom_is_stimulated(128 / xom_factor);
}
break;
case POT_SLOWING:
if (slow_player((10 + random2(pow)) / factor))
- xom_is_stimulated(64 / factor);
+ xom_is_stimulated(64 / xom_factor);
break;
case POT_PARALYSIS:
you.paralyse(NULL,
(2 + random2( 6 + you.duration[DUR_PARALYSIS] )) / factor);
- xom_is_stimulated(64 / factor);
+ xom_is_stimulated(64 / xom_factor);
break;
case POT_CONFUSION:
if (confuse_player((3 + random2(8)) / factor))
- xom_is_stimulated(128 / factor);
+ xom_is_stimulated(128 / xom_factor);
break;
case POT_INVISIBILITY:
@@ -274,14 +277,14 @@ bool potion_effect(potion_type pot_eff, int pow, bool drank_it, bool was_known)
if (lose_stat(STAT_RANDOM, (1 + random2avg(4, 2)) / factor, false,
"drinking a potion of degeneration"))
{
- xom_is_stimulated(64 / factor);
+ xom_is_stimulated(64 / xom_factor);
}
break;
// Don't generate randomly - should be rare and interesting.
case POT_DECAY:
if (rot_player((10 + random2(10)) / factor))
- xom_is_stimulated(64 / factor);
+ xom_is_stimulated(64 / xom_factor);
break;
case POT_WATER: