From cb371dc5d4f25044434fe5b632a769abf5b949ad Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 14 Apr 2008 23:15:33 +0000 Subject: 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 --- crawl-ref/source/spl-book.cc | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/spl-book.cc') 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: -- cgit v1.2.3-54-g00ecf