diff --git a/res/spellbooks/tybied.xml b/res/spellbooks/tybied.xml index 2965ec782..f6db0bfd5 100644 --- a/res/spellbooks/tybied.xml +++ b/res/spellbooks/tybied.xml @@ -1,5 +1,5 @@ - + diff --git a/src/kernel/spellbook.c b/src/kernel/spellbook.c index ab73bdd09..7093fca84 100644 --- a/src/kernel/spellbook.c +++ b/src/kernel/spellbook.c @@ -3,6 +3,7 @@ #include #include #include +#include #include "spellbook.h" @@ -21,8 +22,11 @@ void spellbook_add(spellbook *sb, struct spell * sp, int level) spellbook_entry * sbe; assert(sb && sp && level>0); - assert(!spellbook_get(sb, sp)); - +#ifndef NDEBUG + if (spellbook_get(sb, sp)) { + log_error("duplicate spell in spellbook '%s': '%s'\n", sb->name, sp->sname); + } +#endif sbe = (spellbook_entry *)malloc(sizeof(spellbook_entry)); sbe->sp = sp; sbe->level = level;