From 361c86ab3c3017c9136cde225058f25e9f96a822 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Thu, 5 Nov 2009 15:34:51 -0600 Subject: In is_evil(), mark player followers and monster priests of evil gods. --- crawl-ref/source/mon-data.h | 14 ++++++-------- crawl-ref/source/monplace.cc | 1 - crawl-ref/source/monster.cc | 12 +++++++++++- crawl-ref/source/player.cc | 8 +++++++- 4 files changed, 24 insertions(+), 11 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index df72ec50da..8a2e973cee 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -425,7 +425,7 @@ static monsterentry mondata[] = { { MONS_DRACONIAN_ZEALOT, 'd', LIGHTGREEN, "draconian zealot", - M_SPELLCASTER | M_PRIEST | M_COLD_BLOOD | M_EVIL | M_SPEAKS, + M_SPELLCASTER | M_PRIEST | M_COLD_BLOOD | M_SPEAKS, MR_NO_FLAGS, 900, 10, MONS_DRACONIAN, MONS_DRACONIAN, MH_NATURAL, -3, { {AT_HIT, AF_PLAIN, 15}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, @@ -583,7 +583,7 @@ static monsterentry mondata[] = { { MONS_DEEP_ELF_PRIEST, 'e', GREEN, "deep elf priest", - M_SPELLCASTER | M_PRIEST | M_WARM_BLOOD | M_EVIL | M_SPEAKS, + M_SPELLCASTER | M_PRIEST | M_WARM_BLOOD | M_SPEAKS, MR_NO_FLAGS, 450, 10, MONS_ELF, MONS_ELF, MH_NATURAL, -6, { {AT_HIT, AF_PLAIN, 9}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, @@ -594,8 +594,7 @@ static monsterentry mondata[] = { { MONS_DEEP_ELF_HIGH_PRIEST, 'e', LIGHTGREEN, "deep elf high priest", - M_SPELLCASTER | M_SPEAKS | M_PRIEST | M_WARM_BLOOD | M_SEE_INVIS - | M_EVIL, + M_SPELLCASTER | M_SPEAKS | M_PRIEST | M_WARM_BLOOD | M_SEE_INVIS, MR_NO_FLAGS, 450, 10, MONS_ELF, MONS_ELF, MH_NATURAL, -6, { {AT_HIT, AF_PLAIN, 14}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, @@ -1103,7 +1102,7 @@ static monsterentry mondata[] = { { MONS_ORC_PRIEST, 'o', GREEN, "orc priest", - M_SPELLCASTER | M_PRIEST | M_WARM_BLOOD | M_EVIL | M_SPEAKS, + M_SPELLCASTER | M_PRIEST | M_WARM_BLOOD | M_SPEAKS, MR_NO_FLAGS, 600, 10, MONS_ORC, MONS_ORC, MH_NATURAL, -4, { {AT_HIT, AF_PLAIN, 6}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, @@ -1159,8 +1158,7 @@ static monsterentry mondata[] = { { MONS_ORC_HIGH_PRIEST, 'o', LIGHTGREEN, "orc high priest", - M_SPELLCASTER | M_SEE_INVIS | M_SPEAKS | M_PRIEST | M_WARM_BLOOD - | M_EVIL, + M_SPELLCASTER | M_SEE_INVIS | M_SPEAKS | M_PRIEST | M_WARM_BLOOD, MR_RES_HELLFIRE, 600, 10, MONS_ORC, MONS_ORC, MH_NATURAL, -4, { {AT_HIT, AF_PLAIN, 7}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, @@ -4165,7 +4163,7 @@ static monsterentry mondata[] = { { MONS_SAINT_ROKA, 'o', LIGHTBLUE, "Saint Roka", - M_UNIQUE | M_FIGHTER | M_WARM_BLOOD | M_SPELLCASTER | M_PRIEST | M_EVIL + M_UNIQUE | M_FIGHTER | M_WARM_BLOOD | M_SPELLCASTER | M_PRIEST | M_SPEAKS, MR_NO_FLAGS, 600, 15, MONS_ORC, MONS_ORC, MH_NATURAL, -3, diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index 77b31695f5..d5433b810c 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -2861,7 +2861,6 @@ monster_type summon_any_dragon(dragon_class_type dct) return (mon); } - ///////////////////////////////////////////////////////////////////////////// // monster_pathfind diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index 74fbdeb27d..f38f6fcd7a 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -2851,7 +2851,17 @@ mon_holy_type monsters::holiness() const bool monsters::is_evil() const { - return (is_unholy() || mons_class_flag(type, M_EVIL)); + if (is_unholy()) + return (true); + + // Assume that unknown gods are evil. + if (is_priest() && (is_evil_god(god) || god == GOD_NAMELESS)) + return (true); + + if (mons_class_flag(type, M_EVIL)) + return (true); + + return (false); } bool monsters::is_unholy() const diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 5d00539bc9..e09b774ea6 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -6380,7 +6380,13 @@ mon_holy_type player::holiness() const bool player::is_evil() const { - return (is_unholy()); + if (is_unholy()) + return (true); + + if (is_evil_god(religion)) + return (true); + + return (false); } bool player::is_unholy() const -- cgit v1.2.3-54-g00ecf