I am using circle bpl15 with Oasis2.0 and races patched in. I am trying to give dwarfs a bonus to hit giants. So far, I have created MOB_GIANTSZ and AFF_GIANT_SLAYER flags ok. No problem there... Then I went into fight.c and added a bonus to damage in int damage: /* putting bonus to damage if giantslayer */ if (AFF_FLAGGED(ch, AFF_GIANT_SLAYER) && MOB_FLAGGED(victim, MOB_GIANTSZ)) dam += 2; That seems to be working - at least no errors popping up and no crashes... Next I wanted to give a bonus in the thaco area and was pretty confused. This is what I did: /* for giant slayers */ if (!IS_NPC(ch) && AFF_FLAGGED(ch, AFF_GIANT_SLAYER) && MOB_FLAGGED(victim, MOB_GIANTSZ)) 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) +1); /* So does wisdom */ /* +1 above is for giant slayer bonus */ /* for all others */ 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 */ Again, no errors, no crashes.... but how do I know 1)that the dwarves are actually getting the bonus, 2) are others getting the bonus, 3) is there a better way to add in the bonus rather than throwing in the +1 into the line with GET_WIS? TIA, Bill -- Bill Forgette Michigan Library Consortium Network Librarian / AccessMichigan Trainer Voice: 800-530-9019, x13 Fax: 517-694-9303 forgettb@mlc.lib.mi.us Personal Home Page and 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