summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2009-12-12 23:36:34 +0100
committerAdam Borowski <kilobyte@angband.pl>2009-12-13 00:06:16 +0100
commit92bf67d036734faa46331fd054131da1fdaa13b6 (patch)
tree3b2d9052e07b448d4304c0fb00886d0e6f2129be /crawl-ref/source
parenta6622f0a21421788f920c51a9d9c008510e95e3f (diff)
downloadcrawl-ref-92bf67d036734faa46331fd054131da1fdaa13b6.tar.gz
crawl-ref-92bf67d036734faa46331fd054131da1fdaa13b6.zip
Rename ENCH_NEUTRAL to ENCH_TEMP_PACIF since it's what it does.
Also, keep afflicted monsters from attacking the player. It's bad if they just got "impressed by your words" yet they hunt you and you can't even fight back.
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/delay.cc4
-rw-r--r--crawl-ref/source/enum.h2
-rw-r--r--crawl-ref/source/mon-info.cc2
-rw-r--r--crawl-ref/source/mon-stuff.cc4
-rw-r--r--crawl-ref/source/monster.cc18
5 files changed, 16 insertions, 14 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index cc11099929..2fa9fda6a3 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -173,7 +173,7 @@ static int _recite_to_monsters(coord_def where, int pow, int, actor *)
case 10:
case 11:
case 12:
- if (!mon->add_ench(mon_enchant(ENCH_NEUTRAL, 0, KC_YOU,
+ if (!mon->add_ench(mon_enchant(ENCH_TEMP_PACIF, 0, KC_YOU,
(16 + random2avg(13, 2)) * 10)))
{
return (0);
@@ -203,7 +203,7 @@ static int _recite_to_monsters(coord_def where, int pow, int, actor *)
{
if (holiness == MH_UNDEAD || holiness == MH_DEMONIC)
{
- if (!mon->add_ench(mon_enchant(ENCH_NEUTRAL, 0, KC_YOU,
+ if (!mon->add_ench(mon_enchant(ENCH_TEMP_PACIF, 0, KC_YOU,
(16 + random2avg(13, 2)) * 10)))
{
return (0);
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index db3ee6f60c..0e9efee2fa 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -1240,7 +1240,7 @@ enum enchant_type
ENCH_SLEEPY, // Monster can't wake until this wears off.
ENCH_HELD, // 25 -- Caught in a net.
ENCH_BATTLE_FRENZY, // Monster is in a battle frenzy
- ENCH_NEUTRAL,
+ ENCH_TEMP_PACIF,
ENCH_PETRIFYING,
ENCH_PETRIFIED,
ENCH_LOWERED_MR, // 30
diff --git a/crawl-ref/source/mon-info.cc b/crawl-ref/source/mon-info.cc
index 0bc3e5c899..c62e6aaf1c 100644
--- a/crawl-ref/source/mon-info.cc
+++ b/crawl-ref/source/mon-info.cc
@@ -33,7 +33,7 @@ monster_info::monster_info(const monsters *m)
: m_mon(m), m_attitude(ATT_HOSTILE), m_difficulty(0),
m_brands(0), m_fullname(true)
{
- // XXX: this doesn't take into account ENCH_NEUTRAL, but that's probably
+ // XXX: this doesn't take into account ENCH_TEMP_PACIF, but that's probably
// a bug for mons_attitude, not this.
// XXX: also, mons_attitude_type should be sorted hostile/neutral/friendly;
// will break saves a little bit though.
diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc
index afe17384ac..4f9fa50ac8 100644
--- a/crawl-ref/source/mon-stuff.cc
+++ b/crawl-ref/source/mon-stuff.cc
@@ -2483,7 +2483,7 @@ bool monster_polymorph(monsters *monster, monster_type targetc,
mon_enchant abj = monster->get_ench(ENCH_ABJ);
mon_enchant charm = monster->get_ench(ENCH_CHARM);
- mon_enchant neutral = monster->get_ench(ENCH_NEUTRAL);
+ mon_enchant temp_pacif= monster->get_ench(ENCH_TEMP_PACIF);
mon_enchant shifter = monster->get_ench(ENCH_GLOWING_SHAPESHIFTER,
ENCH_SHAPESHIFTER);
mon_enchant sub = monster->get_ench(ENCH_SUBMERGED);
@@ -2528,7 +2528,7 @@ bool monster_polymorph(monsters *monster, monster_type targetc,
monster->add_ench(abj);
monster->add_ench(charm);
- monster->add_ench(neutral);
+ monster->add_ench(temp_pacif);
monster->add_ench(shifter);
monster->add_ench(sub);
monster->add_ench(summon);
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index fc01ca2c7a..4aff1df1c1 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -164,8 +164,8 @@ mon_attitude_type monsters::temp_attitude() const
{
if (has_ench(ENCH_CHARM))
return ATT_FRIENDLY;
- else if (has_ench(ENCH_NEUTRAL))
- return ATT_NEUTRAL;
+ else if (has_ench(ENCH_TEMP_PACIF))
+ return ATT_GOOD_NEUTRAL;
else
return attitude;
}
@@ -2945,14 +2945,14 @@ bool monsters::friendly() const
bool monsters::neutral() const
{
- return (attitude == ATT_NEUTRAL || has_ench(ENCH_NEUTRAL)
+ return (attitude == ATT_NEUTRAL || has_ench(ENCH_TEMP_PACIF)
|| attitude == ATT_GOOD_NEUTRAL
|| attitude == ATT_STRICT_NEUTRAL);
}
bool monsters::good_neutral() const
{
- return (attitude == ATT_GOOD_NEUTRAL);
+ return (attitude == ATT_GOOD_NEUTRAL || has_ench(ENCH_TEMP_PACIF));
}
bool monsters::strict_neutral() const
@@ -4322,9 +4322,11 @@ void monsters::remove_enchantment_effect(const mon_enchant &me, bool quiet)
behaviour_event(this, ME_EVAL);
break;
- case ENCH_NEUTRAL:
+ case ENCH_TEMP_PACIF:
if (!quiet)
- simple_monster_message(this, " is no longer neutral.");
+ simple_monster_message(this, (" seems to come to "
+ + pronoun(PRONOUN_NOCAP_POSSESSIVE) + " senses.").c_str());
+ // Yeah, this _is_ offensive to Zin, but hey, he deserves it (1KB).
behaviour_event(this, ME_EVAL);
break;
@@ -4613,7 +4615,7 @@ void monsters::timeout_enchantments(int levels)
case ENCH_INVIS: case ENCH_CHARM: case ENCH_SLEEP_WARY:
case ENCH_SICK: case ENCH_SLEEPY: case ENCH_PARALYSIS:
case ENCH_PETRIFYING: case ENCH_PETRIFIED: case ENCH_SWIFT:
- case ENCH_BATTLE_FRENZY: case ENCH_NEUTRAL:
+ case ENCH_BATTLE_FRENZY: case ENCH_TEMP_PACIF:
case ENCH_LOWERED_MR: case ENCH_SOUL_RIPE:
lose_ench_levels(i->second, levels);
break;
@@ -4750,7 +4752,7 @@ void monsters::apply_enchantment(const mon_enchant &me)
case ENCH_MIGHT:
case ENCH_FEAR:
case ENCH_PARALYSIS:
- case ENCH_NEUTRAL:
+ case ENCH_TEMP_PACIF:
case ENCH_PETRIFYING:
case ENCH_PETRIFIED:
case ENCH_SICK: