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>2008-03-03 16:42:26 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-03 16:42:26 +0000
commit5b06a0470b38bfd19c8b00063d7107be6fb7ca71 (patch)
tree6d1fa831459d4042138ad0581af5bfc85daa72d1 /crawl-ref/source/it_use2.cc
parent94fc8284e019e8157bb8862a0429be6060adae27 (diff)
downloadcrawl-ref-5b06a0470b38bfd19c8b00063d7107be6fb7ca71.tar.gz
crawl-ref-5b06a0470b38bfd19c8b00063d7107be6fb7ca71.zip
[FR 1733318] Draconian ghosts (non-grey, xl >= 7) get a draining breath
attack. The message ("John Doe's ghost breathes.") may have to be tweaked, ghosts being undead etc. The chance for a ghost actually breathing increases with its experience (1/2 at xl 7, 2/3 at xl 8, 3/4 at xl 9, and so forth). [FR 1826165] !restore ability also resets DUR_BREATH_WEAPON, so it becomes more useful to draconians and demonspawn with hellfire. To make up for it, the breath weapon durations might have to increased. They're currently: 3 + random2(5) for Spit Poison 3 + random2(5) + random2(30 - xp) for Hellfire 3 + random2(4) + random2(30 - xp)/2 for Breath Weapons [Bug 1879466] The step into lava/deep water safety prompt bails out unless the player answers "yes". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3510 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/it_use2.cc')
-rw-r--r--crawl-ref/source/it_use2.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc
index daa3f14ab9..754f3f436e 100644
--- a/crawl-ref/source/it_use2.cc
+++ b/crawl-ref/source/it_use2.cc
@@ -268,11 +268,20 @@ bool potion_effect( potion_type pot_eff, int pow )
break;
case POT_RESTORE_ABILITIES:
- // give a message if restore_stat doesn't
- if (!restore_stat(STAT_ALL, false))
+ {
+ bool nothing_happens = true;
+ if (you.duration[DUR_BREATH_WEAPON])
+ {
+ mpr("You have got your breath back.", MSGCH_RECOVERY);
+ you.duration[DUR_BREATH_WEAPON] = 0;
+ nothing_happens = false;
+ }
+
+ // give a message if no message otherwise
+ if (!restore_stat(STAT_ALL, false) && nothing_happens)
mpr( "You feel refreshed." );
break;
-
+ }
case POT_BERSERK_RAGE:
if (you.species == SP_VAMPIRE)
{