[CF-Devel] RE: I want to be poisoned and blinded! :-)

Andreas Vogl andi.vogl at gmx.net
Wed Aug 23 14:29:33 CDT 2000


Hi again,

(If you didn´t read my first post, please do so before you
continue here.)

Um... hm... perhaps I didn´t think about my problem
carefully enough yet.

If the chance of being hit depended only on the difference
between player´s and attacker´s level, a level 100 monster
could not hit a level 1 player - quite stupid {:/

This should work better:

------------------------------------
server/attack.c:
~~~~~~~~~~~~~~~~

int hit_player_attacktype(object *op, object *hitter, int dam, 
			  uint32 attacktype, int magic)
{
int diff;

...

diff = op->level - hitter->level;
if (diff > 110) diff = 110;   /* savethrow has only 111 elements */
if (diff < 0) diff = 0;       /* low-level victims are slain at full power
*/

if (... && ... || ... && ... && (RANDOM()%20 + 1 +
    ((op->protected&attacktype)?4:0) - ((op->vulnerable&attacktype)?4:0) 
    < savethrow[diff]))
  {
     /* Player has been hit by something */
     ...
  }

...

}
------------------------------------------

I hope I got it right this time. I hope I got ANYTHING right.
Waaah, god help me! :)


-- 
Sent through GMX FreeMail - 
     
     http://www.gmx.net
     
     
    


More information about the crossfire mailing list