Re: [code][newbie]modifying int damage and void hit infight.c

From: Bill Forgette (forgettb@mlc.lib.mi.us)
Date: 08/09/99


Thanks for the suggestions!  I tried them out and they work great.  Now
for my next step, drow with penalities fighting in the light...


Bill

Robert Moon wrote:
>
> At 11:33 AM 8/8/99 -0400, you wrote:
> >Again, no errors, no crashes.... but how do I know 1)that the dwarves
<snip> just change the one section of
> "Calculate THAC0," as follows:
>
>   /* Calculate the THAC0 of the attacker */
>   if (!IS_NPC(ch))
>     calc_thaco = thaco((int) GET_CLASS(ch), (int) GET_LEVEL(ch));
>   else          /* THAC0 for monsters is set in the HitRoll */
>     calc_thaco = 20;
>   calc_thaco -= str_app[STRENGTH_APPLY_INDEX(ch)].tohit;
>   calc_thaco -= GET_HITROLL(ch);
>   calc_thaco -= (int) ((GET_INT(ch) - 13) / 1.5);   /* Intelligence helps! */
>   calc_thaco -= (int) ((GET_WIS(ch) - 13) / 1.5);   /* So does wisdom */
>   if (AFF_FLAGGED(ch, AFF_GIANT_SLAYER) && MOB_FLAGGED(victim, MOB_GIANTSZ)) {
>     calc_thaco--;    /* +1 to hit for giant slayers */
>     send_to_char ("DUBUGGING INFO:  Giant Slayer "to hit" bonus of +1
> added.\r\n", ch);
>   }
>
> The "calc_thaco--;" line is the same as:
>    calc_thaco += 1;
> which is the same as:
>    calc_thaco = calc_thaco +1;
>
> Further, if you want to check to see if your damage bonus is being applied
> properly, change your giant slayer bonus check as follows:
>
>  /* putting bonus to damage if giantslayer */
>  if (AFF_FLAGGED(ch, AFF_GIANT_SLAYER) && MOB_FLAGGED(victim, MOB_GIANTSZ)) {
>   dam += 2;
>   send_to_char ("DUBUGGING INFO:  Giant Slayer damage bonus of +2
> added.\r\n", ch);
>   }
>
<snip>
--
Bill Forgette, AccessMichigan Trainer
Michigan Library Consortium
voice: 800-530-9019 -or- 517-694-4242, ext. 13
fax: 517-694-9303
email: forgettb@mlc.lib.mi.us
homepage & resume: http://mlc.lib.mi.us/~forgettb


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST