summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-25 20:23:39 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-25 20:23:39 +0000
commit2dee9cde068f812d06fee0531ab6038ea2e68719 (patch)
tree5f14a05e8e21b84d6963a1c70ac37996242e028d /crawl-ref/source
parentb2f66d9cf15812cade43953fc992899ab997830c (diff)
downloadcrawl-ref-2dee9cde068f812d06fee0531ab6038ea2e68719.tar.gz
crawl-ref-2dee9cde068f812d06fee0531ab6038ea2e68719.zip
More evil ally fixes. If you worship a good god, don't allow the taming
of e.g. death yaks, and don't allow Summon Small Mammals to pull in orange rats. Do the latter only on the player side for now, since mo monsters seem to cast Summon Small Mammals, instead preferring Vampire Summon. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3881 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/spells2.cc9
-rw-r--r--crawl-ref/source/spells4.cc6
2 files changed, 12 insertions, 3 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index ec23fb5f07..56ac3a6df8 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -1376,8 +1376,13 @@ void summon_small_mammals(int pow)
switch (pow_spent)
{
case 75: case 74: case 38:
- thing_called = MONS_ORANGE_RAT;
- break;
+ // If you worship a good god, don't summon an evil small
+ // mammal.
+ if (!is_good_god(you.religion))
+ {
+ thing_called = MONS_ORANGE_RAT;
+ break;
+ }
case 65: case 64: case 63: case 27: case 26: case 25:
thing_called = MONS_GREEN_RAT;
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index 556024aa99..c4ee7a0b8c 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -755,8 +755,12 @@ static int tame_beast_monsters(int x, int y, int pow, int garbage)
monsters *monster = &menv[which_mons];
- if (!is_domesticated_animal(monster->type) || mons_friendly(monster))
+ if (!is_domesticated_animal(monster->type) || mons_friendly(monster)
+ || (is_good_god(you.religion)
+ && mons_is_evil_or_unholy(monster)))
+ {
return 0;
+ }
// 50% bonus for dogs
if (monster->type == MONS_HOUND || monster->type == MONS_WAR_DOG )