Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CF: invoke bug for prayers




In CrossFire, I have one key bound to "invoke holy word" and another
bound to "invoke major healing".  Note that both of them are prayers
(cleric spells).  Most of the time, this works perfectly.  But there
are some times (usually when I am in a very unsafe place...) when
these prayers don't work and I get the (incorrect) warning "This
prayer is useless unless you worship an appropriate god".  Well, of
course I do worship an appropriate god...

I added some debug code in fire_arch (spell_util.c) and in
tailor_god_spell (gods.c) and here is what I get when the bug occurs:
# caster->name = Raphael
# godnr = -1 !!!
# God name = none
#  op->chosen_skill->name == talisman
#  op->chosen_skill->exp_obj->name == magic
#  op->chosen_skill->exp_obj->title == NULL

Obviously, there is something wrong there, because the holy symbol
should have been readied instead of the talisman (I applied the
"invoke patch" from b.t. and that didn't solve the problem).  Even
worse, if I ready the holy symbol manually, it switches back to the
talisman when I try to "invoke holy word".

I don't know what triggers this bug, although I have found that it
occurs most of the time when I reload a saved game (but it also
happens infrequently during normal gameplay).

I found a way to cure the bug: use the tab key to cycle the list of
known spells.  As soon as I switch to a cleric spell (any of them, but
in this case the first one I know is "banishment", after the wizard
spells "alchemy" and "armour"), then everything is back to normal and
I can use all "invoke" commands freely.  The same happens if I use
"cast <any prayer>" first, and then "invoke holy word" (although this
sometimes triggers another strange bug which causes all cone spells to
become very weak, not only for me but also for the monsters and other
players -- then I have to restart the server).  Anyway, that is a
kludge and I would like to fix that in the code, if only I knew what
was wrong.  Any ideas?

I think that I am very close to finding that bug, but I don't know
what part of the code should be patched.  I hope that the info given
above will help b.t. or someone else, so that the bug(s) can be fixed
before the next release (if this isn't already fixed).

-Raphael