summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-01 14:19:30 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-01 14:19:30 +0000
commitc9b07a1a83b5839c45b7eb11bd9d0645e66d9268 (patch)
treef3cc1600152c538e453382fb03f4ff816d5f3f7c /crawl-ref/source
parentfa99a86759add6439ecf5f1248890e1c4e7c8b6e (diff)
downloadcrawl-ref-c9b07a1a83b5839c45b7eb11bd9d0645e66d9268.tar.gz
crawl-ref-c9b07a1a83b5839c45b7eb11bd9d0645e66d9268.zip
Add partial resistance to the list of canned messages.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4792 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/enum.h1
-rw-r--r--crawl-ref/source/ouch.cc10
-rw-r--r--crawl-ref/source/stuff.cc3
3 files changed, 9 insertions, 5 deletions
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 1e32f9657f..91a8e5a5c4 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -359,6 +359,7 @@ enum canned_message_type
MSG_SOMETHING_APPEARS,
MSG_NOTHING_HAPPENS,
MSG_YOU_RESIST,
+ MSG_YOU_PARTIALLY_RESIST,
MSG_TOO_BERSERK,
MSG_PRESENT_FORM,
MSG_NOTHING_CARRIED,
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index d3fe9dabb6..55aeee2407 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -175,7 +175,7 @@ int check_your_resists(int hurted, beam_type flavour)
hurted = resist_adjust_damage(&you, flavour, resist, hurted);
if (hurted < original)
- mpr("You partially resist.");
+ canned_msg(MSG_YOU_PARTIALLY_RESIST);
break;
case BEAM_NEG:
@@ -203,7 +203,7 @@ int check_your_resists(int hurted, beam_type flavour)
hurted, true);
if (hurted < original)
- mpr("You partially resist.");
+ canned_msg(MSG_YOU_PARTIALLY_RESIST);
else if (hurted > original)
{
mpr("You feel a painful chill!");
@@ -216,7 +216,7 @@ int check_your_resists(int hurted, beam_type flavour)
hurted, true);
if (hurted < original)
- mpr("You partially resist.");
+ canned_msg(MSG_YOU_PARTIALLY_RESIST);
else if (hurted > original)
{
mpr("It burns terribly!");
@@ -619,7 +619,7 @@ void drain_exp(bool announce_full)
if (protection == 3)
{
if ( announce_full )
- mpr("You fully resist.");
+ canned_msg(MSG_YOU_RESIST);
return;
}
@@ -658,7 +658,7 @@ void drain_exp(bool announce_full)
}
else if (protection > 0)
{
- mpr("You partially resist.");
+ canned_msg(MSG_YOU_PARTIALLY_RESIST);
exp_drained -= (protection * exp_drained) / 3;
}
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc
index 9bbec1f7c7..099f0b81f5 100644
--- a/crawl-ref/source/stuff.cc
+++ b/crawl-ref/source/stuff.cc
@@ -831,6 +831,9 @@ void canned_msg(canned_message_type which_message)
case MSG_YOU_RESIST:
mpr("You resist.");
break;
+ case MSG_YOU_PARTIALLY_RESIST:
+ mpr("You partially resist.");
+ break;
case MSG_TOO_BERSERK:
mpr("You are too berserk!");
crawl_state.cancel_cmd_repeat();