[CF-Devel] God's intervention: broken?

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Sat Oct 25 23:09:25 CDT 2003


Nicolas Weeger wrote:
>
     
      Apparently god intervention, when praying at an altar, is broken.
     
     >
     
     
     >
     
      Looking in the code, i found 2 things:
     
     >
     
      * in cast_heal (healing used when god decides to help you), the function 
     
     >
     
      will return 1 (success) even if nothing was done. From the code:
     
     
>
     
     
     >
     
      If the spell is a cure confusion, heal == 0 thus the test doesn't return 
     
     >
     
      with 'You are already fully healed'.
     
     >
     
      But the code, after that, just sets success = 1 even if heal is 0.
     
     >
     
      So even if the spell is cure confusion, this function will return 1 
     
     >
     
      (success).
     
     
I'll fix that.  The entire area dealing with curing damage should be 
encapsulated in a if (heal), becaus otherwise I think you'd also get the message 
'your wounds start to close' if you have any damage and cast cure confusion.


>
     
     
     >
     
      * second point, the 'spell direct' is checked with
     
     >
     
              if (item->type == SPELL)
     
     >
     
      (gods.c:881)
     
     >
     
     
     >
     
      Except archetypes for spelldirect are with a value of SPELLBOOK.
     
     >
     
      So the spell isn't granted.
     
     >
     
      Also, after getting the spell (got one by tweaking stuff), since the 
     
     >
     
      type is SPELLBOOK, spells doesn't get displayed in 'cast output, nor can 
     
     >
     
      you use it...
     
     
  The archetypes should be updated so that the type for them is also spell, and 
not spellbook.

  That should actually be pretty easy - just replace the god_spelldirect 
treasures with the spell ones directly - there isn't any need for the 
spelldirect versions.  I'll work on doing that.


_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list