summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/newgame.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-26 18:56:45 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-26 18:56:45 +0000
commit05f88f06a2e406d12ce5acecf52764406e31cb2c (patch)
treec8a12ff02256964dd8773f9ad6d90805ffde52e5 /crawl-ref/source/newgame.cc
parentb5789ec262b15387d1a8d210dee9c79631e85ed6 (diff)
downloadcrawl-ref-05f88f06a2e406d12ce5acecf52764406e31cb2c.tar.gz
crawl-ref-05f88f06a2e406d12ce5acecf52764406e31cb2c.zip
Fix a bug in monster summoning that was causing crashes, for example
when attempting to cast Shadow Creatures in a bazaar (which is bound to fail, anyway). I guess it would have also caused crashes anywhere else where the level was devoid of monsters and creating one failed - for whatever reason. I don't actually know how likely that combination is. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6151 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/newgame.cc')
-rw-r--r--crawl-ref/source/newgame.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index 11a99c47b4..e941a984c3 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -1917,6 +1917,9 @@ static bool _choose_book( item_def& book, int firstbook, int numbooks )
switch (you.species)
{
case SP_OGRE:
+ // Ogres are, of course, really bad at Fire and Ice, so it's usually
+ // restricted, but if the summoning book comes into play unrestrict
+ // those two because ogres are even *worse* at Summonings.
if (numbooks < 3)
book_restrictions[0] = CC_RESTRICTED;
// else fall-through