summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authorStefan O'Rear <stefanor@cox.net>2009-11-06 09:39:44 -0800
committerStefan O'Rear <stefanor@cox.net>2009-11-06 09:39:44 -0800
commitd60108eb30bd9ab43fc56431664dde0bfe0de5d1 (patch)
treef052666124bf55db011c318b387fee9a70f386c1 /crawl-ref/source/spells2.cc
parent0f01338ab32de5c6477718d1887d11611af6addb (diff)
downloadcrawl-ref-d60108eb30bd9ab43fc56431664dde0bfe0de5d1.tar.gz
crawl-ref-d60108eb30bd9ab43fc56431664dde0bfe0de5d1.zip
Simplify and nerf Summon Small Mammals
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc34
1 files changed, 7 insertions, 27 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 8008e51e1a..a21d7bcc56 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -942,37 +942,18 @@ bool cast_summon_small_mammals(int pow, god_type god)
monster_type mon = MONS_PROGRAM_BUG;
- int count = 0;
- const int count_max = 2;
+ int count = (pow == 25) ? 2 : 1;
- do
+ for (int i = 0; i < count; ++i)
{
- switch (random2(pow+1))
+ if (x_chance_in_y(10, pow+1))
{
- case 75: case 74: case 38:
- mon = MONS_ORANGE_RAT;
- break;
-
- case 65: case 64: case 63: case 27: case 26: case 25:
- mon = MONS_GREEN_RAT;
- break;
-
- case 57: case 56: case 55: case 54: case 53: case 52:
- case 20: case 18: case 16: case 14: case 12: case 10:
- mon = (coinflip()) ? MONS_QUOKKA : MONS_GREY_RAT;
- break;
-
- default:
mon = (coinflip()) ? MONS_GIANT_BAT : MONS_RAT;
- break;
}
-
- // If you worship a good god, don't summon an evil small mammal
- // (in this case, the orange rat).
- if (player_will_anger_monster(mon))
- mon = MONS_GREEN_RAT;
-
- count++;
+ else
+ {
+ mon = (coinflip()) ? MONS_QUOKKA : MONS_GREY_RAT;
+ }
if (create_monster(
mgen_data(mon, BEH_FRIENDLY,
@@ -984,7 +965,6 @@ bool cast_summon_small_mammals(int pow, god_type god)
}
}
- while (random2(pow+1) > 32 && count < count_max);
return (success);
}