summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-01-06 09:11:42 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-01-06 09:11:42 +0000
commit2052c5d6371a9c8e877fe594c769fea8ee78c282 (patch)
treea38e9e97e20c1fb7bbb461c29a7bd3fe692d11d3
parentbc80cb35bd115a2b039d5531df5480a4f7d2631b (diff)
downloadcrawl-ref-2052c5d6371a9c8e877fe594c769fea8ee78c282.tar.gz
crawl-ref-2052c5d6371a9c8e877fe594c769fea8ee78c282.zip
[1627743] Indicate when a monster's paralysed (mons_is_paralysed may need
fixing per Haran's comment). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@793 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/beam.cc25
-rw-r--r--crawl-ref/source/direct.cc14
2 files changed, 28 insertions, 11 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 5c2146f964..2af4dd0a67 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -1857,13 +1857,15 @@ int mons_ench_f2(struct monsters *monster, struct bolt &pbolt)
}
// not hasted, slow it
- if (!mons_has_ench(monster, ENCH_SLOW)
- && mons_add_ench(monster, ENCH_SLOW))
+ if (!mons_has_ench(monster, ENCH_SLOW)
+ && !mons_is_stationary(monster)
+ && mons_add_ench(monster, ENCH_SLOW))
{
- // put in an exception for fungi, plants and other things you won't
- // notice slow down.
- if (simple_monster_message(monster, " seems to slow down."))
+ if (!mons_is_paralysed(monster)
+ && simple_monster_message(monster, " seems to slow down."))
+ {
pbolt.obvious_effect = true;
+ }
}
return (MON_AFFECTED);
@@ -1877,12 +1879,15 @@ int mons_ench_f2(struct monsters *monster, struct bolt &pbolt)
}
// not slowed, haste it
- if (mons_add_ench(monster, ENCH_HASTE))
+ if (!mons_has_ench(monster, ENCH_HASTE)
+ && !mons_is_stationary(monster)
+ && mons_add_ench(monster, ENCH_HASTE))
{
- // put in an exception for fungi, plants and other things you won't
- // notice speed up.
- if (simple_monster_message(monster, " seems to speed up."))
+ if (!mons_is_paralysed(monster)
+ && simple_monster_message(monster, " seems to speed up."))
+ {
pbolt.obvious_effect = true;
+ }
}
return (MON_AFFECTED);
@@ -2014,7 +2019,7 @@ bool curare_hits_monster( const bolt &beam,
if (hurted)
{
- simple_monster_message(monster, " appears to choke.");
+ simple_monster_message(monster, " convulses.");
if ((monster->hit_points -= hurted) < 1)
{
const int thrower = YOU_KILL(beam.thrower) ?
diff --git a/crawl-ref/source/direct.cc b/crawl-ref/source/direct.cc
index e1228305ba..9d703cfa76 100644
--- a/crawl-ref/source/direct.cc
+++ b/crawl-ref/source/direct.cc
@@ -1454,10 +1454,22 @@ static void describe_cell(int mx, int my)
if (menv[i].attitude == ATT_FRIENDLY)
mprf("%s is friendly.", mons_pronoun(menv[i].type, PRONOUN_CAP));
+ const bool paralysed = mons_is_paralysed(&menv[i]);
+ if (paralysed)
+ mprf("%s is paralysed.", mons_pronoun(menv[i].type, PRONOUN_CAP));
+
for (int p = 0; p < NUM_MON_ENCHANTS; p++)
{
+ const unsigned ench = menv[i].enchantment[p];
+
+ // Suppress silly-looking combinations, even if they're
+ // internally valid.
+ if (paralysed && (ench == ENCH_SLOW || ench == ENCH_HASTE))
+ continue;
+
strcpy(info, mons_pronoun(menv[i].type, PRONOUN_CAP));
- switch (menv[i].enchantment[p])
+
+ switch (ench)
{
case ENCH_YOUR_ROT_I:
case ENCH_YOUR_ROT_II: