[CF-Devel] PATCH, fixing ac/wc overflow after holy possession/bless/curse

crossfire-devel-admin at archives.real-time.com crossfire-devel-admin at archives.real-time.com
Wed Mar 5 02:13:59 CST 2003


On Tue, Mar 04, 2003 at 10:35:43PM -0800, Mark Wedel wrote:
>
     
      Jochen Suckfuell wrote:
     
     >
     
      > Hi!
     
     >
     
      > 
     
     >
     
      > The following patch fixes an overflow that happened when the ac/wc bonus from
     
     >
     
      > holy possession, bless or curse exceeded the signed byte limit.
     
     >
     
      > 
     
     >
     
        Is this actually a problem?  I looked at the code, and the current spell 
     
     >
     
      params - the spell the gains the most rapidly is 'holy possession' - if I read 
     
     >
     
      the code right, for every 4 levels, it should increase the damage by 1.
     
     
It's just not logical that you gain AC and WC with every holy possession, and
then suddenly you're back to normal values that don't improve any more (until
you overflow a second time). The very common problem I have with this is that
I cast holy possession to max out my AC, and oops, I did one too much and my
AC rolled over and stays at my normal values. Now I have to wait until the
possessions wear off and then refresh them, until I can go and fight. This
happens that way for years now and I find it very annoying.

>
     
        Looking further, it appears the problem is that if you cast bless over and 
     
     >
     
      over, the effects stack.  IMO, I don't think that is really the intended 
     
     >
     
      behaviour - I think what is really intended is that if you have bless, you can 
     
     >
     
      re-cast it to reset the duration so that it doesn't expire as soon.  I'd 
     
     >
     
      personally think that the += values currently in place should just be replaced 
     
     >
     
      with = values.
     
     
There are monsters in the game that are very dangerous until you have AC -80
or lower (I can't imagine fighting evil masters with AC -30). If possessions
don't stack any more, I see no chance to reach such a low AC.
I think even those hyper kobolds in the Cave of Ordeal would hurt very much if
you don't have a better AC than what you can reach with your armour (_if_
you're allowed to wear any).

>
     
     
     >
     
        In any case, the patch as you submitted isn't acceptably anyway - it doesn't 
     
     >
     
      use standard C constructs - you are using // comments as well as declaring new 
     
     >
     
      variables in the middle of code blocks.  These would be easy points to fix if 
     
     >
     
      people think this is the desired fix.
     
     
I have done C++ for years, so I'm used to do it that way, sorry. And gcc
didn't complain. :}
If people agree that we want to keep accumulating the holy possessions, then
this patch fixes the overflow in the right place. And this is the only place
to do it, unless you make stats.ac and stats.wc short values.


Bye
Jochen

-- 
Jochen Suckfuell  ---  
     
     http://www.suckfuell.net/jochen/
     
       ---

_______________________________________________
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