summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-book.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-14 23:15:33 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-14 23:15:33 +0000
commitcb371dc5d4f25044434fe5b632a769abf5b949ad (patch)
tree6fa0dd7c65acedd90d061cbd8cbce288ed680e35 /crawl-ref/source/spl-book.cc
parenta262178eefe2656c302d4512ab89a95b5ee917d8 (diff)
downloadcrawl-ref-cb371dc5d4f25044434fe5b632a769abf5b949ad.tar.gz
crawl-ref-cb371dc5d4f25044434fe5b632a769abf5b949ad.zip
Bug 1941782: Allow vampires to learn spells such as Berserk and
Transmigrations, but let them only cast them while full or more. (Once satiated is reached, they automatically time out.) Bug 1941885: Don't give vampires nutrition from quaffing non-blood potions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4235 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-book.cc')
-rw-r--r--crawl-ref/source/spl-book.cc19
1 files changed, 17 insertions, 2 deletions
diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc
index bd12cfdad0..ff1482983a 100644
--- a/crawl-ref/source/spl-book.cc
+++ b/crawl-ref/source/spl-book.cc
@@ -1081,7 +1081,7 @@ bool undead_cannot_memorise(spell_type spell, char being)
{
switch (being)
{
- case US_HUNGRY_DEAD:
+ case US_HUNGRY_DEAD: // Ghouls
switch (spell)
{
//case SPELL_REGENERATION:
@@ -1106,7 +1106,22 @@ bool undead_cannot_memorise(spell_type spell, char being)
}
break;
- case US_UNDEAD:
+ case US_SEMI_UNDEAD: // Vampires
+ switch (spell)
+ {
+ case SPELL_BORGNJORS_REVIVIFICATION:
+ case SPELL_DEATHS_DOOR:
+ case SPELL_NECROMUTATION:
+ case SPELL_ALTER_SELF:
+ return true;
+ default:
+ // also, the above US_HUNGRY_DEAD spells are not castable
+ // when satiated or worse
+ return false;
+ }
+ break;
+
+ case US_UNDEAD: // Mummies
switch (spell)
{
case SPELL_AIR_WALK: