From 8b0518690faec633e15a0cc1f673349a84571470 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 8 Oct 2005 21:43:24 +0000 Subject: [PATCH] always default-fumble to report failure. --- src/common/kernel/magic.c | 3 ++- src/common/kernel/spell.h | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/common/kernel/magic.c b/src/common/kernel/magic.c index b1e53a180..4868dc3d9 100644 --- a/src/common/kernel/magic.c +++ b/src/common/kernel/magic.c @@ -1269,7 +1269,8 @@ do_fumble(castorder *co) switch (rand() % 10) { case 0: /* wenn vorhanden spezieller Patzer, ansonsten nix */ - sp->patzer(co); + if (sp->patzer) sp->patzer(co); + else patzer(co); break; case 1: diff --git a/src/common/kernel/spell.h b/src/common/kernel/spell.h index aaf4899cd..b6c73692c 100644 --- a/src/common/kernel/spell.h +++ b/src/common/kernel/spell.h @@ -177,7 +177,7 @@ extern "C" { SPL_TYBIED_FUMBLESHIELD, SPL_SHADOWKNIGHTS, LUASPL_FIRESWORD, - SPL_CREATE_TACTICCRYSTAL, + LUASPL_CREATE_TACTICCRYSTAL, SPL_ITEMCLOAK, SPL_FIREWALL, SPL_WISPS, @@ -287,7 +287,8 @@ extern "C" { extern struct spell_list * spells; extern void init_spells(void); extern void register_spell(struct spell * sp); - struct spell * find_spell(magic_t mtype, const char * name); + extern struct spell * find_spell(magic_t mtype, const char * name); + extern void patzer(struct castorder *co); #ifdef __cplusplus }