summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/decks.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-29 12:57:33 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-29 12:57:33 +0000
commit942a2a13a9bbe4672247b37e58a53abfc4ca4db5 (patch)
treead0535ec1aae75b8898eaa74b29836d53a2e157b /crawl-ref/source/decks.cc
parente5713cc0c97db9275c105a0a5a9e76c738fd0d25 (diff)
downloadcrawl-ref-942a2a13a9bbe4672247b37e58a53abfc4ca4db5.tar.gz
crawl-ref-942a2a13a9bbe4672247b37e58a53abfc4ca4db5.zip
Clean up potion effects as per [2544231]; get rid of the "power == 40 means
it's a potion" hack. Fix security issue in dumping code (never dump a string without using %s.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8846 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/decks.cc')
-rw-r--r--crawl-ref/source/decks.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index a8a95a2441..d6e119a473 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -1839,9 +1839,9 @@ static void _elixir_card(int power, deck_rarity_type rarity)
if (power_level == 0)
{
if (coinflip())
- potion_effect( POT_HEAL_WOUNDS, 40 ); // power doesn't matter
+ potion_effect(POT_HEAL_WOUNDS, 40); // power doesn't matter
else
- cast_regen( random2(power / 4) );
+ cast_regen(random2(power / 4));
}
else if (power_level == 1)
{
@@ -2572,9 +2572,7 @@ static void _genie_card(int power, deck_rarity_type rarity)
{
mpr("A genie takes form and thunders: "
"\"You disturbed me, fool!\"");
- // Use 41, not 40, to tell potion_effect() that this isn't a
- // real potion.
- potion_effect( coinflip() ? POT_DEGENERATION : POT_DECAY, 41 );
+ potion_effect(coinflip() ? POT_DEGENERATION : POT_DECAY, 40);
}
}